|
1 /* |
|
2 * Copyright (c) 2008-2009 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 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
|
25 #include <openmax/il/common/omxilutil.h> |
|
26 #include "log.h" |
|
27 #include "omxilpcmrendererapb0port.h" |
|
28 #include "omxilpcmrendererconst.h" |
|
29 |
|
30 |
|
31 COmxILPcmRendererAPB0Port* |
|
32 COmxILPcmRendererAPB0Port::NewL( |
|
33 const TOmxILCommonPortData& aCommonPortData, |
|
34 const RArray<OMX_AUDIO_CODINGTYPE>& aSupportedAudioFormats, |
|
35 const OMX_AUDIO_PARAM_PCMMODETYPE& aParamAudioPcm, |
|
36 const OMX_AUDIO_CONFIG_VOLUMETYPE& aConfigAudioVolume, |
|
37 const OMX_AUDIO_CONFIG_MUTETYPE& aConfigAudioMute) |
|
38 { |
|
39 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::NewL")); |
|
40 |
|
41 COmxILPcmRendererAPB0Port* self = new (ELeave)COmxILPcmRendererAPB0Port( |
|
42 aParamAudioPcm, |
|
43 aConfigAudioVolume, |
|
44 aConfigAudioMute); |
|
45 |
|
46 CleanupStack::PushL(self); |
|
47 self->ConstructL(aCommonPortData, aSupportedAudioFormats); |
|
48 CleanupStack::Pop(self); |
|
49 return self; |
|
50 |
|
51 } |
|
52 |
|
53 |
|
54 void |
|
55 COmxILPcmRendererAPB0Port::ConstructL(const TOmxILCommonPortData& aCommonPortData, const RArray<OMX_AUDIO_CODINGTYPE>& aSupportedAudioFormats) |
|
56 { |
|
57 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::ConstructL")); |
|
58 COmxILAudioPort::ConstructL(aCommonPortData, aSupportedAudioFormats); |
|
59 OMX_PARAM_PORTDEFINITIONTYPE& paramPortDefinition=GetParamPortDefinition(); |
|
60 // We have to finish with iParamPortDefinition |
|
61 paramPortDefinition.eDomain = OMX_PortDomainAudio; |
|
62 paramPortDefinition.format.audio.pNativeRender = 0; |
|
63 |
|
64 iMimeTypeBuf.CreateL(KMimeTypeAudioPcm(), KMimeTypeAudioPcm().Length() + 1); |
|
65 |
|
66 TUint8* pTUint2 = const_cast<TUint8*>(iMimeTypeBuf.PtrZ()); |
|
67 paramPortDefinition.format.audio.cMIMEType = reinterpret_cast<OMX_STRING>(pTUint2); |
|
68 |
|
69 paramPortDefinition.format.audio.bFlagErrorConcealment = OMX_FALSE; |
|
70 paramPortDefinition.format.audio.eEncoding = OMX_AUDIO_CodingPCM; |
|
71 |
|
72 // Init iParamVolumeRamp here... |
|
73 iConfigVolumeRamp.nSize = sizeof(OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP); |
|
74 iConfigVolumeRamp.nVersion = TOmxILSpecVersion(); |
|
75 iConfigVolumeRamp.nPortIndex = paramPortDefinition.nPortIndex; |
|
76 iConfigVolumeRamp.nRampDuration = 0; |
|
77 } |
|
78 |
|
79 |
|
80 COmxILPcmRendererAPB0Port::COmxILPcmRendererAPB0Port( |
|
81 const OMX_AUDIO_PARAM_PCMMODETYPE& aParamAudioPcm, |
|
82 const OMX_AUDIO_CONFIG_VOLUMETYPE& aConfigAudioVolume, |
|
83 const OMX_AUDIO_CONFIG_MUTETYPE& aConfigAudioMute) |
|
84 : |
|
85 iParamAudioPcm(aParamAudioPcm), |
|
86 iConfigAudioVolume(aConfigAudioVolume), |
|
87 iConfigAudioMute(aConfigAudioMute) |
|
88 { |
|
89 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::COmxILPcmRendererAPB0Port")); |
|
90 } |
|
91 |
|
92 |
|
93 COmxILPcmRendererAPB0Port::~COmxILPcmRendererAPB0Port() |
|
94 { |
|
95 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::~COmxILPcmRendererAPB0Port")); |
|
96 |
|
97 CleanUpPort(); |
|
98 iMimeTypeBuf.Close(); |
|
99 |
|
100 } |
|
101 |
|
102 |
|
103 OMX_ERRORTYPE |
|
104 COmxILPcmRendererAPB0Port::SetFormatInPortDefinition( |
|
105 const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition, |
|
106 TBool& aUpdateProcessingFunction) |
|
107 { |
|
108 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::SetFormatInPortDefinition")); |
|
109 // There's no point on chaging the cMIMEType type of this port |
|
110 // Same thing for pNativeRender and eEncoding |
|
111 GetParamPortDefinition().format.audio.bFlagErrorConcealment = |
|
112 aPortDefinition.format.audio.bFlagErrorConcealment; |
|
113 // Error concealment not currently needed at the processing function |
|
114 aUpdateProcessingFunction = EFalse; |
|
115 |
|
116 return OMX_ErrorNone; |
|
117 |
|
118 } |
|
119 |
|
120 |
|
121 TBool |
|
122 COmxILPcmRendererAPB0Port::IsTunnelledPortCompatible( |
|
123 const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition) const |
|
124 { |
|
125 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::IsTunnelledPortCompatible")); |
|
126 |
|
127 // First, the easy checks... |
|
128 if(aPortDefinition.eDomain != GetParamPortDefinition().eDomain) |
|
129 { |
|
130 return EFalse; |
|
131 } |
|
132 |
|
133 if(aPortDefinition.format.audio.eEncoding != OMX_AUDIO_CodingPCM) |
|
134 { |
|
135 return EFalse; |
|
136 } |
|
137 |
|
138 TBool retValue = ETrue; |
|
139 |
|
140 #ifdef _OMXIL_PCMRENDERER_CHECK_MIME_TYPE_ON |
|
141 RBuf8 tunnelMimeTypeBuf; |
|
142 tunnelMimeTypeBuf.Create(KMimeTypeAudioPcm().Length() + 1); |
|
143 tunnelMimeTypeBuf = |
|
144 const_cast<const TUint8*>( |
|
145 reinterpret_cast<TUint8*>(aPortDefinition.format.audio.cMIMEType)); |
|
146 |
|
147 |
|
148 if (iMimeTypeBuf != tunnelMimeTypeBuf) |
|
149 { |
|
150 retValue = EFalse; |
|
151 } |
|
152 |
|
153 tunnelMimeTypeBuf.Close(); |
|
154 #endif |
|
155 |
|
156 return retValue; |
|
157 } |
|
158 |
|
159 |
|
160 OMX_ERRORTYPE |
|
161 COmxILPcmRendererAPB0Port::GetLocalOmxParamIndexes(RArray<TUint>& aIndexArray) const |
|
162 { |
|
163 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::GetLocalOmxParamIndexes")); |
|
164 |
|
165 // Always collect local indexes from parent |
|
166 OMX_ERRORTYPE omxRetValue = |
|
167 COmxILAudioPort::GetLocalOmxParamIndexes(aIndexArray); |
|
168 |
|
169 if (OMX_ErrorNone != omxRetValue) |
|
170 { |
|
171 return omxRetValue; |
|
172 } |
|
173 |
|
174 TInt err = aIndexArray.InsertInOrder(OMX_IndexParamAudioPcm); |
|
175 |
|
176 // Note that index duplication is OK. |
|
177 if (KErrNone != err && KErrAlreadyExists != err) |
|
178 { |
|
179 return OMX_ErrorInsufficientResources; |
|
180 } |
|
181 |
|
182 return OMX_ErrorNone; |
|
183 |
|
184 } |
|
185 |
|
186 OMX_ERRORTYPE |
|
187 COmxILPcmRendererAPB0Port::GetLocalOmxConfigIndexes(RArray<TUint>& aIndexArray) const |
|
188 { |
|
189 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::GetLocalOmxConfigIndexes")); |
|
190 |
|
191 // Always collect local indexes from parent |
|
192 OMX_ERRORTYPE omxRetValue = |
|
193 COmxILAudioPort::GetLocalOmxConfigIndexes(aIndexArray); |
|
194 |
|
195 if (OMX_ErrorNone != omxRetValue) |
|
196 { |
|
197 return omxRetValue; |
|
198 } |
|
199 |
|
200 TInt err = aIndexArray.InsertInOrder(OMX_IndexConfigAudioVolume); |
|
201 |
|
202 // Note that index duplication is OK. |
|
203 if (KErrNone == err || KErrAlreadyExists == err) |
|
204 { |
|
205 err = aIndexArray.InsertInOrder(OMX_IndexConfigAudioMute); |
|
206 |
|
207 if (KErrNone == err || KErrAlreadyExists == err) |
|
208 { |
|
209 err = aIndexArray.InsertInOrder( |
|
210 OMX_SymbianIndexConfigAudioPcmVolumeRamp); |
|
211 } |
|
212 |
|
213 } |
|
214 |
|
215 if (KErrNone != err && KErrAlreadyExists != err) |
|
216 { |
|
217 return OMX_ErrorInsufficientResources; |
|
218 } |
|
219 |
|
220 return OMX_ErrorNone; |
|
221 |
|
222 } |
|
223 |
|
224 |
|
225 OMX_ERRORTYPE |
|
226 COmxILPcmRendererAPB0Port::GetParameter(OMX_INDEXTYPE aParamIndex, |
|
227 TAny* apComponentParameterStructure) const |
|
228 { |
|
229 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::GetParameter")); |
|
230 |
|
231 OMX_ERRORTYPE omxRetValue = OMX_ErrorNone; |
|
232 switch(aParamIndex) |
|
233 { |
|
234 case OMX_IndexParamAudioPcm: |
|
235 { |
|
236 if (OMX_ErrorNone != |
|
237 (omxRetValue = |
|
238 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
239 apComponentParameterStructure, |
|
240 sizeof(OMX_AUDIO_PARAM_PCMMODETYPE)))) |
|
241 { |
|
242 return omxRetValue; |
|
243 } |
|
244 |
|
245 OMX_AUDIO_PARAM_PCMMODETYPE* pPcmMode |
|
246 = static_cast<OMX_AUDIO_PARAM_PCMMODETYPE*>( |
|
247 apComponentParameterStructure); |
|
248 |
|
249 *pPcmMode = iParamAudioPcm; |
|
250 } |
|
251 break; |
|
252 |
|
253 default: |
|
254 { |
|
255 // Try the parent's indexes |
|
256 return COmxILAudioPort::GetParameter(aParamIndex, |
|
257 apComponentParameterStructure); |
|
258 } |
|
259 }; |
|
260 |
|
261 return OMX_ErrorNone; |
|
262 |
|
263 } |
|
264 |
|
265 |
|
266 OMX_ERRORTYPE |
|
267 COmxILPcmRendererAPB0Port::SetParameter(OMX_INDEXTYPE aParamIndex, |
|
268 const TAny* apComponentParameterStructure, |
|
269 TBool& aUpdateProcessingFunction) |
|
270 { |
|
271 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::SetParameter")); |
|
272 |
|
273 aUpdateProcessingFunction = EFalse; |
|
274 |
|
275 OMX_ERRORTYPE omxRetValue = OMX_ErrorNone; |
|
276 switch(aParamIndex) |
|
277 { |
|
278 case OMX_IndexParamAudioPcm: |
|
279 { |
|
280 if (OMX_ErrorNone != |
|
281 (omxRetValue = |
|
282 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
283 const_cast<OMX_PTR>(apComponentParameterStructure), |
|
284 sizeof(OMX_AUDIO_PARAM_PCMMODETYPE)))) |
|
285 { |
|
286 return omxRetValue; |
|
287 } |
|
288 |
|
289 const OMX_AUDIO_PARAM_PCMMODETYPE* pPcmMode |
|
290 = static_cast<const OMX_AUDIO_PARAM_PCMMODETYPE*>( |
|
291 apComponentParameterStructure); |
|
292 |
|
293 switch (pPcmMode->nSamplingRate) |
|
294 { |
|
295 case 8000 : |
|
296 case 11025 : |
|
297 case 12000 : |
|
298 case 16000 : |
|
299 case 22050 : |
|
300 case 24000 : |
|
301 case 32000 : |
|
302 case 44100 : |
|
303 case 48000 : |
|
304 break; |
|
305 default: |
|
306 return OMX_ErrorBadParameter; |
|
307 } |
|
308 |
|
309 switch (pPcmMode->nBitPerSample) |
|
310 { |
|
311 case 8 : |
|
312 case 16 : |
|
313 break; |
|
314 default: |
|
315 return OMX_ErrorBadParameter; |
|
316 } |
|
317 |
|
318 // Set the new default values |
|
319 if (iParamAudioPcm.nChannels != pPcmMode->nChannels || |
|
320 iParamAudioPcm.eNumData != pPcmMode->eNumData || |
|
321 iParamAudioPcm.eEndian != pPcmMode->eEndian || |
|
322 iParamAudioPcm.bInterleaved != pPcmMode->bInterleaved || |
|
323 iParamAudioPcm.nBitPerSample != pPcmMode->nBitPerSample || |
|
324 iParamAudioPcm.nSamplingRate != pPcmMode->nSamplingRate || |
|
325 iParamAudioPcm.ePCMMode != pPcmMode->ePCMMode) |
|
326 { |
|
327 iParamAudioPcm.nChannels = pPcmMode->nChannels; |
|
328 iParamAudioPcm.eNumData = pPcmMode->eNumData; |
|
329 iParamAudioPcm.eEndian = pPcmMode->eEndian; |
|
330 iParamAudioPcm.bInterleaved = pPcmMode->bInterleaved; |
|
331 iParamAudioPcm.nBitPerSample = pPcmMode->nBitPerSample; |
|
332 iParamAudioPcm.nSamplingRate = pPcmMode->nSamplingRate; |
|
333 iParamAudioPcm.ePCMMode = pPcmMode->ePCMMode; |
|
334 // This is an indication to the PortManager that the processing |
|
335 // function needs to get updated |
|
336 aUpdateProcessingFunction = ETrue; |
|
337 } |
|
338 |
|
339 for (TInt i=0; i<OMX_AUDIO_MAXCHANNELS; i++) |
|
340 { |
|
341 if (iParamAudioPcm.eChannelMapping[i] != pPcmMode->eChannelMapping[i]) |
|
342 { |
|
343 iParamAudioPcm.eChannelMapping[i] = pPcmMode->eChannelMapping[i]; |
|
344 // This is an indication to the PortManager that the processing |
|
345 // function needs to get updated |
|
346 aUpdateProcessingFunction = ETrue; |
|
347 } |
|
348 } |
|
349 |
|
350 } |
|
351 break; |
|
352 default: |
|
353 { |
|
354 // Try the parent's indexes |
|
355 return COmxILAudioPort::SetParameter(aParamIndex, |
|
356 apComponentParameterStructure, |
|
357 aUpdateProcessingFunction); |
|
358 } |
|
359 }; |
|
360 |
|
361 return OMX_ErrorNone; |
|
362 |
|
363 } |
|
364 |
|
365 |
|
366 OMX_ERRORTYPE |
|
367 COmxILPcmRendererAPB0Port::GetConfig(OMX_INDEXTYPE aConfigIndex, |
|
368 TAny* apComponentConfigStructure) const |
|
369 { |
|
370 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::GetConfig")); |
|
371 |
|
372 OMX_ERRORTYPE omxRetValue = OMX_ErrorNone; |
|
373 switch(aConfigIndex) |
|
374 { |
|
375 case OMX_SymbianIndexConfigAudioPcmVolumeRamp: |
|
376 { |
|
377 if (OMX_ErrorNone != |
|
378 (omxRetValue = |
|
379 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
380 apComponentConfigStructure, |
|
381 sizeof(OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP)))) |
|
382 { |
|
383 return omxRetValue; |
|
384 } |
|
385 |
|
386 OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP* |
|
387 pPcmVolumeRamp |
|
388 = static_cast< |
|
389 OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP*>( |
|
390 apComponentConfigStructure); |
|
391 |
|
392 *pPcmVolumeRamp = iConfigVolumeRamp; |
|
393 } |
|
394 break; |
|
395 |
|
396 case OMX_IndexConfigAudioVolume: |
|
397 { |
|
398 if (OMX_ErrorNone != |
|
399 (omxRetValue = |
|
400 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
401 apComponentConfigStructure, |
|
402 sizeof(OMX_AUDIO_CONFIG_VOLUMETYPE)))) |
|
403 { |
|
404 return omxRetValue; |
|
405 } |
|
406 |
|
407 OMX_AUDIO_CONFIG_VOLUMETYPE* pConfigVolume |
|
408 = static_cast<OMX_AUDIO_CONFIG_VOLUMETYPE*>( |
|
409 apComponentConfigStructure); |
|
410 |
|
411 *pConfigVolume = iConfigAudioVolume; |
|
412 } |
|
413 break; |
|
414 |
|
415 case OMX_IndexConfigAudioMute: |
|
416 { |
|
417 if (OMX_ErrorNone != |
|
418 (omxRetValue = |
|
419 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
420 apComponentConfigStructure, |
|
421 sizeof(OMX_AUDIO_CONFIG_MUTETYPE)))) |
|
422 { |
|
423 return omxRetValue; |
|
424 } |
|
425 |
|
426 OMX_AUDIO_CONFIG_MUTETYPE* pConfigMute |
|
427 = static_cast<OMX_AUDIO_CONFIG_MUTETYPE*>( |
|
428 apComponentConfigStructure); |
|
429 |
|
430 *pConfigMute = iConfigAudioMute; |
|
431 } |
|
432 break; |
|
433 |
|
434 default: |
|
435 { |
|
436 // There's no need to try the parent indexes as we know there isn't any |
|
437 // other config in the parent audio classes |
|
438 return OMX_ErrorUnsupportedIndex; |
|
439 } |
|
440 }; |
|
441 |
|
442 return OMX_ErrorNone; |
|
443 |
|
444 } |
|
445 |
|
446 OMX_ERRORTYPE |
|
447 COmxILPcmRendererAPB0Port::SetConfig(OMX_INDEXTYPE aConfigIndex, |
|
448 const TAny* apComponentConfigStructure, |
|
449 TBool& aUpdateProcessingFunction) |
|
450 { |
|
451 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::SetConfig")); |
|
452 |
|
453 aUpdateProcessingFunction = EFalse; |
|
454 |
|
455 OMX_ERRORTYPE omxRetValue = OMX_ErrorNone; |
|
456 switch(aConfigIndex) |
|
457 { |
|
458 case OMX_SymbianIndexConfigAudioPcmVolumeRamp: |
|
459 { |
|
460 if (OMX_ErrorNone != |
|
461 (omxRetValue = |
|
462 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
463 const_cast<OMX_PTR>(apComponentConfigStructure), |
|
464 sizeof(OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP)))) |
|
465 { |
|
466 return omxRetValue; |
|
467 } |
|
468 |
|
469 const OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP* |
|
470 pPcmVolumeRamp |
|
471 = static_cast< |
|
472 const OMX_SYMBIAN_AUDIO_CONFIG_PCM_VOLUMERAMP*>( |
|
473 apComponentConfigStructure); |
|
474 |
|
475 if (iConfigVolumeRamp.nRampDuration != pPcmVolumeRamp->nRampDuration) |
|
476 { |
|
477 // This is an indication to the PortManager that the processing |
|
478 // function needs to get updated |
|
479 aUpdateProcessingFunction = ETrue; |
|
480 |
|
481 iConfigVolumeRamp.nRampDuration = pPcmVolumeRamp->nRampDuration; |
|
482 } |
|
483 |
|
484 } |
|
485 break; |
|
486 |
|
487 case OMX_IndexConfigAudioVolume: |
|
488 { |
|
489 if (OMX_ErrorNone != |
|
490 (omxRetValue = |
|
491 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
492 const_cast<OMX_PTR>(apComponentConfigStructure), |
|
493 sizeof(OMX_AUDIO_CONFIG_VOLUMETYPE)))) |
|
494 { |
|
495 return omxRetValue; |
|
496 } |
|
497 |
|
498 const OMX_AUDIO_CONFIG_VOLUMETYPE* pConfigVolume |
|
499 = static_cast<const OMX_AUDIO_CONFIG_VOLUMETYPE*>( |
|
500 apComponentConfigStructure); |
|
501 |
|
502 // Set the new default values |
|
503 if (iConfigAudioVolume.bLinear != pConfigVolume->bLinear || |
|
504 iConfigAudioVolume.sVolume.nValue != pConfigVolume->sVolume.nValue || |
|
505 iConfigAudioVolume.sVolume.nMin != pConfigVolume->sVolume.nMin || |
|
506 iConfigAudioVolume.sVolume.nMax != pConfigVolume->sVolume.nMax) |
|
507 { |
|
508 iConfigAudioVolume.bLinear = pConfigVolume->bLinear; |
|
509 iConfigAudioVolume.sVolume.nValue = pConfigVolume->sVolume.nValue; |
|
510 iConfigAudioVolume.sVolume.nMin = pConfigVolume->sVolume.nMin; |
|
511 iConfigAudioVolume.sVolume.nMax = pConfigVolume->sVolume.nMax; |
|
512 // This is an indication to the PortManager that the processing |
|
513 // function needs to get updated |
|
514 aUpdateProcessingFunction = ETrue; |
|
515 } |
|
516 |
|
517 } |
|
518 break; |
|
519 case OMX_IndexConfigAudioMute: |
|
520 { |
|
521 if (OMX_ErrorNone != |
|
522 (omxRetValue = |
|
523 TOmxILUtil::CheckOmxStructSizeAndVersion( |
|
524 const_cast<OMX_PTR>(apComponentConfigStructure), |
|
525 sizeof(OMX_AUDIO_CONFIG_MUTETYPE)))) |
|
526 { |
|
527 return omxRetValue; |
|
528 } |
|
529 |
|
530 const OMX_AUDIO_CONFIG_MUTETYPE* pConfigMute |
|
531 = static_cast<const OMX_AUDIO_CONFIG_MUTETYPE*>( |
|
532 apComponentConfigStructure); |
|
533 |
|
534 if (iConfigAudioMute.bMute != pConfigMute->bMute) |
|
535 { |
|
536 iConfigAudioMute.bMute = pConfigMute->bMute; |
|
537 // This is an indication to the PortManager that the processing |
|
538 // function needs to get updated |
|
539 aUpdateProcessingFunction = ETrue; |
|
540 } |
|
541 |
|
542 } |
|
543 break; |
|
544 default: |
|
545 { |
|
546 // There's no need to try the parent indexes as we know there isn't any |
|
547 // other config in the parent audio classes |
|
548 return OMX_ErrorUnsupportedIndex; |
|
549 } |
|
550 }; |
|
551 |
|
552 return OMX_ErrorNone; |
|
553 } |
|
554 |
|
555 OMX_ERRORTYPE |
|
556 COmxILPcmRendererAPB0Port::GetExtensionIndex( |
|
557 OMX_STRING aParameterName, |
|
558 OMX_INDEXTYPE* apIndexType) const |
|
559 { |
|
560 DEBUG_PRINTF(_L8("COmxILPcmRendererAPB0Port::GetExtensionIndex")); |
|
561 |
|
562 TPtrC8 requestedParameterNamePtr( |
|
563 const_cast<const TUint8*>( |
|
564 reinterpret_cast<TUint8*>(aParameterName))); |
|
565 |
|
566 TPtrC8 parameterNamePtr( |
|
567 reinterpret_cast<const TUint8*>(sOmxSymbianPcmVolumeRamp)); |
|
568 |
|
569 if (requestedParameterNamePtr == parameterNamePtr) |
|
570 { |
|
571 *apIndexType = |
|
572 static_cast<OMX_INDEXTYPE>( |
|
573 OMX_SymbianIndexConfigAudioPcmVolumeRamp); |
|
574 |
|
575 return OMX_ErrorNone; |
|
576 } |
|
577 |
|
578 *apIndexType = OMX_IndexMax; |
|
579 return OMX_ErrorUnsupportedIndex; |
|
580 } |