os/mm/mmdevicefw/mdf/inc/openmax/omxoutputport.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 /**
    17  @file
    18  @publishedPartner
    19  @released
    20 */
    21 
    22 #ifndef OMXOUTPUTPORT_H
    23 #define OMXOUTPUTPORT_H
    24 
    25 #include <mdf/mdfoutputport.h>
    26 #include <mdf/mdfinputport.h>
    27 #include <omxprocessingunit.h>
    28 class TPuConfig;
    29 class CMMFBuffer;
    30 class COmxProcessingUnit;
    31 class MMDFInputPort;
    32 
    33 /**
    34 Base class for OpenMAX Output Ports.
    35 */
    36 class COmxOutputPort :  public CBase,
    37 						public MMdfOutputPort,
    38 						public MMdfInputPortObserver
    39 	{	
    40 public:
    41 	class CBody;
    42 public:	
    43 	// from MMdfOutputPort		
    44 	IMPORT_C TInt MopConfigure(const TPuConfig&  aConfiguration);
    45 	IMPORT_C TInt MopGetConfig(TPuConfig& aConfigurationSetup);
    46 	IMPORT_C void MopInitialize();
    47 	IMPORT_C void MopSetObserver(const MMdfOutputPortObserver& aOutputPortObserver);
    48 	IMPORT_C CMMFBuffer* MopCreateBuffer(TInt aBufferSize);
    49 	IMPORT_C TInt MopUseBuffer(CMMFBuffer& aBuffer);
    50 	IMPORT_C TInt MopFreeBuffer(CMMFBuffer* aBuffer);
    51 	IMPORT_C TInt MopTunnelRequest(const MMdfInputPort& aInputPortToBeConnectedTo,
    52 		TTunnelFlags& aTunnelFlags, TSupplierType& aSupplierType);
    53 	IMPORT_C void MopReadData(CMMFBuffer& aBuffer);
    54 	IMPORT_C void MopDisconnectTunnel();
    55 	IMPORT_C void MopRestartTunnel();
    56 	IMPORT_C TBool MopIsTunnelled() const;
    57 	IMPORT_C TInt MopIndex() const;
    58 	IMPORT_C TUint32 MopBufferSize() const;
    59 	IMPORT_C TInt MopCreateCustomInterface(TUid aUid);
    60 	IMPORT_C TAny* MopCustomInterface(TUid aUid);
    61 	
    62 	// From MMdfInputPortObserver
    63 	IMPORT_C void MipoWriteDataComplete(const MMdfInputPort* aInputPort,
    64 		CMMFBuffer* aBuffer, TInt aErrorCode);
    65 	IMPORT_C void MipoDisconnectTunnelComplete(const MMdfInputPort* aInputPort,
    66 		TInt aErrorCode);
    67 	IMPORT_C void MipoRestartTunnelComplete(const MMdfInputPort* aInputPort,
    68 		TInt aErrorCode);
    69 
    70 protected:
    71 	IMPORT_C COmxOutputPort();
    72 	IMPORT_C void ConstructL(TInt aIndex, COmxProcessingUnit* aComponent);
    73 	IMPORT_C ~COmxOutputPort();
    74 	IMPORT_C MMdfOutputPortObserver* Observer() const;
    75 	IMPORT_C COmxProcessingUnit* Component() const;
    76 
    77 private:
    78 	CBody* iBody;
    79 	};
    80 
    81 #endif // OMXOUTPUTPORT_H