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 #ifndef OMXIMPL_H |
|
17 #define OMXIMPL_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
|
21 |
|
22 |
|
23 class COmxComponentImpl : public CBase |
|
24 { |
|
25 public: |
|
26 COmxComponentImpl(OMX_HANDLETYPE hComponent); |
|
27 virtual ~COmxComponentImpl(); |
|
28 |
|
29 virtual OMX_ERRORTYPE GetComponentVersion( |
|
30 OMX_STRING pComponentName, |
|
31 OMX_VERSIONTYPE* pComponentVersion, |
|
32 OMX_VERSIONTYPE* pSpecVersion, |
|
33 OMX_UUIDTYPE* pComponentUUID)=0; |
|
34 |
|
35 virtual OMX_ERRORTYPE SendCommand( |
|
36 OMX_COMMANDTYPE Cmd, |
|
37 TUint32 nParam1, |
|
38 TAny* pCmdData)=0; |
|
39 virtual OMX_ERRORTYPE GetParameter( |
|
40 OMX_INDEXTYPE nParamIndex, |
|
41 TAny* ComponentParameterStructure)=0; |
|
42 virtual OMX_ERRORTYPE SetParameter( |
|
43 OMX_INDEXTYPE nIndex, |
|
44 TAny* ComponentParameterStructure)=0; |
|
45 virtual OMX_ERRORTYPE GetConfig( |
|
46 OMX_INDEXTYPE nIndex, |
|
47 TAny* value)=0; |
|
48 virtual OMX_ERRORTYPE SetConfig( |
|
49 OMX_INDEXTYPE nIndex, |
|
50 TAny* value)=0; |
|
51 virtual OMX_ERRORTYPE GetExtensionIndex( |
|
52 OMX_STRING ParameterName, |
|
53 OMX_INDEXTYPE* pIndexType)=0; |
|
54 virtual OMX_ERRORTYPE GetState( |
|
55 OMX_STATETYPE* pState)=0; |
|
56 virtual OMX_ERRORTYPE ComponentTunnelRequest( |
|
57 OMX_HANDLETYPE hInput, |
|
58 TUint32 nPortInput, |
|
59 OMX_HANDLETYPE hOutput, |
|
60 TUint32 nPortOutput, |
|
61 OMX_TUNNELSETUPTYPE* pTunnelSetup) = 0; |
|
62 virtual OMX_ERRORTYPE UseBuffer( |
|
63 OMX_BUFFERHEADERTYPE** ppBufferHdr, |
|
64 TUint32 nPortIndex, |
|
65 TAny* pAppPrivate, |
|
66 TUint32 nSizeBytes, |
|
67 TUint8* pBuffer)=0; |
|
68 virtual OMX_ERRORTYPE AllocateBuffer( |
|
69 OMX_BUFFERHEADERTYPE** pBuffer, |
|
70 TUint32 nPortIndex, |
|
71 TAny* pAppData, |
|
72 TUint32 nSizeBytes)=0; |
|
73 virtual OMX_ERRORTYPE FreeBuffer( |
|
74 TUint32 nPortIndex, |
|
75 OMX_BUFFERHEADERTYPE* pBuffer)=0; |
|
76 virtual OMX_ERRORTYPE EmptyThisBuffer( |
|
77 OMX_BUFFERHEADERTYPE* pBuffer)=0; |
|
78 virtual OMX_ERRORTYPE FillThisBuffer( |
|
79 OMX_BUFFERHEADERTYPE* pBuffer)=0; |
|
80 virtual OMX_ERRORTYPE SetCallbacks( |
|
81 OMX_CALLBACKTYPE* pCallbacks, |
|
82 TAny* pAppData)=0; |
|
83 virtual OMX_ERRORTYPE ComponentRoleEnum( |
|
84 OMX_OUT OMX_U8 *cRole, |
|
85 OMX_IN OMX_U32 nIndex)=0; |
|
86 |
|
87 operator OMX_HANDLETYPE(); |
|
88 |
|
89 private: |
|
90 OMX_COMPONENTTYPE* iHandle; |
|
91 }; |
|
92 |
|
93 |
|
94 #endif // OMXIMPL_H |
|