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 |
#ifndef MVSVIDEOCONTROL_H
|
sl@0
|
17 |
#define MVSVIDEOCONTROL_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <coecntrl.h>
|
sl@0
|
20 |
#include <surfaceeventhandler.h>
|
sl@0
|
21 |
|
sl@0
|
22 |
class CMVSPipControl :
|
sl@0
|
23 |
public CCoeControl,
|
sl@0
|
24 |
public MMMFSurfaceEventHandler
|
sl@0
|
25 |
{
|
sl@0
|
26 |
public:
|
sl@0
|
27 |
enum TRenderType
|
sl@0
|
28 |
{
|
sl@0
|
29 |
EUseMmf,
|
sl@0
|
30 |
EUseCrp
|
sl@0
|
31 |
};
|
sl@0
|
32 |
|
sl@0
|
33 |
public:
|
sl@0
|
34 |
static CMVSPipControl* NewL(RWindowTreeNode& aParent);
|
sl@0
|
35 |
~CMVSPipControl();
|
sl@0
|
36 |
|
sl@0
|
37 |
// MMMFSurfaceEventHandler
|
sl@0
|
38 |
void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
|
sl@0
|
39 |
void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
|
sl@0
|
40 |
void MmsehRemoveSurface(const TSurfaceId& aId);
|
sl@0
|
41 |
|
sl@0
|
42 |
void SetRenderType(TRenderType aRenderType);
|
sl@0
|
43 |
void Clear();
|
sl@0
|
44 |
RWindow& ControlWindow() const;
|
sl@0
|
45 |
|
sl@0
|
46 |
private:
|
sl@0
|
47 |
CMVSPipControl();
|
sl@0
|
48 |
void ConstructL(RWindowTreeNode& aParent);
|
sl@0
|
49 |
|
sl@0
|
50 |
void Draw(const TRect& aRect) const;
|
sl@0
|
51 |
|
sl@0
|
52 |
private:
|
sl@0
|
53 |
TRenderType iRenderType;
|
sl@0
|
54 |
TInt iDisplayId;
|
sl@0
|
55 |
TRect iCropRect;
|
sl@0
|
56 |
};
|
sl@0
|
57 |
|
sl@0
|
58 |
|
sl@0
|
59 |
class CMVSVideoControl : public CCoeControl
|
sl@0
|
60 |
{
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
static CMVSVideoControl* NewLC(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay, RWindowTreeNode& aParent);
|
sl@0
|
63 |
static CMVSVideoControl* NewL(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay, RWindowTreeNode& aParent);
|
sl@0
|
64 |
|
sl@0
|
65 |
~CMVSVideoControl();
|
sl@0
|
66 |
|
sl@0
|
67 |
RWindow& ControlWindow() const;
|
sl@0
|
68 |
TInt ScreenNumber() const;
|
sl@0
|
69 |
|
sl@0
|
70 |
CMVSPipControl& Pip() const;
|
sl@0
|
71 |
void EnablePip(CMVSPipControl::TRenderType aRenderType);
|
sl@0
|
72 |
void DisablePip();
|
sl@0
|
73 |
|
sl@0
|
74 |
void SetOverlayTextL(const TDesC& aOverlayText);
|
sl@0
|
75 |
void ClearOverlayText();
|
sl@0
|
76 |
|
sl@0
|
77 |
private:
|
sl@0
|
78 |
CMVSVideoControl(CMVSVideoPlayAgent& aVideoPlayAgent, TInt aDisplay);
|
sl@0
|
79 |
|
sl@0
|
80 |
void ConstructL(RWindowTreeNode& aParent);
|
sl@0
|
81 |
void Draw(const TRect& aRect) const;
|
sl@0
|
82 |
|
sl@0
|
83 |
TInt CountComponentControls() const;
|
sl@0
|
84 |
CCoeControl* ComponentControl(TInt aIndex) const;
|
sl@0
|
85 |
|
sl@0
|
86 |
private:
|
sl@0
|
87 |
CMVSVideoPlayAgent& iVideoPlayAgent;
|
sl@0
|
88 |
TInt iDisplay;
|
sl@0
|
89 |
CMVSPipControl* iPip;
|
sl@0
|
90 |
|
sl@0
|
91 |
RBuf iOverlayText; // Text to be drawn on top of video
|
sl@0
|
92 |
};
|
sl@0
|
93 |
|
sl@0
|
94 |
#endif // MVSVIDEOCONTROL_H
|
sl@0
|
95 |
|