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 // omxildummybaseifilbody.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef OMXILDUMMYBASEIFILBODY_H |
|
19 #define OMXILDUMMYBASEIFILBODY_H |
|
20 |
|
21 |
|
22 #include "omxildummybaseilif.h" |
|
23 #include "omxildummybaseportilif.h" |
|
24 #include "omxilgenericilifbodyimpl.h" |
|
25 #include <e32base.h> |
|
26 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
|
27 |
|
28 |
|
29 /** |
|
30 Body implementation of the COmxILDummyBaseILIF specific to OpenMAX specification. |
|
31 */ |
|
32 class COmxILDummyBaseILIF::CBody : public CBase |
|
33 { |
|
34 public: |
|
35 static CBody* NewL(COmxILDummyBaseILIF& aParent, |
|
36 MILIfObserver& aComponentIfObserver, |
|
37 const TDesC8& aComponentName); |
|
38 ~CBody(); |
|
39 |
|
40 OMX_COMPONENTTYPE* Handle() const; |
|
41 |
|
42 TInt OmxGetComponentVersion(TPtr8 aComponentName, OMX_VERSIONTYPE* aComponentVersion, OMX_VERSIONTYPE* aSpecVersion, OMX_UUIDTYPE* aComponentUUID); |
|
43 TInt OmxSendCommand(OMX_COMMANDTYPE aCmd, TUint32 aParam1, TAny* aCmdData); |
|
44 TInt OmxGetParameter(OMX_INDEXTYPE aParamIndex, TAny* aComponentParameterStructure); |
|
45 TInt OmxSetParameter(OMX_INDEXTYPE aIndex, TAny* aComponentParameterStructure); |
|
46 TInt OmxGetConfig(OMX_INDEXTYPE aIndex, TAny* aValue); |
|
47 TInt OmxSetConfig(OMX_INDEXTYPE aIndex, TAny* aValue); |
|
48 TInt OmxGetExtensionIndex(const TDesC8& aParameterName, OMX_INDEXTYPE* aIndexType); |
|
49 TInt OmxGetState(OMX_STATETYPE* aState); |
|
50 TInt OmxComponentTunnelRequest(TUint32 aPortInput, OMX_HANDLETYPE aOutput, TUint32 aPortOutput); |
|
51 TInt OmxComponentDisconnectTunnel(TUint32 aPortInput, OMX_HANDLETYPE aOutput, TUint32 aPortOutput); |
|
52 TInt OmxUseBuffer(CMMFBuffer* aBuffer, TUint32 aPortIndex); |
|
53 CMMFBuffer* OmxAllocateBufferL(TUint32 aPortIndex, TUint32 aSizeBytes); |
|
54 TInt OmxFreeBuffer(CMMFBuffer* aBuffer); |
|
55 TInt OmxEmptyThisBuffer(const CMMFBuffer* aBuffer, MOmxILComponentIfObserver* aObserver); |
|
56 TInt OmxFillThisBuffer(CMMFBuffer* aBuffer, MOmxILComponentIfObserver* aObserver); |
|
57 TInt OmxComponentRoleEnum(TPtr8& aComponentRole, TUint32 aIndex); |
|
58 |
|
59 TInt SetIfToRole(const TUid& aComponentRole); |
|
60 TInt GetIfRole(TUid& aComponentRole) const; |
|
61 |
|
62 TInt GetComponentPorts(RPointerArray<MILComponentPortIf>& aComponentPorts, OMX_DIRTYPE); |
|
63 TInt SetPortsL(); |
|
64 |
|
65 TInt FillBufferDone(CMMFBuffer* aBuffer, TInt aPortIndex); |
|
66 TInt EmptyBufferDone(const CMMFBuffer* aBuffer, TInt aPortIndex); |
|
67 TInt EventHandler(OMX_EVENTTYPE aEvent, TUint32 aData1, TUint32 aData2, TAny* aExtraInfo); |
|
68 |
|
69 private: |
|
70 CBody(COmxILDummyBaseILIF& aParent, MILIfObserver& aComponentIfObserver); |
|
71 void ConstructL(const TDesC8& aComponentName); |
|
72 |
|
73 private: |
|
74 |
|
75 OMX_COMPONENTTYPE* iHandle; |
|
76 |
|
77 RPointerArray<COmxILDummyBasePortILIF> iInputPorts; |
|
78 RPointerArray<COmxILDummyBasePortILIF> iOutputPorts; |
|
79 |
|
80 COmxBufferManager* iBufferManager; |
|
81 COmxCallbacks* iCallbacks; |
|
82 |
|
83 COmxILDummyBaseILIF& iParent; |
|
84 MILIfObserver& iIfObserver; |
|
85 |
|
86 TUid iFormat; |
|
87 }; |
|
88 |
|
89 #endif // OMXILDUMMYBASEIFILBODY_H |
|
90 |
|