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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef OMXOUTPUTPORTBODY_H
17 #define OMXOUTPUTPORTBODY_H
19 #include <mdf/mdfoutputport.h>
20 #include <mdf/mdfinputport.h>
21 #include <omxprocessingunit.h>
22 #include <omxoutputport.h>
25 class COmxProcessingUnit;
28 class COmxOutputPort::CBody : public CBase,
29 public MOmxOutputPortCallbacks,
30 public MMdfInputPortObserver
33 // from MMdfOutputPort
34 static CBody* NewL(TInt aIndex, COmxProcessingUnit* aComponent, COmxOutputPort* aParent);
36 TInt MopConfigure(const TPuConfig& aConfiguration);
37 TInt MopGetConfig(TPuConfig& aConfigurationSetup);
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);
54 // from MOmxOutputPortCallbacks
55 TInt FillBufferDone(OMX_HANDLETYPE hComponent, CMMFBuffer* pBuffer);
57 // From MMdfInputPortObserver
58 void MipoWriteDataComplete(const MMdfInputPort* aInputPort,
59 CMMFBuffer* aBuffer, TInt aErrorCode);
60 void MipoDisconnectTunnelComplete(const MMdfInputPort* aInputPort,
62 void MipoRestartTunnelComplete(const MMdfInputPort* aInputPort,
65 MMdfOutputPortObserver* Observer() const;
66 COmxProcessingUnit* Component() const;
69 CBody(TInt aIndex, COmxProcessingUnit* aComponent, COmxOutputPort* aParent);
72 MMdfInputPort* iPortConnectedTo;
73 COmxProcessingUnit* iComponent;
74 MMdfOutputPortObserver* iObserver;
76 COmxOutputPort* iParent;
79 #endif // OMXOUTPUTPORTBODY_H