diff -r 000000000000 -r bde4ae8d615e os/mm/mmlibs/mmfw/src/Client/Video/mmfsubtitleutility.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/mm/mmlibs/mmfw/src/Client/Video/mmfsubtitleutility.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,74 @@ +// Copyright (c) 2008-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: +// + +/** + @file + @internalComponent +*/ + +#ifndef MMFSUBTITLEUTILITY_H +#define MMFSUBTITLEUTILITY_H + +#include +#include + +// Utility functions for subtitle support +NONSHARABLE_CLASS( CMMFSubtitleUtility ): public CBase + { +private: + friend class CTestStepUnitMMFVidClient; + + // class for storing CRP related data + class TCrpData + { + public: + TCrpData(TInt aWindowId) : iWindowId(aWindowId), iCrpId(0), iCrpRect() {} + + public: + TInt iWindowId; + TWsGraphicId iCrpId; + TRect iCrpRect; + }; + +public: + static CMMFSubtitleUtility* NewL(RMMFController& aController, RWsSession &aWs); + ~CMMFSubtitleUtility(); + static TBool SubtitlesAvailable(RMMFController& aController); + TInt AddSubtitleConfig(const TMMFSubtitleWindowConfig& aConfig); + TInt RemoveSubtitleConfig(TInt aWindowId); + TInt UpdateSubtitleConfig(const TMMFSubtitleWindowConfig& aConfig); + TInt EnableSubtitles(); + void DisableSubtitles(); + TArray SupportedSubtitleLanguagesL(); + void HandleCrpReady(RWindow& aWindow); + void RedrawSubtitle(RWindow& aWindow, const TRect& aRedrawRect); + TInt SetSubtitleLanguage(TLanguage aSubtitleLanguage); + TLanguage SubtitleLanguage(); + +private: + CMMFSubtitleUtility(RMMFController& aController); + void ConstructL(RWsSession &aWs); + void DrawCrp(RWindow& aWindow, TInt aCrpIdx, TBool aCallBeginRedraw); + TInt FindCrpArrayIndex(TInt aWindowId); + +private: + RMMFVideoPlaySubtitleSupportCustomCommands iSubtitleSupportCustomCommands; + CWsScreenDevice *iDevice; + CWindowGc* iSubtitleGc; + RArray iSubtitleLanguages; + RArray iCrpDataArray; + }; + +#endif // MMFSUBTITLEUTILITY_H