|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Defines APIs common to all supported codecs. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __VOIPFORMATINTFC_H |
|
20 #define __VOIPFORMATINTFC_H |
|
21 |
|
22 #include <voipaudiocommon.h> |
|
23 |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CVoIPFormatIntfc; |
|
27 class CVoIPFormatIntfcImpl; |
|
28 |
|
29 |
|
30 /** |
|
31 * MVoIPFormatObserver class |
|
32 * |
|
33 * ?more_complete_description |
|
34 * |
|
35 * @lib VoIPAudioIntfc.dll |
|
36 * @since S60 v5.0 |
|
37 */ |
|
38 class MVoIPFormatObserver |
|
39 { |
|
40 public: |
|
41 static const TUint KSilenceBegin = 1; |
|
42 static const TUint KSilenceUpdate = 2; |
|
43 static const TUint KSilenceEnd = 3; |
|
44 static const TUint KObserverEventMax = 4; |
|
45 |
|
46 public: |
|
47 /** |
|
48 * ?description |
|
49 * |
|
50 * @since S60 v5.0 |
|
51 * @param const CVoIPFormatIntfc& |
|
52 * @param TInt - event type |
|
53 * @return void |
|
54 */ |
|
55 virtual void Event(const CVoIPFormatIntfc& aSrc, TInt aEventType) = 0; |
|
56 }; |
|
57 |
|
58 |
|
59 /** |
|
60 * CVoIPFormatIntfc class |
|
61 * |
|
62 * Base class for codec format configuration |
|
63 * |
|
64 * @lib VoIPAudioIntfc.dll |
|
65 * @since S60 v5.0 |
|
66 */ |
|
67 class CVoIPFormatIntfc |
|
68 { |
|
69 public: |
|
70 /** |
|
71 * TG711CodecMode |
|
72 * ?description |
|
73 * @since S60 v5.0 |
|
74 */ |
|
75 enum TG711CodecMode |
|
76 { |
|
77 EG711ALaw, |
|
78 EG711uLaw |
|
79 }; |
|
80 |
|
81 /** |
|
82 * TILBCCodecMode |
|
83 * ?description |
|
84 * @since S60 v5.0 |
|
85 */ |
|
86 enum TILBCCodecMode |
|
87 { |
|
88 EiLBC20mSecFrame, |
|
89 EiLBC30mSecFrame |
|
90 }; |
|
91 |
|
92 public: |
|
93 /** |
|
94 * Destructor |
|
95 * |
|
96 * @since S60 v5.0 |
|
97 * @param none |
|
98 * @return none |
|
99 */ |
|
100 IMPORT_C virtual ~CVoIPFormatIntfc(); |
|
101 |
|
102 /** |
|
103 * ?description |
|
104 * |
|
105 * @since S60 v5.0 |
|
106 * @param MVoIPFormatObserver& |
|
107 * @return TInt |
|
108 */ |
|
109 IMPORT_C TInt SetObserver(MVoIPFormatObserver& aObserver); |
|
110 |
|
111 /** |
|
112 * ?description |
|
113 * |
|
114 * @since S60 v5.0 |
|
115 * @param RArray<TUint>& |
|
116 * @return TInt |
|
117 */ |
|
118 IMPORT_C TInt GetSupportedBitRates(RArray<TUint>& aArray); |
|
119 |
|
120 /** |
|
121 * ?description |
|
122 * |
|
123 * @since S60 v5.0 |
|
124 * @param TUint |
|
125 * @return TInt |
|
126 */ |
|
127 IMPORT_C TInt SetBitRate(TUint aBitrate); |
|
128 |
|
129 /** |
|
130 * ?description |
|
131 * |
|
132 * @since S60 v5.0 |
|
133 * @param TUint& |
|
134 * @return TInt |
|
135 */ |
|
136 IMPORT_C TInt GetBitRate(TUint& aBitrate); |
|
137 |
|
138 /** |
|
139 * ?description |
|
140 * |
|
141 * @since S60 v5.0 |
|
142 * @param TBool |
|
143 * @return TInt |
|
144 */ |
|
145 IMPORT_C TInt SetVAD(TBool aVad); |
|
146 |
|
147 /** |
|
148 * ?description |
|
149 * |
|
150 * @since S60 v5.0 |
|
151 * @param TBool& |
|
152 * @return TInt |
|
153 */ |
|
154 IMPORT_C TInt GetVAD(TBool& aVad); |
|
155 |
|
156 /** |
|
157 * ?description |
|
158 * |
|
159 * @since S60 v5.0 |
|
160 * @param TBool& |
|
161 * @return TInt |
|
162 */ |
|
163 IMPORT_C TInt FrameModeRequiredForErrorConcealment(TBool& aMode); |
|
164 |
|
165 /** |
|
166 * ?description |
|
167 * |
|
168 * @since S60 v5.0 |
|
169 * @param TBool |
|
170 * @return TInt |
|
171 */ |
|
172 IMPORT_C TInt SetFrameMode(TBool aMode); |
|
173 /** |
|
174 * ?description |
|
175 * |
|
176 * @since S60 v5.0 |
|
177 * @param TBool& |
|
178 * @return TInt |
|
179 */ |
|
180 IMPORT_C TInt GetFrameMode(TBool& aMode); |
|
181 |
|
182 /** |
|
183 * ?description |
|
184 * |
|
185 * @since S60 v5.0 |
|
186 * @param none |
|
187 * @return TInt |
|
188 */ |
|
189 IMPORT_C TInt ConcealErrorForNextBuffer(); |
|
190 |
|
191 protected: |
|
192 |
|
193 /** |
|
194 * Constructor |
|
195 * |
|
196 * @since S60 v5.0 |
|
197 * @param none |
|
198 * @return none |
|
199 */ |
|
200 CVoIPFormatIntfc(); |
|
201 |
|
202 /** |
|
203 * 2-nd phase constructor |
|
204 * |
|
205 * @since S60 v5.0 |
|
206 * @param CVoIPFormatIntfcImpl* |
|
207 * @return void |
|
208 */ |
|
209 void ConstructL(CVoIPFormatIntfcImpl* aVoIPFormatIntfcImpl); |
|
210 |
|
211 protected: |
|
212 CVoIPFormatIntfcImpl* iVoIPFormatIntfcImpl; |
|
213 |
|
214 }; |
|
215 |
|
216 #endif //__VOIPFORMATINTFC_H |
|
217 |
|
218 // End of file |