|
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 OMXILDUMMYAUDIODEC_H |
|
17 #define OMXILDUMMYAUDIODEC_H |
|
18 |
|
19 #include "omximpl.h" |
|
20 |
|
21 // Test component. Dummy omx il decoder used by the MILIF test suite. |
|
22 class COmxIlDummyAudioDec : public COmxComponentImpl |
|
23 { |
|
24 public: |
|
25 friend class CCodecDummyProcessor; |
|
26 friend class CCodecCallbacks; |
|
27 |
|
28 static TInt CreateComponent(OMX_HANDLETYPE hComponent); |
|
29 ~COmxIlDummyAudioDec(); |
|
30 |
|
31 OMX_ERRORTYPE GetComponentVersion( |
|
32 OMX_STRING pComponentName, |
|
33 OMX_VERSIONTYPE* pComponentVersion, |
|
34 OMX_VERSIONTYPE* pSpecVersion, |
|
35 OMX_UUIDTYPE* pComponentUUID); |
|
36 OMX_ERRORTYPE SendCommand( |
|
37 OMX_COMMANDTYPE Cmd, |
|
38 TUint32 nParam1, |
|
39 TAny* pCmdData); |
|
40 OMX_ERRORTYPE GetParameter( |
|
41 OMX_INDEXTYPE nParamIndex, |
|
42 TAny* ComponentParameterStructure); |
|
43 OMX_ERRORTYPE SetParameter( |
|
44 OMX_INDEXTYPE nIndex, |
|
45 TAny* ComponentParameterStructure); |
|
46 OMX_ERRORTYPE GetConfig( |
|
47 OMX_INDEXTYPE nIndex, |
|
48 TAny* value); |
|
49 OMX_ERRORTYPE SetConfig( |
|
50 OMX_INDEXTYPE nIndex, |
|
51 TAny* value); |
|
52 OMX_ERRORTYPE GetExtensionIndex( |
|
53 OMX_STRING ParameterName, |
|
54 OMX_INDEXTYPE* pIndexType); |
|
55 OMX_ERRORTYPE GetState( |
|
56 OMX_STATETYPE* pState); |
|
57 OMX_ERRORTYPE ComponentTunnelRequest( |
|
58 OMX_HANDLETYPE hInput, |
|
59 TUint32 nInputPort, |
|
60 OMX_HANDLETYPE hOutput, |
|
61 TUint32 nOutputPort, |
|
62 OMX_TUNNELSETUPTYPE* pTunnelSetup); |
|
63 virtual OMX_ERRORTYPE UseBuffer( |
|
64 OMX_BUFFERHEADERTYPE** pBufferHdr, |
|
65 TUint32 nPortIndex, |
|
66 TAny* pAppPrivate, |
|
67 TUint32 nSizeBytes, |
|
68 TUint8* pBuffer); |
|
69 virtual OMX_ERRORTYPE AllocateBuffer( |
|
70 OMX_BUFFERHEADERTYPE** pBuffer, |
|
71 TUint32 nPortIndex, |
|
72 TAny* pAppData, |
|
73 TUint32 nSizeBytes); |
|
74 OMX_ERRORTYPE FreeBuffer( |
|
75 TUint32 nPortIndex, |
|
76 OMX_BUFFERHEADERTYPE* pBuffer); |
|
77 OMX_ERRORTYPE EmptyThisBuffer( |
|
78 OMX_BUFFERHEADERTYPE* pBuffer); |
|
79 OMX_ERRORTYPE FillThisBuffer( |
|
80 OMX_BUFFERHEADERTYPE* pBuffer); |
|
81 OMX_ERRORTYPE SetCallbacks( |
|
82 OMX_CALLBACKTYPE* pCallbacks, |
|
83 TAny* pAppData); |
|
84 OMX_ERRORTYPE ComponentRoleEnum( |
|
85 OMX_OUT OMX_U8 *cRole, |
|
86 OMX_IN OMX_U32 nIndex); |
|
87 |
|
88 |
|
89 void EventHandlerCallback( |
|
90 OMX_EVENTTYPE eEvent, |
|
91 TUint32 nData1, |
|
92 TUint32 nData2, |
|
93 OMX_STRING cExtraInfo); |
|
94 void FillBufferDoneCallback(OMX_BUFFERHEADERTYPE* pBuffer); |
|
95 void EmptyBufferDoneCallback(OMX_BUFFERHEADERTYPE* pBuffer); |
|
96 |
|
97 private: |
|
98 COmxIlDummyAudioDec(OMX_HANDLETYPE hComponent); |
|
99 |
|
100 private: |
|
101 OMX_CALLBACKTYPE* iCallback; |
|
102 TAny* iAppData; |
|
103 OMX_STATETYPE iState; |
|
104 |
|
105 TInt iBufferCountActual0; |
|
106 TInt iBufferCountActual1; |
|
107 }; |
|
108 |
|
109 #endif // OMXILDUMMYAUDIODEC_H |