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