|
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 #ifndef OMXILCOMPONENT_H |
|
23 #define OMXILCOMPONENT_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
|
27 |
|
28 |
|
29 // forward declarations |
|
30 class COmxILFsm; |
|
31 class COmxILConfigManager; |
|
32 class MOmxILCallbackManagerIf; |
|
33 class COmxILPortManager; |
|
34 class COmxILProcessingFunction; |
|
35 |
|
36 |
|
37 class COmxILComponent : public CBase |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 IMPORT_C virtual ~COmxILComponent(); |
|
43 |
|
44 static OMX_ERRORTYPE GetComponentVersion( |
|
45 OMX_HANDLETYPE aComponent, |
|
46 OMX_STRING aComponentName, |
|
47 OMX_VERSIONTYPE* apComponentVersion, |
|
48 OMX_VERSIONTYPE* apSpecVersion, |
|
49 OMX_UUIDTYPE* apComponentUUID); |
|
50 |
|
51 static OMX_ERRORTYPE SendCommand( |
|
52 OMX_HANDLETYPE aComponent, |
|
53 OMX_COMMANDTYPE aCmd, |
|
54 OMX_U32 aParam1, |
|
55 OMX_PTR aCmdData); |
|
56 |
|
57 static OMX_ERRORTYPE GetParameter( |
|
58 OMX_HANDLETYPE aComponent, |
|
59 OMX_INDEXTYPE aParamIndex, |
|
60 OMX_PTR aComponentParameterStructure); |
|
61 |
|
62 static OMX_ERRORTYPE SetParameter( |
|
63 OMX_HANDLETYPE aComponent, |
|
64 OMX_INDEXTYPE aIndex, |
|
65 OMX_PTR aComponentParameterStructure); |
|
66 |
|
67 static OMX_ERRORTYPE GetConfig( |
|
68 OMX_HANDLETYPE aComponent, |
|
69 OMX_INDEXTYPE aIndex, |
|
70 OMX_PTR aComponentConfigStructure); |
|
71 |
|
72 static OMX_ERRORTYPE SetConfig( |
|
73 OMX_HANDLETYPE aComponent, |
|
74 OMX_INDEXTYPE aIndex, |
|
75 OMX_PTR aComponentConfigStructure); |
|
76 |
|
77 static OMX_ERRORTYPE GetExtensionIndex( |
|
78 OMX_HANDLETYPE aComponent, |
|
79 OMX_STRING aParameterName, |
|
80 OMX_INDEXTYPE* aIndexType); |
|
81 |
|
82 static OMX_ERRORTYPE GetState( |
|
83 OMX_HANDLETYPE aComponent, |
|
84 OMX_STATETYPE* aState); |
|
85 |
|
86 static OMX_ERRORTYPE ComponentTunnelRequest( |
|
87 OMX_HANDLETYPE aComp, |
|
88 OMX_U32 aPort, |
|
89 OMX_HANDLETYPE aTunneledComp, |
|
90 OMX_U32 aTunneledPort, |
|
91 OMX_TUNNELSETUPTYPE* aTunnelSetup); |
|
92 |
|
93 static OMX_ERRORTYPE UseBuffer( |
|
94 OMX_HANDLETYPE aComponent, |
|
95 OMX_BUFFERHEADERTYPE** appBufferHdr, |
|
96 OMX_U32 aPortIndex, |
|
97 OMX_PTR apAppPrivate, |
|
98 OMX_U32 aSizeBytes, |
|
99 OMX_U8* aBuffer); |
|
100 |
|
101 static OMX_ERRORTYPE AllocateBuffer( |
|
102 OMX_HANDLETYPE aComponent, |
|
103 OMX_BUFFERHEADERTYPE** apBuffer, |
|
104 OMX_U32 aPortIndex, |
|
105 OMX_PTR aAppData, |
|
106 OMX_U32 aSizeBytes); |
|
107 |
|
108 static OMX_ERRORTYPE FreeBuffer( |
|
109 OMX_HANDLETYPE aComponent, |
|
110 OMX_U32 aPortIndex, |
|
111 OMX_BUFFERHEADERTYPE* aBuffer); |
|
112 |
|
113 static OMX_ERRORTYPE EmptyThisBuffer( |
|
114 OMX_HANDLETYPE aComponent, |
|
115 OMX_BUFFERHEADERTYPE* aBuffer); |
|
116 |
|
117 static OMX_ERRORTYPE FillThisBuffer( |
|
118 OMX_HANDLETYPE aComponent, |
|
119 OMX_BUFFERHEADERTYPE* aBuffer); |
|
120 |
|
121 static OMX_ERRORTYPE SetCallbacks( |
|
122 OMX_HANDLETYPE aComponent, |
|
123 OMX_CALLBACKTYPE* aCallbacks, |
|
124 OMX_PTR aAppData); |
|
125 |
|
126 static OMX_ERRORTYPE ComponentDeInit( |
|
127 OMX_HANDLETYPE aComponent); |
|
128 |
|
129 static OMX_ERRORTYPE UseEGLImage( |
|
130 OMX_HANDLETYPE aComponent, |
|
131 OMX_BUFFERHEADERTYPE** appBufferHdr, |
|
132 OMX_U32 aPortIndex, |
|
133 OMX_PTR aAppPrivate, |
|
134 void* eglImage); |
|
135 |
|
136 static OMX_ERRORTYPE ComponentRoleEnum( |
|
137 OMX_HANDLETYPE aComponent, |
|
138 OMX_U8* aRole, |
|
139 OMX_U32 aIndex); |
|
140 |
|
141 IMPORT_C static OMX_ERRORTYPE SymbianErrorToGetHandleError(TInt aSymbianError); |
|
142 |
|
143 protected: |
|
144 |
|
145 IMPORT_C COmxILComponent(); |
|
146 |
|
147 IMPORT_C void InitComponentL(); |
|
148 |
|
149 protected: |
|
150 |
|
151 RBuf8 iComponentName; |
|
152 |
|
153 OMX_COMPONENTTYPE* ipHandle; |
|
154 OMX_PTR ipAppData; |
|
155 OMX_CALLBACKTYPE* ipCallbacks; |
|
156 |
|
157 COmxILFsm* ipFsm; |
|
158 COmxILConfigManager* ipConfigManager; |
|
159 MOmxILCallbackManagerIf* ipCallbackManager; |
|
160 COmxILPortManager* ipPortManager; |
|
161 COmxILProcessingFunction* ipProcessingFunction; |
|
162 |
|
163 }; |
|
164 |
|
165 #endif // OMXILCOMPONENT_H |