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