1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmhais/videohai/devvideo/inc/devvideointernal.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,80 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __DEVVIDEOINTERNAL_H__
1.20 +#define __DEVVIDEOINTERNAL_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +#include <ecom/ecom.h>
1.24 +
1.25 +/**
1.26 +Static utilities class.
1.27 +@internalComponent
1.28 +*/
1.29 +class DevVideoUtilities
1.30 + {
1.31 +public:
1.32 + /**
1.33 + Convert a text number into a real number using lexical analysis
1.34 + */
1.35 + static TInt ConvertTextToTUint32(const TDesC8& aData, TUint32& aNumber);
1.36 +
1.37 + /**
1.38 + Inspect the plugin implementation information objects to see if the required pre/post proc type is supported.
1.39 + If so, the UID of the plugin is appended to aMatchingPlugins
1.40 + */
1.41 + static void MatchPrePostProcessorCapabilitiesL(const RImplInfoPtrArray& aPlugins, TUint32 aReqPrePostProcType, RArray<TUid>& aMatchingPlugins);
1.42 +
1.43 + /**
1.44 + Select a plug-in that supports the mime type. If a plug-in does not support the mime type it is removed
1.45 + from the array and deleted. Therefore after a call to this method "aImplInfoArray" contains only plug-in
1.46 + that support the supplied mime type or is null if none was found.
1.47 + */
1.48 + static void SelectPluginBasedOnMatchType(const TDesC8& aMatchType, RImplInfoPtrArray& aImplInfoArray);
1.49 +
1.50 +#ifdef SYMBIAN_MULTIMEDIA_CODEC_API
1.51 + static void FindVideoDecoderPluginsL(const TDesC8& aMimeType, RImplInfoPtrArray& aImplInfoArray);
1.52 + static void FindVideoEncoderPluginsL(const TDesC8& aMimeType, RImplInfoPtrArray& aImplInfoArray);
1.53 + static void CreatePuListL(RImplInfoPtrArray& aImplInfoArray);
1.54 + static const CImplementationInformation* FindPu(const RImplInfoPtrArray& aImplInfoArray, TUid aPuUid);
1.55 +#endif // SYMBIAN_MULTIMEDIA_CODEC_API
1.56 + };
1.57 +
1.58 +/**
1.59 + * Template class CleanupResetAndDestroy to clean up the array
1.60 + * of implementation information from the cleanup stack.
1.61 + */
1.62 +
1.63 +template <class T>
1.64 +class CleanupResetAndDestroy
1.65 + {
1.66 +public:
1.67 + inline static void PushL(T& aRef);
1.68 +private:
1.69 + static void ResetAndDestroy(TAny *aPtr);
1.70 + };
1.71 +template <class T>
1.72 +inline void CleanupResetAndDestroyPushL(T& aRef);
1.73 +template <class T>
1.74 +inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
1.75 + {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));}
1.76 +template <class T>
1.77 +void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
1.78 + {(static_cast<T*>(aPtr))->ResetAndDestroy();}
1.79 +template <class T>
1.80 +inline void CleanupResetAndDestroyPushL(T& aRef)
1.81 + {CleanupResetAndDestroy<T>::PushL(aRef);}
1.82 +
1.83 +#endif