0
|
1 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
|
|
17 |
#ifndef MEDIACLIENTVIDEODISPLAY_H
|
|
18 |
#define MEDIACLIENTVIDEODISPLAY_H
|
|
19 |
|
|
20 |
#include <w32std.h>
|
|
21 |
#include <mmf/common/mmfvideosurfacecustomcommands.h>
|
|
22 |
|
|
23 |
class MMMFSurfaceEventHandler;
|
|
24 |
class CMediaClientVideoDisplayBody;
|
|
25 |
/**
|
|
26 |
@publishedPartner
|
|
27 |
@released
|
|
28 |
|
|
29 |
The class offers a simple interface to add, remove video display window and supports graphics surfaces.
|
|
30 |
It also offers some display handling funcations like video extension, scalling and rotation.
|
|
31 |
|
|
32 |
This class has one static function through which client can construct, initialise and get
|
|
33 |
pointer of the class.
|
|
34 |
*/
|
|
35 |
NONSHARABLE_CLASS(CMediaClientVideoDisplay) : public CBase
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
|
|
39 |
IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId);
|
|
40 |
IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
|
|
41 |
|
|
42 |
IMPORT_C ~CMediaClientVideoDisplay();
|
|
43 |
|
|
44 |
IMPORT_C void AddDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion,
|
|
45 |
const TRect& aVideoExtent, TReal32 aScaleWidth, TReal32 aScaleHeight,
|
|
46 |
TVideoRotation aRotation, TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2);
|
|
47 |
IMPORT_C TInt RemoveDisplayWindow(const RWindowBase& aWindow);
|
|
48 |
|
|
49 |
IMPORT_C TInt SurfaceCreated(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio, const TRect& aCropRegion);
|
|
50 |
IMPORT_C TInt SurfaceParametersChanged(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
|
|
51 |
IMPORT_C void RemoveSurface();
|
|
52 |
IMPORT_C TInt RedrawWindows(const TRect& aCropRegion);
|
|
53 |
|
|
54 |
IMPORT_C void SetAutoScaleL(const RWindowBase& aWindow, TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion);
|
|
55 |
IMPORT_C void SetRotationL(const RWindowBase& aWindow, TVideoRotation aRotation, const TRect& aCropRegion);
|
|
56 |
IMPORT_C TVideoRotation RotationL(const RWindowBase& aWindow);
|
|
57 |
IMPORT_C void SetScaleFactorL(const RWindowBase& aWindow, TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion);
|
|
58 |
IMPORT_C void GetScaleFactorL(const RWindowBase& aWindow, TReal32& aWidthPercentage, TReal32& aHeightPercentage);
|
|
59 |
|
|
60 |
IMPORT_C void SetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion);
|
|
61 |
IMPORT_C void SetRotationL(TVideoRotation aRotation, const TRect& aCropRegion);
|
|
62 |
IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion);
|
|
63 |
IMPORT_C void SetWindowClipRectL(const RWindowBase& aWindow, const TRect& aWindowClipRect, const TRect& aCropRegion);
|
|
64 |
IMPORT_C void SetVideoExtentL(const RWindowBase& aWindow, const TRect& aVideoExtent, const TRect& aCropRegion);
|
|
65 |
|
|
66 |
IMPORT_C void SetExternalDisplaySwitchingL(TBool aControl);
|
|
67 |
|
|
68 |
private:
|
|
69 |
|
|
70 |
CMediaClientVideoDisplay();
|
|
71 |
void ConstructL(TInt aDisplayId);
|
|
72 |
void ConstructL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
|
|
73 |
|
|
74 |
private:
|
|
75 |
CMediaClientVideoDisplayBody* iBody;
|
|
76 |
|
|
77 |
};
|
|
78 |
|
|
79 |
#endif // MEDIACLIENTVIDEODISPLAY_H
|
|
80 |
|