15 |
15 |
16 #ifndef MEDIACLIENTVIDEODISPLAYBODY_H |
16 #ifndef MEDIACLIENTVIDEODISPLAYBODY_H |
17 #define MEDIACLIENTVIDEODISPLAYBODY_H |
17 #define MEDIACLIENTVIDEODISPLAYBODY_H |
18 |
18 |
19 #include "mediaclientextdisplayhandler.h" |
19 #include "mediaclientextdisplayhandler.h" |
|
20 #include "mediaclientwseventobserver.h" |
20 #include <graphics/surface.h> |
21 #include <graphics/surface.h> |
21 #include <graphics/surfaceconfiguration.h> |
22 #include <graphics/surfaceconfiguration.h> |
22 #include <mmf/common/mmfvideosurfacecustomcommands.h> |
23 #include <mmf/common/mmfvideosurfacecustomcommands.h> |
23 #include <videoplayer.h> |
24 #include <videoplayer.h> |
24 #include <mmf/plugin/mmfmediaclientextdisplayinterface.h> |
25 #include <mmf/plugin/mmfmediaclientextdisplayinterface.h> |
25 |
26 |
26 class MMMFSurfaceEventHandler; |
27 class MMMFSurfaceEventHandler; |
|
28 class CMediaClientPolicyServerClient; |
27 |
29 |
28 /** |
30 /** |
29 @internalTechnology |
31 @internalTechnology |
30 @released |
32 @released |
31 |
33 |
32 */ |
34 */ |
33 NONSHARABLE_CLASS(CMediaClientVideoDisplayBody) : public CBase, public MExtDisplayConnectionProviderCallback |
35 NONSHARABLE_CLASS(CMediaClientVideoDisplayBody) : public CBase, public MExtDisplayConnectionProviderCallback, |
|
36 public MMediaClientWsEventObserverCallback |
34 { |
37 { |
35 private: |
38 private: |
36 NONSHARABLE_CLASS(TWindowData) |
39 NONSHARABLE_CLASS(TWindowData) |
37 { |
40 { |
38 public: |
41 public: |
141 static CMediaClientVideoDisplayBody* FindDisplayWithWindowL(const RPointerArray<CMediaClientVideoDisplayBody>& aDisplays, const RWindowBase& aWindow); |
144 static CMediaClientVideoDisplayBody* FindDisplayWithWindowL(const RPointerArray<CMediaClientVideoDisplayBody>& aDisplays, const RWindowBase& aWindow); |
142 TBool IsSurfaceCreated() const; |
145 TBool IsSurfaceCreated() const; |
143 TInt SetBackgroundSurface(TWindowData& aWindowData, const TRect& aCropRegion); |
146 TInt SetBackgroundSurface(TWindowData& aWindowData, const TRect& aCropRegion); |
144 TBool HasWindows() const; |
147 TBool HasWindows() const; |
145 |
148 |
146 void MedcpcExtDisplayNotifyConnected(TBool aExtDisplayConnected); |
149 void UpdateCropRegionL(const TRect& aCropRegion, TInt aPos, TBool aRedrawIndividualWindow); |
147 |
|
148 void UpdateCropRegionL(const TRect& aCropRegion, TInt aPos); |
|
149 void CreateExtDisplayPluginL(); |
150 void CreateExtDisplayPluginL(); |
150 void RemoveExtDisplayPlugin(); |
151 void RemoveExtDisplayPlugin(); |
151 void CreateExtDisplayHandlerL(); |
152 void CreateExtDisplayHandlerL(); |
152 void RemoveExtDisplayHandler(); |
153 void RemoveExtDisplayHandler(); |
153 void SetWindowArrayPtr2Client(); |
154 void SetWindowArrayPtr2Client(); |
154 void SetWindowArrayPtr2Ext(); |
155 void SetWindowArrayPtr2Ext(); |
|
156 void SwitchSurface(); |
|
157 void UpdateFocus(); |
|
158 TBool IsRotationValid(TVideoRotation aVideoRotation); |
|
159 TBool IsAutoScaleTypeValid(TAutoScaleType aAutoScaleType); |
|
160 TBool SurfaceCropRectChangeRequiresRedraw(TRect aOldSurfaceCropRect, TRect aNewSurfaceCropRect, TRect aClientCropRegion); |
|
161 TBool ClientCropRegionChangeRequiresRedraw(TRect aOldClientCropRegion, TRect aNewClientCropRegion, TRect aSurfaceCropRect); |
|
162 TBool IntersectionAreaChanged(TRect aOldRect, TRect aNewRect, TRect aOtherRect); |
|
163 |
|
164 // MExtDisplayConnectionProviderCallback |
|
165 void MedcpcExtDisplayNotifyConnected(TBool aExtDisplayConnected); |
|
166 |
|
167 // MMediaClientWsEventObserverCallback |
|
168 void MmcweoFocusWindowGroupChanged(); |
|
169 TBool MmcweoIgnoreProcess(TSecureId aId); |
155 |
170 |
156 private: |
171 private: |
157 |
172 |
158 MMMFSurfaceEventHandler* iEventHandler; |
173 MMMFSurfaceEventHandler* iEventHandler; |
159 const TInt iDisplayId; |
174 const TInt iDisplayId; |
162 TVideoAspectRatio iAspectRatio; |
177 TVideoAspectRatio iAspectRatio; |
163 |
178 |
164 RArray<TWindowData> iClientWindows; |
179 RArray<TWindowData> iClientWindows; |
165 RArray<TWindowData> iExtDisplayWindows; |
180 RArray<TWindowData> iExtDisplayWindows; |
166 RArray<TWindowData>* iWindowsArrayPtr; |
181 RArray<TWindowData>* iWindowsArrayPtr; |
|
182 TBool iSwitchedToExternalDisplay; |
167 |
183 |
168 TRect iCropRegion; |
184 TRect iCropRegion; |
169 TBool iClientRequestedExtDisplaySwitching; |
185 TBool iClientRequestedExtDisplaySwitching; |
170 CExtDisplayConnectionProviderInterface* iExtDisplayConnectionProvider; |
186 CExtDisplayConnectionProviderInterface* iExtDisplayConnectionProvider; |
171 CMediaClientExtDisplayHandler* iExtDisplayHandler; |
187 CMediaClientExtDisplayHandler* iExtDisplayHandler; |
|
188 CMediaClientWsEventObserver* iWsEventObserver; |
|
189 TBool iClientWindowIsInFocus; |
172 TBool iExtDisplayConnected; |
190 TBool iExtDisplayConnected; |
173 TBool iExtDisplaySwitchingSupported; |
191 TBool iExtDisplaySwitchingSupported; |
174 |
192 |
|
193 CMediaClientPolicyServerClient* iServerClient; |
|
194 |
175 friend class CVideoPlayerUtility::CBody; |
195 friend class CVideoPlayerUtility::CBody; |
176 friend class CTestStepUnitMMFVidClient; |
196 friend class CTestStepUnitMMFVidClient; |
177 }; |
197 }; |
178 |
198 |
179 #endif // MEDIACLIENTVIDEODISPLAYBODY_H |
199 #endif // MEDIACLIENTVIDEODISPLAYBODY_H |