os/mm/mmlibs/mmfw/inc/mediaclientvideodisplay.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 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
#ifndef MEDIACLIENTVIDEODISPLAY_H
sl@0
    18
#define MEDIACLIENTVIDEODISPLAY_H
sl@0
    19
sl@0
    20
#include <w32std.h>
sl@0
    21
#include <mmf/common/mmfvideosurfacecustomcommands.h>
sl@0
    22
sl@0
    23
class MMMFSurfaceEventHandler;
sl@0
    24
class CMediaClientVideoDisplayBody;
sl@0
    25
/**
sl@0
    26
@publishedPartner
sl@0
    27
@released
sl@0
    28
sl@0
    29
The class offers a simple interface to add, remove video display window and supports graphics surfaces.
sl@0
    30
It also offers some display handling funcations like video extension, scalling and rotation. 
sl@0
    31
sl@0
    32
This class has one static function through which client can construct, initialise and get 
sl@0
    33
pointer of the class.
sl@0
    34
*/
sl@0
    35
NONSHARABLE_CLASS(CMediaClientVideoDisplay) : public CBase
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
sl@0
    39
	IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId);
sl@0
    40
	IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
sl@0
    41
	
sl@0
    42
	IMPORT_C ~CMediaClientVideoDisplay();
sl@0
    43
	
sl@0
    44
	IMPORT_C void AddDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion,
sl@0
    45
							const TRect& aVideoExtent, TReal32 aScaleWidth, TReal32 aScaleHeight,
sl@0
    46
							TVideoRotation aRotation, TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2);
sl@0
    47
	IMPORT_C TInt RemoveDisplayWindow(const RWindowBase& aWindow);
sl@0
    48
	
sl@0
    49
	IMPORT_C TInt SurfaceCreated(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio, const TRect& aCropRegion);
sl@0
    50
	IMPORT_C TInt SurfaceParametersChanged(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
sl@0
    51
	IMPORT_C void RemoveSurface();
sl@0
    52
	IMPORT_C TInt RedrawWindows(const TRect& aCropRegion);
sl@0
    53
		
sl@0
    54
	IMPORT_C void SetAutoScaleL(const RWindowBase& aWindow, TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion);
sl@0
    55
	IMPORT_C void SetRotationL(const RWindowBase& aWindow, TVideoRotation aRotation, const TRect& aCropRegion);
sl@0
    56
	IMPORT_C TVideoRotation RotationL(const RWindowBase& aWindow);
sl@0
    57
	IMPORT_C void SetScaleFactorL(const RWindowBase& aWindow, TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion);
sl@0
    58
	IMPORT_C void GetScaleFactorL(const RWindowBase& aWindow, TReal32& aWidthPercentage, TReal32& aHeightPercentage);
sl@0
    59
sl@0
    60
	IMPORT_C void SetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion);
sl@0
    61
	IMPORT_C void SetRotationL(TVideoRotation aRotation, const TRect& aCropRegion);
sl@0
    62
	IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion);
sl@0
    63
	IMPORT_C void SetWindowClipRectL(const RWindowBase& aWindow, const TRect& aWindowClipRect, const TRect& aCropRegion);
sl@0
    64
	IMPORT_C void SetVideoExtentL(const RWindowBase& aWindow, const TRect& aVideoExtent, const TRect& aCropRegion);
sl@0
    65
	
sl@0
    66
	IMPORT_C void SetExternalDisplaySwitchingL(TBool aControl);
sl@0
    67
	
sl@0
    68
private:
sl@0
    69
	
sl@0
    70
	CMediaClientVideoDisplay();
sl@0
    71
	void ConstructL(TInt aDisplayId);
sl@0
    72
	void ConstructL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
sl@0
    73
	
sl@0
    74
private:
sl@0
    75
	CMediaClientVideoDisplayBody* iBody;
sl@0
    76
sl@0
    77
	};
sl@0
    78
sl@0
    79
#endif // MEDIACLIENTVIDEODISPLAY_H
sl@0
    80