|
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 OMXILDUMMYBASEILIF_H |
|
17 #define OMXILDUMMYBASEILIF_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
|
21 |
|
22 #include "ilcomponentif.h" |
|
23 #include "momxilcomponentifobserver.h" |
|
24 |
|
25 /** |
|
26 Test component. |
|
27 Implementation of the generic parts of the MILIF API specific to OpenMAX IL specification when implemented as a plugin. |
|
28 */ |
|
29 class COmxILDummyBaseILIF : public CILComponentIf, |
|
30 public MOmxILComponentIfObserver |
|
31 { |
|
32 friend class COmxILDummyBasePortILIF; |
|
33 |
|
34 public: |
|
35 class CBody; |
|
36 |
|
37 public: |
|
38 |
|
39 // from MILComponentIf |
|
40 IMPORT_C void CreateComponentL(const TDesC8& aComponentName, MILIfObserver& aComponentIfObserver); |
|
41 IMPORT_C void CreateComponentL(const TUid& aUid, MILIfObserver& aComponentIfObserver); |
|
42 IMPORT_C void ReleaseComponent(); |
|
43 IMPORT_C TInt GetComponentInputPorts(RPointerArray<MILComponentPortIf>& aComponentPorts) const; |
|
44 IMPORT_C TInt GetComponentOutputPorts(RPointerArray<MILComponentPortIf>& aComponentPorts) const; |
|
45 IMPORT_C TInt SetConfig(const TILStruct& aConfig, const MILComponentPortIf* aComponentPort); |
|
46 IMPORT_C TInt GetConfig(TILStruct& aConfig, const MILComponentPortIf* aComponentPort) const; |
|
47 IMPORT_C TInt Initialize(); |
|
48 IMPORT_C TInt Execute(); |
|
49 IMPORT_C TInt Pause(); |
|
50 IMPORT_C TInt Stop(); |
|
51 IMPORT_C TInt UnInitialize(); |
|
52 IMPORT_C TInt GetState(TILComponentState& aState) const; |
|
53 IMPORT_C TInt SendCommand(const TILCommand& aCommand); |
|
54 IMPORT_C TInt FlushAllPorts(); |
|
55 IMPORT_C TInt ComponentRoleEnum(TPtr8& aComponentRole, TUint32 aIndex) const; |
|
56 IMPORT_C TInt GetComponentVersion(TILComponentVersion& aVersion) const; |
|
57 IMPORT_C TInt SetComponentIfRole(const TUid& aComponentRole); |
|
58 IMPORT_C TInt SetComponentIfRole(const TDesC8& aComponentRole); |
|
59 IMPORT_C TInt GetComponentIfRole(TUid& aComponentRole) const; |
|
60 IMPORT_C TInt GetComponentIfRole(TDes8& aComponentRole) const; |
|
61 IMPORT_C TInt SetExtConfig(const TDesC8& aParameterName, const TILStruct& aConfig, const MILComponentPortIf* aComponentPort); |
|
62 IMPORT_C TInt GetExtConfig(const TDesC8& aParameterName, TILStruct& aConfig, const MILComponentPortIf* aComponentPort) const; |
|
63 IMPORT_C TAny* CustomInterface(TUid aUid); |
|
64 |
|
65 // from MOmxILComponentIfObserver |
|
66 IMPORT_C TInt FillBufferDone(CMMFBuffer* aBuffer,TInt aPortIndex); |
|
67 IMPORT_C TInt EmptyBufferDone(const CMMFBuffer* aBuffer,TInt aPortIndex); |
|
68 IMPORT_C TInt EventHandler(OMX_EVENTTYPE aEvent, TUint32 aData1, TUint32 aData2, TAny* aExtraInfo); |
|
69 |
|
70 IMPORT_C ~COmxILDummyBaseILIF(); |
|
71 |
|
72 protected: |
|
73 IMPORT_C COmxILDummyBaseILIF(); |
|
74 |
|
75 IMPORT_C TInt OmxGetParameter(OMX_INDEXTYPE aParamIndex, TAny* aComponentParameterStructure) const; |
|
76 IMPORT_C TInt OmxSetParameter(OMX_INDEXTYPE aParamIndex, TAny* aComponentParameterStructure); |
|
77 IMPORT_C TInt OmxGetConfig(OMX_INDEXTYPE aConfigIndex, TAny* aValue) const; |
|
78 IMPORT_C TInt OmxSetConfig(OMX_INDEXTYPE aConfigIndex, TAny* aValue); |
|
79 IMPORT_C TInt OmxGetExtensionIndex(const TDesC8& aParameterName, OMX_INDEXTYPE* aIndexType) const; |
|
80 |
|
81 private: |
|
82 // Internal implementation. Only meant to be used by the component's port interface. |
|
83 TInt OmxSendCommand(OMX_COMMANDTYPE aCmd, TUint32 aParam1, TAny* aCmdData); |
|
84 TInt OmxComponentTunnelRequest(TUint32 aPortInput, OMX_HANDLETYPE aOutput, TUint32 aPortOutput); |
|
85 TInt OmxComponentDisconnectTunnel(TUint32 aPortInput, OMX_HANDLETYPE aOutput, TUint32 aPortOutput); |
|
86 TInt OmxUseBuffer(CMMFBuffer* aBuffer, TUint32 aPortIndex); |
|
87 CMMFBuffer* OmxAllocateBufferL(TUint32 aPortIndex, TUint32 aSizeBytes); |
|
88 TInt OmxFreeBuffer(CMMFBuffer* aBuffer); |
|
89 TInt OmxEmptyThisBuffer(const CMMFBuffer* aBuffer, MOmxILComponentIfObserver* aObserver); |
|
90 TInt OmxFillThisBuffer(CMMFBuffer* aBuffer, MOmxILComponentIfObserver* aObserver); |
|
91 OMX_COMPONENTTYPE* OmxHandle() const; |
|
92 |
|
93 private: |
|
94 CBody* iBody; |
|
95 }; |
|
96 |
|
97 #endif // OMXILDUMMYBASEILIF_H |
|
98 |