equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
19 /** |
19 /** |
20 @file |
20 @file |
21 @internalComponent |
21 @internalComponent |
22 */ |
22 */ |
23 #include <openmax/il/common/omxilspecversion.h> |
23 #include <openmax/il/common/omxilspecversion.h> |
|
24 #include <openmax/il/common/omxilconfigmanager.h> |
24 #include <openmax/il/common/omxilclientclockport.h> |
25 #include <openmax/il/common/omxilclientclockport.h> |
25 #include <openmax/il/loader/omxilsymbiancomponentif.h> |
26 #include <openmax/il/loader/omxilsymbiancomponentif.h> |
26 #include "log.h" |
27 #include "log.h" |
27 #include "omxilpcmrenderer.h" |
28 #include "omxilpcmrenderer.h" |
28 #include "omxilpcmrendererapb0port.h" |
29 #include "omxilpcmrendererapb0port.h" |
29 #include "omxilpcmrendererprocessingfunction.h" |
|
30 #include "omxilpcmrendererconfigmanager.h" |
|
31 #include "omxilpcmrenderer.hrh" |
30 #include "omxilpcmrenderer.hrh" |
32 |
31 |
33 |
32 |
34 const TUint8 COmxILPcmRenderer::iComponentVersionMajor; |
33 const TUint8 COmxILPcmRenderer::iComponentVersionMajor; |
35 const TUint8 COmxILPcmRenderer::iComponentVersionMinor; |
34 const TUint8 COmxILPcmRenderer::iComponentVersionMinor; |
105 1, // The number of other ports in this component |
104 1, // The number of other ports in this component |
106 KPCMRENDERER_OPB0PORT_INDEX // The starting other port index |
105 KPCMRENDERER_OPB0PORT_INDEX // The starting other port index |
107 ); |
106 ); |
108 |
107 |
109 // ...create PCM renderer component ports (no OPB0 port) |
108 // ...create PCM renderer component ports (no OPB0 port) |
110 COmxILPcmRendererAPB0Port* pb0Port = ConstructAPB0PortL(); |
109 COmxILPcmRendererProcessingFunction* ptr = static_cast<COmxILPcmRendererProcessingFunction*>(pProcessingFunction); |
|
110 COmxILPcmRendererAPB0Port* pb0Port = ConstructAPB0PortL(*ptr); |
111 CleanupStack::PushL(pb0Port); |
111 CleanupStack::PushL(pb0Port); |
112 |
112 |
113 // .. and add them to the port manager... |
113 // .. and add them to the port manager... |
114 User::LeaveIfError(AddPort(pb0Port, OMX_DirInput)); |
114 User::LeaveIfError(AddPort(pb0Port, OMX_DirInput)); |
115 CleanupStack::Pop(); //pb0Port |
115 CleanupStack::Pop(); //pb0Port |
116 |
116 |
117 User::LeaveIfError(AddPort(clientClockPort, OMX_DirInput)); |
117 User::LeaveIfError(AddPort(clientClockPort, OMX_DirInput)); |
121 // STEP 5: Create the non-port related configuration manager... |
121 // STEP 5: Create the non-port related configuration manager... |
122 RPointerArray<TDesC8> componentRoles; |
122 RPointerArray<TDesC8> componentRoles; |
123 CleanupClosePushL(componentRoles); |
123 CleanupClosePushL(componentRoles); |
124 User::LeaveIfError(componentRoles.Append(&KSymbianOmxILPcmRendererRole())); |
124 User::LeaveIfError(componentRoles.Append(&KSymbianOmxILPcmRendererRole())); |
125 |
125 |
126 COmxILConfigManager* pConfigManager = COmxILPcmRendererConfigManager::NewL( |
126 COmxILConfigManager* pConfigManager = COmxILConfigManager::NewL( |
127 *static_cast<COmxILPcmRendererProcessingFunction*>(pProcessingFunction), |
|
128 KSymbianOmxILPcmRendererName, |
127 KSymbianOmxILPcmRendererName, |
129 TOmxILVersion(iComponentVersionMajor, |
128 TOmxILVersion(iComponentVersionMajor, |
130 iComponentVersionMinor, |
129 iComponentVersionMinor, |
131 iComponentVersionRevision, |
130 iComponentVersionRevision, |
132 iComponentVersionStep), |
131 iComponentVersionStep), |
152 { |
151 { |
153 DEBUG_PRINTF(_L8("COmxILPcmRenderer::~COmxILPcmRenderer")); |
152 DEBUG_PRINTF(_L8("COmxILPcmRenderer::~COmxILPcmRenderer")); |
154 } |
153 } |
155 |
154 |
156 |
155 |
157 COmxILPcmRendererAPB0Port* COmxILPcmRenderer::ConstructAPB0PortL() const |
156 COmxILPcmRendererAPB0Port* COmxILPcmRenderer::ConstructAPB0PortL(COmxILPcmRendererProcessingFunction& aProcessingFunction) const |
158 { |
157 { |
159 DEBUG_PRINTF(_L8("COmxILPcmRenderer::ConstructAPB0PortL")); |
158 DEBUG_PRINTF(_L8("COmxILPcmRenderer::ConstructAPB0PortL")); |
160 |
159 |
161 RArray<OMX_AUDIO_CODINGTYPE> supportedAudioFormats; |
160 RArray<OMX_AUDIO_CODINGTYPE> supportedAudioFormats; |
162 CleanupClosePushL(supportedAudioFormats); |
161 CleanupClosePushL(supportedAudioFormats); |
205 |
204 |
206 COmxILPcmRendererAPB0Port* apb0Port = COmxILPcmRendererAPB0Port::NewL(portData, |
205 COmxILPcmRendererAPB0Port* apb0Port = COmxILPcmRendererAPB0Port::NewL(portData, |
207 supportedAudioFormats, |
206 supportedAudioFormats, |
208 paramPcmModeType, |
207 paramPcmModeType, |
209 configAudioVolume, |
208 configAudioVolume, |
210 configAudioMute); |
209 configAudioMute, |
|
210 aProcessingFunction); |
211 |
211 |
212 CleanupStack::PopAndDestroy(&supportedAudioFormats); |
212 CleanupStack::PopAndDestroy(&supportedAudioFormats); |
213 return apb0Port; |
213 return apb0Port; |
214 } |
214 } |
215 |
215 |