1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "mcecodec.h" |
|
20 #include "mcesession.h" |
|
21 #include "mcemanager.h" |
|
22 #include "mcemediastream.h" |
|
23 #include "mcestreamobserver.h" |
|
24 #include "mcedefs.h" |
|
25 |
|
26 |
|
27 |
|
28 #define _FLAT_DATA static_cast<CMceComCodec*>( iFlatData ) |
|
29 #define FLAT_DATA( data ) _FLAT_DATA->data |
|
30 |
|
31 // ============================ MEMBER FUNCTIONS =============================== |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // CMceCodec::~CMceCodec |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 CMceCodec::~CMceCodec() |
|
38 { |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CMceCodec::InitializeL |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 void CMceCodec::InitializeL( CMceMediaStream& aParent ) |
|
46 { |
|
47 iStream = &aParent; |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CMceCodec::SetStateL |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 EXPORT_C void CMceCodec::SetStateL( CMceCodec::TState /*aState*/ ) |
|
55 { |
|
56 // NOT SUPPORTED YET |
|
57 User::Leave( KErrNotSupported ); |
|
58 } |
|
59 |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CMceCodec::SetStandByTimerL |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 EXPORT_C void CMceCodec::SetStandByTimerL( TUint32 /*aTimerValue*/ ) |
|
66 { |
|
67 // NOT SUPPORTED YET |
|
68 User::Leave( KErrNotSupported ); |
|
69 } |
|
70 |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CMceCodec::SetMMFPriorityL |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 EXPORT_C void CMceCodec::SetMMFPriorityL( TInt aPriority ) |
|
77 { |
|
78 iMMFPriority = aPriority; |
|
79 } |
|
80 |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CMceCodec::SetMMFPriorityPreferenceL |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 EXPORT_C void CMceCodec::SetMMFPriorityPreferenceL( TInt aPriorityPreference ) |
|
87 { |
|
88 iMMFPriorityPreference = aPriorityPreference; |
|
89 } |
|
90 |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 EXPORT_C void CMceCodec::SetKeepAliveTimerL( TUint8 aTimerValue ) |
|
97 { |
|
98 iKeepAliveTimer = aTimerValue; |
|
99 } |
|
100 |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 EXPORT_C void CMceCodec::SetKeepAlivePayloadTypeL( TUint8 aKeepAlivePT ) |
|
107 { |
|
108 iKeepAlivePayloadType = aKeepAlivePT; |
|
109 } |
|
110 |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 // ----------------------------------------------------------------------------- |
|
115 // |
|
116 EXPORT_C void CMceCodec::SetKeepAliveDataL( const TDesC8& aData ) |
|
117 { |
|
118 iKeepAliveData = aData; |
|
119 } |
|
120 |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // CMceCodec::State |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 EXPORT_C CMceCodec::TState CMceCodec::State() const |
|
127 { |
|
128 return CMceCodec::EDisabled; |
|
129 } |
|
130 |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // CMceCodec::Id |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 /* |
|
137 EXPORT_C TMceMediaId CMceCodec::Id() const |
|
138 { |
|
139 return; |
|
140 } |
|
141 */ |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // CMceCodec::Type |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 EXPORT_C TMceCodecType CMceCodec::Type() const |
|
148 { |
|
149 return iType; |
|
150 } |
|
151 |
|
152 // ----------------------------------------------------------------------------- |
|
153 // CMceCodec::FourCC |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 EXPORT_C TUint32 CMceCodec::FourCC() const |
|
157 { |
|
158 return iFourCC; |
|
159 } |
|
160 |
|
161 // ----------------------------------------------------------------------------- |
|
162 // CMceCodec::Bitrate |
|
163 // ----------------------------------------------------------------------------- |
|
164 // |
|
165 EXPORT_C TUint CMceCodec::Bitrate() const |
|
166 { |
|
167 return iBitrate; |
|
168 } |
|
169 |
|
170 // ----------------------------------------------------------------------------- |
|
171 // CMceAudioCodec::AllowedBitrates |
|
172 // ----------------------------------------------------------------------------- |
|
173 // |
|
174 EXPORT_C TUint CMceCodec::AllowedBitrates() const |
|
175 { |
|
176 return iAllowedBitrates; |
|
177 } |
|
178 |
|
179 // ----------------------------------------------------------------------------- |
|
180 // CMceCodec::FrameSize |
|
181 // ----------------------------------------------------------------------------- |
|
182 // |
|
183 EXPORT_C TUint CMceCodec::FrameSize() const |
|
184 { |
|
185 return iFrameSize; |
|
186 } |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // CMceCodec::CodecMode |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 EXPORT_C TUint CMceCodec::CodecMode() const |
|
193 { |
|
194 return iCodecMode; |
|
195 } |
|
196 |
|
197 // ----------------------------------------------------------------------------- |
|
198 // CMceCodec::PayloadType |
|
199 // ----------------------------------------------------------------------------- |
|
200 // |
|
201 EXPORT_C TUint8 CMceCodec::PayloadType() const |
|
202 { |
|
203 return iPayloadType; |
|
204 } |
|
205 |
|
206 |
|
207 // ----------------------------------------------------------------------------- |
|
208 // CMceCodec::SdpName |
|
209 // ----------------------------------------------------------------------------- |
|
210 // |
|
211 EXPORT_C const TDesC8& CMceCodec::SdpName() const |
|
212 { |
|
213 return iSdpName; |
|
214 } |
|
215 |
|
216 |
|
217 // ----------------------------------------------------------------------------- |
|
218 // |
|
219 // ----------------------------------------------------------------------------- |
|
220 // |
|
221 EXPORT_C TInt CMceCodec::MMFPriority() const |
|
222 { |
|
223 return iMMFPriority; |
|
224 } |
|
225 |
|
226 |
|
227 // ----------------------------------------------------------------------------- |
|
228 // |
|
229 // ----------------------------------------------------------------------------- |
|
230 // |
|
231 EXPORT_C TInt CMceCodec::MMFPriorityPreference() const |
|
232 { |
|
233 return iMMFPriorityPreference; |
|
234 } |
|
235 |
|
236 |
|
237 // ----------------------------------------------------------------------------- |
|
238 // |
|
239 // ----------------------------------------------------------------------------- |
|
240 // |
|
241 EXPORT_C TUint8 CMceCodec::KeepAliveTimer() const |
|
242 { |
|
243 return iKeepAliveTimer; |
|
244 } |
|
245 |
|
246 |
|
247 // ----------------------------------------------------------------------------- |
|
248 // |
|
249 // ----------------------------------------------------------------------------- |
|
250 // |
|
251 EXPORT_C TUint8 CMceCodec::KeepAlivePayloadType() const |
|
252 { |
|
253 return iKeepAlivePayloadType; |
|
254 } |
|
255 |
|
256 |
|
257 // ----------------------------------------------------------------------------- |
|
258 // |
|
259 // ----------------------------------------------------------------------------- |
|
260 // |
|
261 EXPORT_C const TDesC8& CMceCodec::KeepAliveData() const |
|
262 { |
|
263 return iKeepAliveData; |
|
264 } |
|
265 |
|
266 |
|
267 // ----------------------------------------------------------------------------- |
|
268 // |
|
269 // ----------------------------------------------------------------------------- |
|
270 // |
|
271 EXPORT_C TInt CMceCodec::Preference() const |
|
272 { |
|
273 return iPreference; |
|
274 } |
|
275 |
|
276 |
|
277 // ----------------------------------------------------------------------------- |
|
278 // |
|
279 // ----------------------------------------------------------------------------- |
|
280 // |
|
281 EXPORT_C void CMceCodec::SetPreferenceL( TInt aPreference ) |
|
282 { |
|
283 iPreference = aPreference; |
|
284 } |
|
285 |
|
286 |
|
287 // ----------------------------------------------------------------------------- |
|
288 // |
|
289 // ----------------------------------------------------------------------------- |
|
290 // |
|
291 void CMceCodec::SetSdpNameL( const TDesC8& aSdpName ) |
|
292 { |
|
293 iSdpName = aSdpName; |
|
294 } |
|
295 |
|
296 |
|
297 // ----------------------------------------------------------------------------- |
|
298 // |
|
299 // ----------------------------------------------------------------------------- |
|
300 // |
|
301 CMceCodec::CMceCodec() |
|
302 { |
|
303 } |
|
304 |
|