os/mm/mmhais/videohai/devvideo/inc/devvideointernal.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) 2003-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 __DEVVIDEOINTERNAL_H__
    17 #define __DEVVIDEOINTERNAL_H__
    18 
    19 #include <e32base.h>
    20 #include <ecom/ecom.h>
    21 
    22 /**
    23 Static utilities class.
    24 @internalComponent
    25 */
    26 class DevVideoUtilities
    27 	{
    28 public:
    29 	/** 
    30 	Convert a text number into a real number using lexical analysis
    31 	*/
    32 	static TInt ConvertTextToTUint32(const TDesC8& aData, TUint32& aNumber);
    33 
    34 	/**
    35 	Inspect the plugin implementation information objects to see if the required pre/post proc type is supported. 
    36 	If so, the UID of the plugin is appended to aMatchingPlugins
    37 	*/
    38 	static void MatchPrePostProcessorCapabilitiesL(const RImplInfoPtrArray& aPlugins, TUint32 aReqPrePostProcType, RArray<TUid>& aMatchingPlugins);
    39 
    40 	/**
    41 	Select a plug-in that supports the mime type. If a plug-in does not support the mime type it is removed
    42 	from the array and deleted. Therefore after a call to this method "aImplInfoArray" contains only plug-in
    43 	that support the supplied mime type or is null if none was found.
    44 	*/
    45 	static void SelectPluginBasedOnMatchType(const TDesC8& aMatchType, RImplInfoPtrArray& aImplInfoArray);
    46 
    47 #ifdef SYMBIAN_MULTIMEDIA_CODEC_API
    48 	static void FindVideoDecoderPluginsL(const TDesC8& aMimeType, RImplInfoPtrArray& aImplInfoArray);
    49 	static void FindVideoEncoderPluginsL(const TDesC8& aMimeType, RImplInfoPtrArray& aImplInfoArray);
    50 	static void CreatePuListL(RImplInfoPtrArray& aImplInfoArray);
    51 	static const CImplementationInformation* FindPu(const RImplInfoPtrArray& aImplInfoArray, TUid aPuUid);
    52 #endif // SYMBIAN_MULTIMEDIA_CODEC_API
    53 	};
    54 
    55 /** 
    56  * Template class CleanupResetAndDestroy to clean up the array
    57  * of implementation information from the cleanup stack.
    58  */
    59 
    60 template <class T>
    61 class CleanupResetAndDestroy
    62 	{
    63 public:
    64 	inline static void PushL(T& aRef);
    65 private:
    66 	static void ResetAndDestroy(TAny *aPtr);
    67 	};
    68 template <class T>
    69 inline void CleanupResetAndDestroyPushL(T& aRef);
    70 template <class T>
    71 inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
    72 	{CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
    73 template <class T>
    74 void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
    75 	{(static_cast<T*>(aPtr))->ResetAndDestroy();}
    76 template <class T>
    77 inline void CleanupResetAndDestroyPushL(T& aRef)
    78 	{CleanupResetAndDestroy<T>::PushL(aRef);}
    79 
    80 #endif