os/mm/mmdevicefw/mdf/src/openmax/omxoutputportbody.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2006-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 OMXOUTPUTPORTBODY_H
    17 #define OMXOUTPUTPORTBODY_H
    18 
    19 #include <mdf/mdfoutputport.h>
    20 #include <mdf/mdfinputport.h>
    21 #include <omxprocessingunit.h>
    22 #include <omxoutputport.h>
    23 class TPuConfig;
    24 class CMMFBuffer;
    25 class COmxProcessingUnit;
    26 class MMDFInputPort;
    27 
    28 class COmxOutputPort::CBody : public CBase,
    29 						public MOmxOutputPortCallbacks,
    30 						public MMdfInputPortObserver
    31 	{	
    32 public:	
    33 	// from MMdfOutputPort	
    34 	static CBody* NewL(TInt aIndex, COmxProcessingUnit* aComponent, COmxOutputPort* aParent);
    35 		
    36 	TInt MopConfigure(const TPuConfig&  aConfiguration);
    37 	TInt MopGetConfig(TPuConfig& aConfigurationSetup);
    38 	void MopInitialize();
    39 	void MopSetObserver(const MMdfOutputPortObserver& aOutputPortObserver);
    40 	CMMFBuffer* MopCreateBuffer(TInt aBufferSize);
    41 	TInt MopUseBuffer(CMMFBuffer& aBuffer);
    42 	TInt MopFreeBuffer(CMMFBuffer* aBuffer);
    43 	TInt MopTunnelRequest(const MMdfInputPort& aInputPortToBeConnectedTo,
    44 		TTunnelFlags& aTunnelFlags, TSupplierType& aSupplierType);
    45 	void MopReadData(CMMFBuffer& aBuffer);
    46 	void MopDisconnectTunnel();
    47 	void MopRestartTunnel();
    48 	TBool MopIsTunnelled() const;
    49 	TInt MopIndex() const;
    50 	TUint32 MopBufferSize() const;
    51 	TInt MopCreateCustomInterface(TUid aUid);
    52 	TAny* MopCustomInterface(TUid aUid);
    53 
    54 	// from MOmxOutputPortCallbacks
    55 	TInt FillBufferDone(OMX_HANDLETYPE hComponent, CMMFBuffer* pBuffer);
    56 
    57 	// From MMdfInputPortObserver
    58 	void MipoWriteDataComplete(const MMdfInputPort* aInputPort,
    59 		CMMFBuffer* aBuffer, TInt aErrorCode);
    60 	void MipoDisconnectTunnelComplete(const MMdfInputPort* aInputPort,
    61 		TInt aErrorCode);
    62 	void MipoRestartTunnelComplete(const MMdfInputPort* aInputPort,
    63 		TInt aErrorCode);
    64 
    65 	MMdfOutputPortObserver* Observer() const;
    66 	COmxProcessingUnit* Component() const;
    67 
    68 private:
    69 	CBody(TInt aIndex, COmxProcessingUnit* aComponent, COmxOutputPort* aParent);
    70 
    71 	TInt 					iPortIndex;
    72 	MMdfInputPort* 			iPortConnectedTo;
    73 	COmxProcessingUnit* 	iComponent;
    74 	MMdfOutputPortObserver*	iObserver;
    75 	TBool 					iStopped;
    76 	COmxOutputPort* 		iParent;
    77 	};
    78 
    79 #endif // OMXOUTPUTPORTBODY_H