1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/inc/mediaclientvideodisplay.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,80 @@
1.4 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +#ifndef MEDIACLIENTVIDEODISPLAY_H
1.21 +#define MEDIACLIENTVIDEODISPLAY_H
1.22 +
1.23 +#include <w32std.h>
1.24 +#include <mmf/common/mmfvideosurfacecustomcommands.h>
1.25 +
1.26 +class MMMFSurfaceEventHandler;
1.27 +class CMediaClientVideoDisplayBody;
1.28 +/**
1.29 +@publishedPartner
1.30 +@released
1.31 +
1.32 +The class offers a simple interface to add, remove video display window and supports graphics surfaces.
1.33 +It also offers some display handling funcations like video extension, scalling and rotation.
1.34 +
1.35 +This class has one static function through which client can construct, initialise and get
1.36 +pointer of the class.
1.37 +*/
1.38 +NONSHARABLE_CLASS(CMediaClientVideoDisplay) : public CBase
1.39 + {
1.40 +public:
1.41 +
1.42 + IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId);
1.43 + IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
1.44 +
1.45 + IMPORT_C ~CMediaClientVideoDisplay();
1.46 +
1.47 + IMPORT_C void AddDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion,
1.48 + const TRect& aVideoExtent, TReal32 aScaleWidth, TReal32 aScaleHeight,
1.49 + TVideoRotation aRotation, TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2);
1.50 + IMPORT_C TInt RemoveDisplayWindow(const RWindowBase& aWindow);
1.51 +
1.52 + IMPORT_C TInt SurfaceCreated(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio, const TRect& aCropRegion);
1.53 + IMPORT_C TInt SurfaceParametersChanged(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
1.54 + IMPORT_C void RemoveSurface();
1.55 + IMPORT_C TInt RedrawWindows(const TRect& aCropRegion);
1.56 +
1.57 + IMPORT_C void SetAutoScaleL(const RWindowBase& aWindow, TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion);
1.58 + IMPORT_C void SetRotationL(const RWindowBase& aWindow, TVideoRotation aRotation, const TRect& aCropRegion);
1.59 + IMPORT_C TVideoRotation RotationL(const RWindowBase& aWindow);
1.60 + IMPORT_C void SetScaleFactorL(const RWindowBase& aWindow, TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion);
1.61 + IMPORT_C void GetScaleFactorL(const RWindowBase& aWindow, TReal32& aWidthPercentage, TReal32& aHeightPercentage);
1.62 +
1.63 + IMPORT_C void SetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion);
1.64 + IMPORT_C void SetRotationL(TVideoRotation aRotation, const TRect& aCropRegion);
1.65 + IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion);
1.66 + IMPORT_C void SetWindowClipRectL(const RWindowBase& aWindow, const TRect& aWindowClipRect, const TRect& aCropRegion);
1.67 + IMPORT_C void SetVideoExtentL(const RWindowBase& aWindow, const TRect& aVideoExtent, const TRect& aCropRegion);
1.68 +
1.69 + IMPORT_C void SetExternalDisplaySwitchingL(TBool aControl);
1.70 +
1.71 +private:
1.72 +
1.73 + CMediaClientVideoDisplay();
1.74 + void ConstructL(TInt aDisplayId);
1.75 + void ConstructL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
1.76 +
1.77 +private:
1.78 + CMediaClientVideoDisplayBody* iBody;
1.79 +
1.80 + };
1.81 +
1.82 +#endif // MEDIACLIENTVIDEODISPLAY_H
1.83 +