diff -r 000000000000 -r bde4ae8d615e os/mm/mmhais/videohai/devvideo/inc/devvideointernal.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/mm/mmhais/videohai/devvideo/inc/devvideointernal.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,80 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __DEVVIDEOINTERNAL_H__ +#define __DEVVIDEOINTERNAL_H__ + +#include +#include + +/** +Static utilities class. +@internalComponent +*/ +class DevVideoUtilities + { +public: + /** + Convert a text number into a real number using lexical analysis + */ + static TInt ConvertTextToTUint32(const TDesC8& aData, TUint32& aNumber); + + /** + Inspect the plugin implementation information objects to see if the required pre/post proc type is supported. + If so, the UID of the plugin is appended to aMatchingPlugins + */ + static void MatchPrePostProcessorCapabilitiesL(const RImplInfoPtrArray& aPlugins, TUint32 aReqPrePostProcType, RArray& aMatchingPlugins); + + /** + Select a plug-in that supports the mime type. If a plug-in does not support the mime type it is removed + from the array and deleted. Therefore after a call to this method "aImplInfoArray" contains only plug-in + that support the supplied mime type or is null if none was found. + */ + static void SelectPluginBasedOnMatchType(const TDesC8& aMatchType, RImplInfoPtrArray& aImplInfoArray); + +#ifdef SYMBIAN_MULTIMEDIA_CODEC_API + static void FindVideoDecoderPluginsL(const TDesC8& aMimeType, RImplInfoPtrArray& aImplInfoArray); + static void FindVideoEncoderPluginsL(const TDesC8& aMimeType, RImplInfoPtrArray& aImplInfoArray); + static void CreatePuListL(RImplInfoPtrArray& aImplInfoArray); + static const CImplementationInformation* FindPu(const RImplInfoPtrArray& aImplInfoArray, TUid aPuUid); +#endif // SYMBIAN_MULTIMEDIA_CODEC_API + }; + +/** + * Template class CleanupResetAndDestroy to clean up the array + * of implementation information from the cleanup stack. + */ + +template +class CleanupResetAndDestroy + { +public: + inline static void PushL(T& aRef); +private: + static void ResetAndDestroy(TAny *aPtr); + }; +template +inline void CleanupResetAndDestroyPushL(T& aRef); +template +inline void CleanupResetAndDestroy::PushL(T& aRef) + {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));} +template +void CleanupResetAndDestroy::ResetAndDestroy(TAny *aPtr) + {(static_cast(aPtr))->ResetAndDestroy();} +template +inline void CleanupResetAndDestroyPushL(T& aRef) + {CleanupResetAndDestroy::PushL(aRef);} + +#endif