sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: #ifndef MEDIACLIENTVIDEODISPLAY_H sl@0: #define MEDIACLIENTVIDEODISPLAY_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: class MMMFSurfaceEventHandler; sl@0: class CMediaClientVideoDisplayBody; sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: The class offers a simple interface to add, remove video display window and supports graphics surfaces. sl@0: It also offers some display handling funcations like video extension, scalling and rotation. sl@0: sl@0: This class has one static function through which client can construct, initialise and get sl@0: pointer of the class. sl@0: */ sl@0: NONSHARABLE_CLASS(CMediaClientVideoDisplay) : public CBase sl@0: { sl@0: public: sl@0: sl@0: IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId); sl@0: IMPORT_C static CMediaClientVideoDisplay* NewL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio); sl@0: sl@0: IMPORT_C ~CMediaClientVideoDisplay(); sl@0: sl@0: IMPORT_C void AddDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion, sl@0: const TRect& aVideoExtent, TReal32 aScaleWidth, TReal32 aScaleHeight, sl@0: TVideoRotation aRotation, TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2); sl@0: IMPORT_C TInt RemoveDisplayWindow(const RWindowBase& aWindow); sl@0: sl@0: IMPORT_C TInt SurfaceCreated(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio, const TRect& aCropRegion); sl@0: IMPORT_C TInt SurfaceParametersChanged(const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio); sl@0: IMPORT_C void RemoveSurface(); sl@0: IMPORT_C TInt RedrawWindows(const TRect& aCropRegion); sl@0: sl@0: IMPORT_C void SetAutoScaleL(const RWindowBase& aWindow, TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion); sl@0: IMPORT_C void SetRotationL(const RWindowBase& aWindow, TVideoRotation aRotation, const TRect& aCropRegion); sl@0: IMPORT_C TVideoRotation RotationL(const RWindowBase& aWindow); sl@0: IMPORT_C void SetScaleFactorL(const RWindowBase& aWindow, TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion); sl@0: IMPORT_C void GetScaleFactorL(const RWindowBase& aWindow, TReal32& aWidthPercentage, TReal32& aHeightPercentage); sl@0: sl@0: IMPORT_C void SetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos, const TRect& aCropRegion); sl@0: IMPORT_C void SetRotationL(TVideoRotation aRotation, const TRect& aCropRegion); sl@0: IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, const TRect& aCropRegion); sl@0: IMPORT_C void SetWindowClipRectL(const RWindowBase& aWindow, const TRect& aWindowClipRect, const TRect& aCropRegion); sl@0: IMPORT_C void SetVideoExtentL(const RWindowBase& aWindow, const TRect& aVideoExtent, const TRect& aCropRegion); sl@0: sl@0: IMPORT_C void SetExternalDisplaySwitchingL(TBool aControl); sl@0: sl@0: private: sl@0: sl@0: CMediaClientVideoDisplay(); sl@0: void ConstructL(TInt aDisplayId); sl@0: void ConstructL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio); sl@0: sl@0: private: sl@0: CMediaClientVideoDisplayBody* iBody; sl@0: sl@0: }; sl@0: sl@0: #endif // MEDIACLIENTVIDEODISPLAY_H sl@0: