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