os/mm/mmdevicefw/mdf/inc/codecapi/mdfpuloader.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) 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 /**
    17  @file
    18  @publishedPartner
    19  @released
    20 */
    21 
    22 #ifndef MDFPULOADER_H
    23 #define MDFPULOADER_H
    24 
    25 #include <e32base.h>
    26 class MMdfInputPort;
    27 class MMdfOutputPort;
    28 class CMdfProcessingUnit;
    29 class MMdfProcessingUnitObserver;
    30 class TFourCC;
    31 
    32 /**
    33 Utility class used by the HwDevice to load Processing Units.
    34 */
    35 class CMdfPuLoader : public CBase
    36 	{
    37 public:
    38 	/**
    39 	Constructs an instance of the ECom plugin.
    40 	@param	aImplementationUid
    41 			ECom implementation UID.
    42 	@return	A pointer to the newly constructed object
    43 	*/
    44 	inline static CMdfPuLoader* NewL(TUid aImplementationUid);
    45 	
    46 	/**
    47 	Loads a Processing Unit using a UID synchronously.
    48 	@param	aProcessingUnitObserver
    49 			The observer for the newly loaded Processing Unit.
    50 	@param	aImplementationUid
    51 			ECom implementation UID.
    52 	@return  A pointer to the newly loaded Processing Unit.
    53 	*/
    54 	virtual CMdfProcessingUnit* LoadProcessingUnitL(const MMdfProcessingUnitObserver& aProcessingUnitObserver, 
    55 		TUid aImplementationUid) = 0;
    56 
    57 	/**
    58 	Loads an audio Processing Unit synchronously.  The Processing Unit is
    59 	resolved according to the source and destination data types provided.
    60 	@param	aProcessingUnitObserver
    61 			The observer for the newly loaded Processing Unit.
    62 	@param	aSrcDataType
    63 			The source data type.
    64 	@param	aDestDataType
    65 			The destination data type.
    66 	@return	A pointer to the newly loaded Processing Unit.	   
    67 	*/
    68 	virtual CMdfProcessingUnit* LoadProcessingUnitL( const MMdfProcessingUnitObserver& aProcessingUnitObserver, 
    69 		TFourCC aSrcDataType, TFourCC aDestDataType) = 0;
    70 	
    71 
    72 	/**
    73 	Loads a video Processing Unit synchronously.  The Processing Unit is
    74 	resolved according to the source and destination data types provided.
    75 	@param	aProcessingUnitObserver
    76 			The observer for the newly loaded Processing Unit.
    77 	@param	aSrcDataType
    78 			The source data type.
    79 	@param	aDestDataType
    80 			The destination data type.
    81 	@param	aImplementationType
    82 			The implementation type. Can be audio, video encoding or video decoding.
    83 	@return	A pointer to the newly loaded Processing Unit.	   
    84 	*/
    85 	virtual CMdfProcessingUnit* LoadProcessingUnitL( const MMdfProcessingUnitObserver& aProcessingUnitObserver, 
    86 		const TDesC8& aSrcDataType, const TDesC8& aDestDataType, const TUid& aImplementationType) = 0;
    87 
    88 	
    89 	/**
    90 	Attempts to set-up a tunnel from a given output port to an input port.  
    91 	The data flow is from the output port to the input port.  This method is synchronous.
    92 	@param	aOutputPort
    93 			The output port of the tunnel.
    94 	@param	aInputPort
    95 			The input port of the tunnel.
    96 	@return	An error code indicating if the function call was successful. KErrNone on success, otherwise
    97 			another of the system-wide error codes.	  
    98 	*/
    99 	virtual TInt TunnelSetup(MMdfOutputPort& aOutputPort, MMdfInputPort& aInputPort) = 0;
   100 	
   101 	/**
   102 	Unloads a Processing Unit synchronously.
   103 	@param	aPu
   104 			The pointer to the Processing Unit to be unloaded.
   105 	*/
   106 	virtual void UnloadProcessingUnit(CMdfProcessingUnit*& aPu) = 0;
   107 	
   108 	/**
   109 	Standard destructor.
   110 	*/
   111 	virtual inline ~CMdfPuLoader();
   112 private:
   113 	TUid iDtor_ID_Key;
   114 	};
   115 
   116 #include <mdf/mdfpuloader.inl>
   117 #endif // MDFPULOADER_H