sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef OMXOUTPUTPORTBODY_H sl@0: #define OMXOUTPUTPORTBODY_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: class TPuConfig; sl@0: class CMMFBuffer; sl@0: class COmxProcessingUnit; sl@0: class MMDFInputPort; sl@0: sl@0: class COmxOutputPort::CBody : public CBase, sl@0: public MOmxOutputPortCallbacks, sl@0: public MMdfInputPortObserver sl@0: { sl@0: public: sl@0: // from MMdfOutputPort sl@0: static CBody* NewL(TInt aIndex, COmxProcessingUnit* aComponent, COmxOutputPort* aParent); sl@0: sl@0: TInt MopConfigure(const TPuConfig& aConfiguration); sl@0: TInt MopGetConfig(TPuConfig& aConfigurationSetup); sl@0: void MopInitialize(); sl@0: void MopSetObserver(const MMdfOutputPortObserver& aOutputPortObserver); sl@0: CMMFBuffer* MopCreateBuffer(TInt aBufferSize); sl@0: TInt MopUseBuffer(CMMFBuffer& aBuffer); sl@0: TInt MopFreeBuffer(CMMFBuffer* aBuffer); sl@0: TInt MopTunnelRequest(const MMdfInputPort& aInputPortToBeConnectedTo, sl@0: TTunnelFlags& aTunnelFlags, TSupplierType& aSupplierType); sl@0: void MopReadData(CMMFBuffer& aBuffer); sl@0: void MopDisconnectTunnel(); sl@0: void MopRestartTunnel(); sl@0: TBool MopIsTunnelled() const; sl@0: TInt MopIndex() const; sl@0: TUint32 MopBufferSize() const; sl@0: TInt MopCreateCustomInterface(TUid aUid); sl@0: TAny* MopCustomInterface(TUid aUid); sl@0: sl@0: // from MOmxOutputPortCallbacks sl@0: TInt FillBufferDone(OMX_HANDLETYPE hComponent, CMMFBuffer* pBuffer); sl@0: sl@0: // From MMdfInputPortObserver sl@0: void MipoWriteDataComplete(const MMdfInputPort* aInputPort, sl@0: CMMFBuffer* aBuffer, TInt aErrorCode); sl@0: void MipoDisconnectTunnelComplete(const MMdfInputPort* aInputPort, sl@0: TInt aErrorCode); sl@0: void MipoRestartTunnelComplete(const MMdfInputPort* aInputPort, sl@0: TInt aErrorCode); sl@0: sl@0: MMdfOutputPortObserver* Observer() const; sl@0: COmxProcessingUnit* Component() const; sl@0: sl@0: private: sl@0: CBody(TInt aIndex, COmxProcessingUnit* aComponent, COmxOutputPort* aParent); sl@0: sl@0: TInt iPortIndex; sl@0: MMdfInputPort* iPortConnectedTo; sl@0: COmxProcessingUnit* iComponent; sl@0: MMdfOutputPortObserver* iObserver; sl@0: TBool iStopped; sl@0: COmxOutputPort* iParent; sl@0: }; sl@0: sl@0: #endif // OMXOUTPUTPORTBODY_H