sl@0
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
/**
|
sl@0
|
17 |
@file
|
sl@0
|
18 |
@internalComponent
|
sl@0
|
19 |
*/
|
sl@0
|
20 |
|
sl@0
|
21 |
#ifndef MMFSUBTITLEUTILITY_H
|
sl@0
|
22 |
#define MMFSUBTITLEUTILITY_H
|
sl@0
|
23 |
|
sl@0
|
24 |
#include <w32std.h>
|
sl@0
|
25 |
#include <mmf/common/mmfvideosubtitlecustomcommands.h>
|
sl@0
|
26 |
|
sl@0
|
27 |
// Utility functions for subtitle support
|
sl@0
|
28 |
NONSHARABLE_CLASS( CMMFSubtitleUtility ): public CBase
|
sl@0
|
29 |
{
|
sl@0
|
30 |
private:
|
sl@0
|
31 |
friend class CTestStepUnitMMFVidClient;
|
sl@0
|
32 |
|
sl@0
|
33 |
// class for storing CRP related data
|
sl@0
|
34 |
class TCrpData
|
sl@0
|
35 |
{
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
TCrpData(TInt aWindowId) : iWindowId(aWindowId), iCrpId(0), iCrpRect() {}
|
sl@0
|
38 |
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
TInt iWindowId;
|
sl@0
|
41 |
TWsGraphicId iCrpId;
|
sl@0
|
42 |
TRect iCrpRect;
|
sl@0
|
43 |
};
|
sl@0
|
44 |
|
sl@0
|
45 |
public:
|
sl@0
|
46 |
static CMMFSubtitleUtility* NewL(RMMFController& aController, RWsSession &aWs);
|
sl@0
|
47 |
~CMMFSubtitleUtility();
|
sl@0
|
48 |
static TBool SubtitlesAvailable(RMMFController& aController);
|
sl@0
|
49 |
TInt AddSubtitleConfig(const TMMFSubtitleWindowConfig& aConfig);
|
sl@0
|
50 |
TInt RemoveSubtitleConfig(TInt aWindowId);
|
sl@0
|
51 |
TInt UpdateSubtitleConfig(const TMMFSubtitleWindowConfig& aConfig);
|
sl@0
|
52 |
TInt EnableSubtitles();
|
sl@0
|
53 |
void DisableSubtitles();
|
sl@0
|
54 |
TArray<TLanguage> SupportedSubtitleLanguagesL();
|
sl@0
|
55 |
void HandleCrpReady(RWindow& aWindow);
|
sl@0
|
56 |
void RedrawSubtitle(RWindow& aWindow, const TRect& aRedrawRect);
|
sl@0
|
57 |
TInt SetSubtitleLanguage(TLanguage aSubtitleLanguage);
|
sl@0
|
58 |
TLanguage SubtitleLanguage();
|
sl@0
|
59 |
|
sl@0
|
60 |
private:
|
sl@0
|
61 |
CMMFSubtitleUtility(RMMFController& aController);
|
sl@0
|
62 |
void ConstructL(RWsSession &aWs);
|
sl@0
|
63 |
void DrawCrp(RWindow& aWindow, TInt aCrpIdx, TBool aCallBeginRedraw);
|
sl@0
|
64 |
TInt FindCrpArrayIndex(TInt aWindowId);
|
sl@0
|
65 |
|
sl@0
|
66 |
private:
|
sl@0
|
67 |
RMMFVideoPlaySubtitleSupportCustomCommands iSubtitleSupportCustomCommands;
|
sl@0
|
68 |
CWsScreenDevice *iDevice;
|
sl@0
|
69 |
CWindowGc* iSubtitleGc;
|
sl@0
|
70 |
RArray<TLanguage> iSubtitleLanguages;
|
sl@0
|
71 |
RArray<TCrpData> iCrpDataArray;
|
sl@0
|
72 |
};
|
sl@0
|
73 |
|
sl@0
|
74 |
#endif // MMFSUBTITLEUTILITY_H
|