129 */ |
129 */ |
130 EUIResourcesAndSurfaceParametersSet |
130 EUIResourcesAndSurfaceParametersSet |
131 }; |
131 }; |
132 |
132 |
133 public: // Constructors and destructors |
133 public: // Constructors and destructors |
134 static CMMASurfaceWindow* NewL( |
134 IMPORT_C static CMMASurfaceWindow* NewL( |
135 CMMAEventSource* aEventSource, |
135 CMMAEventSource* aEventSource, |
136 CMMAPlayer* aPlayer); |
136 CMMAPlayer* aPlayer, |
|
137 TBool aAVCableConnStatus); |
137 |
138 |
138 virtual ~CMMASurfaceWindow(); |
139 virtual ~CMMASurfaceWindow(); |
139 |
140 |
140 private: // Constructors and destructors |
141 private: // Constructors and destructors |
141 CMMASurfaceWindow( |
142 CMMASurfaceWindow( |
142 CMMAEventSource* aEventSource, |
143 CMMAEventSource* aEventSource, |
143 CMMAPlayer* aPlayer); |
144 CMMAPlayer* aPlayer, |
|
145 TBool aAVCableConnStatus); |
144 |
146 |
145 public: // Methods derived from MMMADisplayWindow |
147 public: // Methods derived from MMMADisplayWindow |
146 void SetDestinationBitmapL(CFbsBitmap* aBitmap); |
148 void SetDestinationBitmapL(CFbsBitmap* aBitmap); |
147 void DrawFrameL(const CFbsBitmap* aBitmap); |
149 void DrawFrameL(const CFbsBitmap* aBitmap); |
148 void SetDrawRect(const TRect& aRect); |
150 void SetDrawRect(const TRect& aRect); |
164 RWindowBase &aWindow); |
166 RWindowBase &aWindow); |
165 void MdcUICallback(TInt aCallbackId); |
167 void MdcUICallback(TInt aCallbackId); |
166 |
168 |
167 public: // New methods |
169 public: // New methods |
168 TBool IsVisible() const; |
170 TBool IsVisible() const; |
169 void SetDisplay(MMMADisplay *aDisplay); |
171 IMPORT_C void SetDisplay(MMMADisplay *aDisplay); |
170 |
172 |
171 /** |
173 /** |
172 * copies surface paramaters and intializes video display if |
174 * copies surface paramaters and intializes video display if |
173 * RWindow is already set, ie if intDisplayMode already called in midlet. |
175 * RWindow is already set, ie if intDisplayMode already called in midlet. |
174 * invokes InitVideoDisplayL() in UI thread context. |
176 * invokes InitVideoDisplayL() in UI thread context. |
175 * |
177 * |
176 * @params aSurfaceId, aCropRect, aPixelAspectRatio surface paramaters. |
178 * @params aSurfaceId, aCropRect, aPixelAspectRatio surface paramaters. |
177 */ |
179 */ |
178 void SetSurfaceParameters(const TSurfaceId& aSurfaceId, |
180 IMPORT_C void SetSurfaceParameters(const TSurfaceId& aSurfaceId, |
179 const TRect& aCropRect, |
181 const TRect& aCropRect, |
180 const TVideoAspectRatio& aPixelAspectRatio); |
182 const TVideoAspectRatio& aPixelAspectRatio); |
181 |
183 |
182 /** |
184 /** |
183 * invokes DoRemoveSurface() in UI thread context. |
185 * invokes DoRemoveSurface() in UI thread context. |
184 */ |
186 */ |
185 void RemoveSurface(); |
187 IMPORT_C void RemoveSurface(); |
186 |
188 |
187 /** |
189 /** |
188 * updates members variables with new surface parameters and invokes |
190 * updates members variables with new surface parameters and invokes |
189 * DoSetChangedSurfaceParameters() in UI thread context. |
191 * DoSetChangedSurfaceParameters() in UI thread context. |
190 * |
192 * |
191 * @params aSurfaceId, aCropRect, aPixelAspectRatio surface paramaters. |
193 * @params aSurfaceId, aCropRect, aPixelAspectRatio surface paramaters. |
192 */ |
194 */ |
193 void SetChangedSurfaceParameters(const TSurfaceId& aSurfaceId, |
195 IMPORT_C void SetChangedSurfaceParameters(const TSurfaceId& aSurfaceId, |
194 const TRect& aCropRect, |
196 const TRect& aCropRect, |
195 const TVideoAspectRatio& aPixelAspectRatio); |
197 const TVideoAspectRatio& aPixelAspectRatio); |
|
198 |
|
199 /** |
|
200 * updates iAVCableConnected flag as and when the audio/video cable is |
|
201 * connected or disconnected |
|
202 * |
|
203 * @param aStatus true indicates cable connected else false |
|
204 */ |
|
205 void SetAVCableConnStatus(TBool aStatus); |
196 |
206 |
197 private: // New methods |
207 private: // New methods |
198 /** |
208 /** |
199 * starts video rendering to a graphics surface. |
209 * starts video rendering to a graphics surface. |
200 * restarts video rendering to a graphics surafce with changed parameters. |
210 * restarts video rendering to a graphics surafce with changed parameters. |
294 * this instance is created & accessed in UI thread only. |
304 * this instance is created & accessed in UI thread only. |
295 */ |
305 */ |
296 CMediaClientVideoDisplay* iMediaClientVideoDisplay; |
306 CMediaClientVideoDisplay* iMediaClientVideoDisplay; |
297 |
307 |
298 /** |
308 /** |
299 * Display instance used to invoke UI callbacks. |
309 * Display instance used to invoke UI callbacks. |
300 * Not owned. |
310 * Not owned. |
301 */ |
311 */ |
302 MMMADisplay* iDisplay; |
312 MMMADisplay* iDisplay; |
303 |
313 |
304 /** |
314 /** |
305 * Window server session used by UI thread. |
315 * Window server session used by UI thread. |
306 * Adjustable and usable from UI thread only. |
316 * Adjustable and usable from UI thread only. |
327 * The surface to be created for composition. |
337 * The surface to be created for composition. |
328 */ |
338 */ |
329 TSurfaceId iSurfaceId; |
339 TSurfaceId iSurfaceId; |
330 |
340 |
331 /** |
341 /** |
332 * The dimensions of the crop rectangle, relative to the video image. |
342 * The dimensions of the crop rectangle, relative to the video image. |
333 */ |
343 */ |
334 TRect iCropRect; |
344 TRect iCropRect; |
335 |
345 |
336 /** |
346 /** |
337 * The pixel aspect ratio to display video picture. |
347 * The pixel aspect ratio to display video picture. |
338 */ |
348 */ |
339 TVideoAspectRatio iPixelAspectRatio; |
349 TVideoAspectRatio iPixelAspectRatio; |
340 |
350 |
341 /** |
351 /** |
342 * indicates the video display initialization state. |
352 * indicates the video display initialization state. |
343 * |
353 * |