|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 /** |
|
18 @file |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #include <e32cmn.h> |
|
23 #include <openmax/il/khronos/v1_x/OMX_Core.h> |
|
24 |
|
25 #include "log.h" |
|
26 #include <openmax/il/common/omxilconfigmanager.h> |
|
27 #include <openmax/il/common/omxilspecversion.h> |
|
28 #include <openmax/il/common/omxilutil.h> |
|
29 #include "omxilportmanagerif.h" |
|
30 #include "omxilconfigmanagerimpl.h" |
|
31 |
|
32 EXPORT_C COmxILConfigManager* |
|
33 COmxILConfigManager::NewL( |
|
34 const TDesC8& aComponentName, |
|
35 const OMX_VERSIONTYPE& aComponentVersion, |
|
36 const RPointerArray<TDesC8>& aComponentRoleList) |
|
37 { |
|
38 DEBUG_PRINTF(_L8("COmxILConfigManager::NewL")); |
|
39 __ASSERT_DEBUG(aComponentName.Length() && aComponentRoleList.Count(), |
|
40 User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
41 |
|
42 COmxILConfigManager* self = new (ELeave)COmxILConfigManager(); |
|
43 CleanupStack::PushL(self); |
|
44 self->ConstructL(aComponentName, |
|
45 aComponentVersion, |
|
46 aComponentRoleList); |
|
47 CleanupStack::Pop(self); |
|
48 return self; |
|
49 |
|
50 } |
|
51 |
|
52 EXPORT_C void |
|
53 COmxILConfigManager::ConstructL(const TDesC8& aComponentName, |
|
54 const OMX_VERSIONTYPE& aComponentVersion, |
|
55 const RPointerArray<TDesC8>& aComponentRoleList) |
|
56 { |
|
57 DEBUG_PRINTF(_L8("COmxILConfigManager::ConstructL")); |
|
58 ipConfigManagerImpl=COmxILConfigManagerImpl::NewL(aComponentName, |
|
59 aComponentVersion, |
|
60 aComponentRoleList); |
|
61 } |
|
62 |
|
63 EXPORT_C |
|
64 COmxILConfigManager::COmxILConfigManager() |
|
65 { |
|
66 DEBUG_PRINTF(_L8("COmxILConfigManager::COmxILConfigManager")); |
|
67 } |
|
68 |
|
69 EXPORT_C |
|
70 COmxILConfigManager::~COmxILConfigManager() |
|
71 { |
|
72 DEBUG_PRINTF(_L8("COmxILConfigManager::~COmxILConfigManager")); |
|
73 |
|
74 delete ipConfigManagerImpl; |
|
75 } |
|
76 |
|
77 OMX_ERRORTYPE |
|
78 COmxILConfigManager::GetComponentVersion(OMX_STRING aComponentName, |
|
79 OMX_VERSIONTYPE* apComponentVersion, |
|
80 OMX_VERSIONTYPE* apSpecVersion, |
|
81 OMX_UUIDTYPE* apComponentUUID) const |
|
82 { |
|
83 DEBUG_PRINTF(_L8("COmxILConfigManager::GetComponentVersion")); |
|
84 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
85 return ipConfigManagerImpl->GetComponentVersion(aComponentName, |
|
86 apComponentVersion, |
|
87 apSpecVersion, |
|
88 apComponentUUID); |
|
89 } |
|
90 |
|
91 EXPORT_C OMX_ERRORTYPE |
|
92 COmxILConfigManager::GetParameter(OMX_INDEXTYPE aParamIndex, |
|
93 TAny* apComponentParameterStructure) const |
|
94 { |
|
95 DEBUG_PRINTF(_L8("COmxILConfigManager::GetParameter")); |
|
96 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
97 return ipConfigManagerImpl->GetParameter(aParamIndex, apComponentParameterStructure); |
|
98 } |
|
99 |
|
100 EXPORT_C OMX_ERRORTYPE |
|
101 COmxILConfigManager::SetParameter(OMX_INDEXTYPE aParamIndex, |
|
102 const TAny* apComponentParameterStructure, |
|
103 OMX_BOOL aInitTime /* = OMX_TRUE */) |
|
104 { |
|
105 DEBUG_PRINTF(_L8("COmxILConfigManager::SetParameter")); |
|
106 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
107 return ipConfigManagerImpl->SetParameter(aParamIndex, apComponentParameterStructure, aInitTime); |
|
108 } |
|
109 |
|
110 EXPORT_C OMX_ERRORTYPE |
|
111 COmxILConfigManager::GetConfig(OMX_INDEXTYPE aConfigIndex, |
|
112 TAny* apComponentConfigStructure) const |
|
113 { |
|
114 DEBUG_PRINTF(_L8("COmxILConfigManager::GetConfig")); |
|
115 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
116 return ipConfigManagerImpl->GetConfig(aConfigIndex, apComponentConfigStructure); |
|
117 } |
|
118 |
|
119 EXPORT_C OMX_ERRORTYPE |
|
120 COmxILConfigManager::SetConfig(OMX_INDEXTYPE aConfigIndex, |
|
121 const TAny* apComponentConfigStructure) |
|
122 |
|
123 { |
|
124 DEBUG_PRINTF(_L8("COmxILConfigManager::SetConfig")); |
|
125 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
126 return ipConfigManagerImpl->SetConfig(aConfigIndex, apComponentConfigStructure); |
|
127 } |
|
128 |
|
129 EXPORT_C OMX_ERRORTYPE |
|
130 COmxILConfigManager::GetExtensionIndex( |
|
131 OMX_STRING /*aParameterName*/, |
|
132 OMX_INDEXTYPE* /*apIndexType*/) const |
|
133 { |
|
134 DEBUG_PRINTF(_L8("COmxILConfigManager::GetExtensionIndex")); |
|
135 |
|
136 // No custom index here for now... |
|
137 return OMX_ErrorUnsupportedIndex; |
|
138 } |
|
139 |
|
140 OMX_ERRORTYPE |
|
141 COmxILConfigManager::ComponentRoleEnum(OMX_U8* aRole, |
|
142 OMX_U32 aIndex) const |
|
143 { |
|
144 DEBUG_PRINTF(_L8("COmxILConfigManager::ComponentRoleEnum")); |
|
145 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
146 return ipConfigManagerImpl->ComponentRoleEnum(aRole, aIndex); |
|
147 } |
|
148 |
|
149 void COmxILConfigManager::SetPortManager(MOmxILPortManagerIf* aPortManager) |
|
150 { |
|
151 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
152 return ipConfigManagerImpl->SetPortManager(aPortManager); |
|
153 } |
|
154 EXPORT_C |
|
155 void COmxILConfigManager::InsertParamIndexL(TUint aParamIndex) |
|
156 { |
|
157 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
158 return ipConfigManagerImpl->InsertParamIndexL(aParamIndex); |
|
159 } |
|
160 EXPORT_C |
|
161 TInt COmxILConfigManager::FindParamIndex(TUint aParamIndex) const |
|
162 { |
|
163 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
164 return ipConfigManagerImpl->FindParamIndex(aParamIndex); |
|
165 } |
|
166 EXPORT_C |
|
167 void COmxILConfigManager::InsertConfigIndexL(TUint aConfigIndex) |
|
168 { |
|
169 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
170 return ipConfigManagerImpl->InsertConfigIndexL(aConfigIndex); |
|
171 } |
|
172 EXPORT_C |
|
173 TInt COmxILConfigManager::FindConfigIndex(TUint aConfigIndex) const |
|
174 { |
|
175 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
176 return ipConfigManagerImpl->FindConfigIndex(aConfigIndex); |
|
177 } |
|
178 |
|
179 RArray<TUint>& COmxILConfigManager::ManagedParamIndexes() |
|
180 { |
|
181 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
182 return ipConfigManagerImpl->ManagedParamIndexes(); |
|
183 } |
|
184 EXPORT_C |
|
185 RArray<TUint>& COmxILConfigManager::ManagedConfigIndexes() |
|
186 { |
|
187 __ASSERT_ALWAYS(ipConfigManagerImpl, User::Panic(KOmxILConfigManagerPanicCategory, 1)); |
|
188 return ipConfigManagerImpl->ManagedConfigIndexes(); |
|
189 } |
|
190 EXPORT_C |
|
191 TInt COmxILConfigManager::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1) |
|
192 { |
|
193 return CBase::Extension_(aExtensionId, a0, a1); |
|
194 } |