13 * |
13 * |
14 * Description: Defines APIs common to all supported codecs. |
14 * Description: Defines APIs common to all supported codecs. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef __VOIPFORMATINTFC_H |
18 #ifndef VOIPFORMATINTFC_H |
19 #define __VOIPFORMATINTFC_H |
19 #define VOIPFORMATINTFC_H |
20 |
20 |
21 #include <voipaudiocommon.h> |
21 #include <voipaudiocommon.h> |
22 |
22 |
23 // FORWARD DECLARATIONS |
23 // FORWARD DECLARATIONS |
24 class CVoIPFormatIntfc; |
24 class CVoIPFormatIntfc; |
40 static const TUint KSilenceEnd = 3; |
40 static const TUint KSilenceEnd = 3; |
41 static const TUint KObserverEventMax = 4; |
41 static const TUint KObserverEventMax = 4; |
42 |
42 |
43 public: |
43 public: |
44 /** |
44 /** |
45 * ?description |
45 * Event |
46 * |
|
47 * @since S60 v5.0 |
|
48 * @param const CVoIPFormatIntfc& |
46 * @param const CVoIPFormatIntfc& |
49 * @param TInt - event type |
47 * @param TInt - event type |
50 * @return void |
48 * @return void |
51 */ |
49 */ |
52 virtual void Event(const CVoIPFormatIntfc& aSrc, TInt aEventType) = 0; |
50 virtual void Event(const CVoIPFormatIntfc& aSrc, TInt aEventType) = 0; |
63 class CVoIPFormatIntfc |
61 class CVoIPFormatIntfc |
64 { |
62 { |
65 public: |
63 public: |
66 /** |
64 /** |
67 * TG711CodecMode |
65 * TG711CodecMode |
68 * ?description |
|
69 * |
|
70 */ |
66 */ |
71 enum TG711CodecMode |
67 enum TG711CodecMode |
72 { |
68 { |
73 EG711ALaw, |
69 EG711ALaw, |
74 EG711uLaw |
70 EG711uLaw |
75 }; |
71 }; |
76 |
72 |
77 /** |
73 /** |
78 * TILBCCodecMode |
74 * TILBCCodecMode |
79 * ?description |
|
80 * |
|
81 */ |
75 */ |
82 enum TILBCCodecMode |
76 enum TILBCCodecMode |
83 { |
77 { |
84 EiLBC20mSecFrame, |
78 EiLBC20mSecFrame, |
85 EiLBC30mSecFrame |
79 EiLBC30mSecFrame |
86 }; |
80 }; |
87 |
81 |
88 public: |
82 public: |
89 /** |
83 /** |
90 * Destructor |
84 * Destructor |
91 * |
|
92 * @since S60 v5.0 |
|
93 * @param none |
85 * @param none |
94 * @return none |
86 * @return none |
95 */ |
87 */ |
96 IMPORT_C virtual ~CVoIPFormatIntfc(); |
88 IMPORT_C virtual ~CVoIPFormatIntfc(); |
97 |
89 |
98 /** |
90 /** |
99 * ?description |
91 * SetObserver |
100 * |
|
101 * @since S60 v5.0 |
|
102 * @param MVoIPFormatObserver& |
92 * @param MVoIPFormatObserver& |
103 * @return TInt |
93 * @return TInt |
104 */ |
94 */ |
105 IMPORT_C TInt SetObserver(MVoIPFormatObserver& aObserver); |
95 IMPORT_C TInt SetObserver(MVoIPFormatObserver& aObserver); |
106 |
96 |
107 /** |
97 /** |
108 * ?description |
98 * GetSupportedBitRates |
109 * |
|
110 * @since S60 v5.0 |
|
111 * @param RArray<TUint>& |
99 * @param RArray<TUint>& |
112 * @return TInt |
100 * @return TInt |
113 */ |
101 */ |
114 IMPORT_C TInt GetSupportedBitRates(RArray<TUint>& aArray); |
102 IMPORT_C TInt GetSupportedBitRates(RArray<TUint>& aArray); |
115 |
103 |
116 /** |
104 /** |
117 * ?description |
105 * SetBitRate |
118 * |
|
119 * @since S60 v5.0 |
|
120 * @param TUint |
106 * @param TUint |
121 * @return TInt |
107 * @return TInt |
122 */ |
108 */ |
123 IMPORT_C TInt SetBitRate(TUint aBitrate); |
109 IMPORT_C TInt SetBitRate(TUint aBitrate); |
124 |
110 |
125 /** |
111 /** |
126 * ?description |
112 * GetBitRate |
127 * |
|
128 * @since S60 v5.0 |
|
129 * @param TUint& |
113 * @param TUint& |
130 * @return TInt |
114 * @return TInt |
131 */ |
115 */ |
132 IMPORT_C TInt GetBitRate(TUint& aBitrate); |
116 IMPORT_C TInt GetBitRate(TUint& aBitrate); |
133 |
117 |
134 /** |
118 /** |
135 * ?description |
119 * SetVAD |
136 * |
|
137 * @since S60 v5.0 |
|
138 * @param TBool |
120 * @param TBool |
139 * @return TInt |
121 * @return TInt |
140 */ |
122 */ |
141 IMPORT_C TInt SetVAD(TBool aVad); |
123 IMPORT_C TInt SetVAD(TBool aVad); |
142 |
124 |
143 /** |
125 /** |
144 * ?description |
126 * GetVAD |
145 * |
|
146 * @since S60 v5.0 |
|
147 * @param TBool& |
127 * @param TBool& |
148 * @return TInt |
128 * @return TInt |
149 */ |
129 */ |
150 IMPORT_C TInt GetVAD(TBool& aVad); |
130 IMPORT_C TInt GetVAD(TBool& aVad); |
151 |
131 |
152 /** |
132 /** |
153 * ?description |
133 * FrameModeRequiredForErrorConcealment |
154 * |
|
155 * @since S60 v5.0 |
|
156 * @param TBool& |
134 * @param TBool& |
157 * @return TInt |
135 * @return TInt |
158 */ |
136 */ |
159 IMPORT_C TInt FrameModeRequiredForErrorConcealment(TBool& aMode); |
137 IMPORT_C TInt FrameModeRequiredForErrorConcealment(TBool& aMode); |
160 |
138 |
161 /** |
139 /** |
162 * ?description |
140 * SetFrameMode |
163 * |
|
164 * @since S60 v5.0 |
|
165 * @param TBool |
141 * @param TBool |
166 * @return TInt |
142 * @return TInt |
167 */ |
143 */ |
168 IMPORT_C TInt SetFrameMode(TBool aMode); |
144 IMPORT_C TInt SetFrameMode(TBool aMode); |
169 /** |
145 /** |
170 * ?description |
146 * GetFrameMode |
171 * |
|
172 * @since S60 v5.0 |
|
173 * @param TBool& |
147 * @param TBool& |
174 * @return TInt |
148 * @return TInt |
175 */ |
149 */ |
176 IMPORT_C TInt GetFrameMode(TBool& aMode); |
150 IMPORT_C TInt GetFrameMode(TBool& aMode); |
177 |
151 |
178 /** |
152 /** |
179 * ?description |
153 * ConcealErrorForNextBuffer |
180 * |
|
181 * @since S60 v5.0 |
|
182 * @param none |
154 * @param none |
183 * @return TInt |
155 * @return TInt |
184 */ |
156 */ |
185 IMPORT_C TInt ConcealErrorForNextBuffer(); |
157 IMPORT_C TInt ConcealErrorForNextBuffer(); |
186 |
158 |
187 protected: |
159 protected: |
188 |
160 |
189 /** |
161 /** |
190 * Constructor |
162 * Constructor |
191 * |
|
192 * @since S60 v5.0 |
|
193 * @param none |
163 * @param none |
194 * @return none |
164 * @return none |
195 */ |
165 */ |
196 CVoIPFormatIntfc(); |
166 CVoIPFormatIntfc(); |
197 |
167 |
198 /** |
168 /** |
199 * 2-nd phase constructor |
169 * 2-nd phase constructor |
200 * |
|
201 * @since S60 v5.0 |
|
202 * @param CVoIPFormatIntfcImpl* |
170 * @param CVoIPFormatIntfcImpl* |
203 * @return void |
171 * @return void |
204 */ |
172 */ |
205 void ConstructL(CVoIPFormatIntfcImpl* aVoIPFormatIntfcImpl); |
173 void ConstructL(CVoIPFormatIntfcImpl* aVoIPFormatIntfcImpl); |
206 |
174 |
207 protected: |
175 protected: |
208 |
176 |
209 CVoIPFormatIntfcImpl* iVoIPFormatIntfcImpl; |
177 CVoIPFormatIntfcImpl* iVoIPFormatIntfcImpl; |
210 |
|
211 }; |
178 }; |
212 |
179 |
213 #endif //__VOIPFORMATINTFC_H |
180 #endif //VOIPFORMATINTFC_H |
214 |
181 |
215 // End of file |
182 // End of file |