mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.h
branchRCL_3
changeset 7 94dbab0a2133
parent 0 40261b775718
child 8 bc06d8566074
child 15 c1e808730d6c
--- a/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.h	Sat Feb 20 00:20:15 2010 +0200
+++ b/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.h	Fri Mar 12 15:50:33 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
 #ifndef MEDIACLIENTVIDEODISPLAYBODY_H
 #define MEDIACLIENTVIDEODISPLAYBODY_H
 
-#include <w32std.h>
+#include "mediaclientextdisplayhandler.h"
 #include <graphics/surface.h>
 #include <graphics/surfaceconfiguration.h>
 #include <mmf/common/mmfvideosurfacecustomcommands.h>
@@ -92,8 +92,8 @@
 		};
 public:
 
-	static CMediaClientVideoDisplayBody* NewL(TInt aDisplayId);
-	static CMediaClientVideoDisplayBody* NewL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio);
+	static CMediaClientVideoDisplayBody* NewL(TInt aDisplayId, TBool aExtDisplaySwitchingControl);
+	static CMediaClientVideoDisplayBody* NewL(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio, TBool aExtDisplaySwitchingControl);
 	
 	~CMediaClientVideoDisplayBody();
 	
@@ -129,7 +129,7 @@
 	CMediaClientVideoDisplayBody(TInt aDisplayId);
 	CMediaClientVideoDisplayBody(TInt aDisplayId, const TSurfaceId& aSurfaceId, const TRect& aCropRect,	TVideoAspectRatio aAspectRatio);
 	
-	void ConstructL();
+	void ConstructL(TBool aExtDisplaySwitchingControl);
 	
 	CFbsBitGc::TGraphicsOrientation ConvertRotation(TVideoRotation aRotation);
 	
@@ -141,15 +141,18 @@
 	static CMediaClientVideoDisplayBody* FindDisplayWithWindowL(const RPointerArray<CMediaClientVideoDisplayBody>& aDisplays, const RWindowBase& aWindow);
 	TBool IsSurfaceCreated() const;
 	TInt SetBackgroundSurface(TWindowData& aWindowData, const TRect& aCropRegion);
-	void CalculateExtentAndViewport(const TWindowData& aWindowData, TRect& aExtent, TRect& aViewport);
 	TBool HasWindows() const;
 	
-    void CreateExtDisplayConnProvAndRemoveSurfaceL(TBool aRemoveBackgroundSurface);
-    void RemoveExtDisplayConnProvAndRedrawL();
-    void RemoveExtDisplayConnProv();
-    void MedcpcExtDisplayCalculateExtentAndViewportL(TRect& aExtent, TRect& aViewport, TRect& aExternalDisplayRect);
     void MedcpcExtDisplayNotifyConnected(TBool aExtDisplayConnected);
 
+    void UpdateCropRegionL(const TRect& aCropRegion, TInt aPos);
+    void CreateExtDisplayPluginL();
+    void RemoveExtDisplayPlugin();
+    void CreateExtDisplayHandlerL();
+    void RemoveExtDisplayHandler();
+    void SetWindowArrayPtr2Client();
+    void SetWindowArrayPtr2Ext();
+    
 private:
 
     MMMFSurfaceEventHandler* iEventHandler;
@@ -157,11 +160,15 @@
 	TSurfaceId iSurfaceId;
 	TRect iCropRect;
 	TVideoAspectRatio iAspectRatio;
-	RArray<TWindowData> iWindows;
+	
+	RArray<TWindowData> iClientWindows;
+	RArray<TWindowData> iExtDisplayWindows;
+	RArray<TWindowData>* iWindowsArrayPtr;
 	
 	TRect iCropRegion;
 	TBool iClientRequestedExtDisplaySwitching;
 	CExtDisplayConnectionProviderInterface* iExtDisplayConnectionProvider;
+	CMediaClientExtDisplayHandler* iExtDisplayHandler;
     TBool iExtDisplayConnected;
     TBool iExtDisplaySwitchingSupported;