equal
deleted
inserted
replaced
23 // GCE Surface |
23 // GCE Surface |
24 #include "graphics/surfacemanager.h" |
24 #include "graphics/surfacemanager.h" |
25 #include "graphics/surface.h" |
25 #include "graphics/surface.h" |
26 #include "graphics/surfaceupdateclient.h" |
26 #include "graphics/surfaceupdateclient.h" |
27 #include <graphics/surfaceconfiguration.h> |
27 #include <graphics/surfaceconfiguration.h> |
|
28 #include "mglxhdmidecoderobserver.h" //For MGlxHDMIDecoderObserver |
28 |
29 |
29 // forward decleration |
30 // forward decleration |
30 class CGlxActiveCallBack; |
31 class CGlxActiveCallBack; |
31 class CGlxHdmiDecoderAO; |
32 class CGlxHdmiDecoderAO; |
32 class CImageDecoder; |
33 class CImageDecoder; |
39 |
40 |
40 class CGlxHdmiSurfaceUpdater: public CBase |
41 class CGlxHdmiSurfaceUpdater: public CBase |
41 { |
42 { |
42 public: |
43 public: |
43 /* |
44 /* |
44 * NewL |
45 * NewL |
45 */ |
46 */ |
46 static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow, const TDesC& aImageFile, |
47 static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow, |
47 CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack); |
48 const TDesC& aImageFile, const TDesC& aNextImageFile, |
|
49 CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack, |
|
50 MGlxHDMIDecoderObserver& aDecoderObserver); |
48 |
51 |
49 /* |
52 /* |
50 * Destructor |
53 * Destructor |
51 */ |
54 */ |
52 ~CGlxHdmiSurfaceUpdater(); |
55 ~CGlxHdmiSurfaceUpdater(); |
58 void HandleRunL(TRequestStatus& aStatus); |
61 void HandleRunL(TRequestStatus& aStatus); |
59 |
62 |
60 /* |
63 /* |
61 * This updates the new image. |
64 * This updates the new image. |
62 */ |
65 */ |
63 void UpdateNewImageL(const TDesC& aImageFile,CFbsBitmap* aFsBitmap); |
66 void UpdateNewImageL(const TDesC& aImageFile, |
|
67 const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap); |
64 |
68 |
65 /* |
69 /* |
66 * Activate Zoom |
70 * Activate Zoom |
67 */ |
71 */ |
68 void ActivateZoom(TBool aAutoZoomOut); |
72 void ActivateZoom(TBool aAutoZoomOut); |
85 */ |
89 */ |
86 void ShiftToPostingMode(); |
90 void ShiftToPostingMode(); |
87 |
91 |
88 private: |
92 private: |
89 /* |
93 /* |
90 * Constructor |
94 * Constructor |
91 */ |
95 */ |
92 CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack); |
96 CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack, |
|
97 MGlxHDMIDecoderObserver& aDecoderObserver); |
93 |
98 |
94 /* |
99 /* |
95 * ConstructL() |
100 * ConstructL() |
96 */ |
101 */ |
97 void ConstructL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile); |
102 void ConstructL(CFbsBitmap* aFsBitmap, const TDesC& aImageFile, |
|
103 const TDesC& aNextImageFile); |
98 |
104 |
99 /* |
105 /* |
100 * Create a New surface with given size |
106 * Create a New surface with given size |
101 */ |
107 */ |
102 void CreateSurfaceL(); |
108 void CreateSurfaceL(); |
107 |
113 |
108 /* |
114 /* |
109 * This fundtion wont be called , could be used if double buffering is planned in future |
115 * This fundtion wont be called , could be used if double buffering is planned in future |
110 * to start the second decoder AO and update the surface with a new session. |
116 * to start the second decoder AO and update the surface with a new session. |
111 */ |
117 */ |
112 static TInt SurfBuffer0Ready(TAny* aObject); |
118 static TInt SurfBuffer0ReadyL(TAny* aObject); |
113 |
119 |
114 /* |
120 /* |
115 * Call a refresh on the screen |
121 * Call a refresh on the screen |
116 */ |
122 */ |
117 void Refresh(); |
123 void Refresh(); |
183 * decoded, as the return value would not fit the screen |
189 * decoded, as the return value would not fit the screen |
184 */ |
190 */ |
185 void ScaleDecodedBitmapL(TInt aBitmapIndex); |
191 void ScaleDecodedBitmapL(TInt aBitmapIndex); |
186 |
192 |
187 /* |
193 /* |
188 * InitiateHDMI |
194 * Initiate HDMI |
189 */ |
195 */ |
190 void InitiateHdmiL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile); |
196 void InitiateHdmiL(CFbsBitmap* aFsBitmap, const TDesC& aImageFile, |
|
197 const TDesC& aNextImageFile); |
|
198 |
|
199 void DecodeNextImageL(); |
191 |
200 |
192 private: |
201 private: |
193 RWindow* iWindow; // window object |
202 RWindow* iWindow; // window object |
194 CFbsBitmap* iFsBitmap; // FS bitmap |
203 CFbsBitmap* iFsBitmap; // FS bitmap |
195 MGlxGenCallback* iCallBack; // callback to the HdmiContainer window |
204 MGlxGenCallback* iCallBack; // callback to the HdmiContainer window |
196 HBufC* iImagePath; // To store the image uri path |
205 HBufC* iImagePath; // To store the image uri path |
|
206 HBufC* iNextImagePath; // To store the image uri path |
197 |
207 |
198 // GCE Surface |
208 // GCE Surface |
199 RSurfaceUpdateSession iSurfUpdateSession; |
209 RSurfaceUpdateSession iSurfUpdateSession; |
200 TSurfaceId iSurfId; // TSurfaceId |
210 TSurfaceId iSurfId; // TSurfaceId |
201 RSurfaceManager* iSurfManager; // RSurfaceManager |
211 RSurfaceManager* iSurfManager; // RSurfaceManager |
225 // Various flags to store values |
235 // Various flags to store values |
226 TBool iZoom; // Is zoomed |
236 TBool iZoom; // Is zoomed |
227 TBool iBitmapReady; // If the bitmap is decoded and ready |
237 TBool iBitmapReady; // If the bitmap is decoded and ready |
228 TBool iAutoZoomOut; // If the UI has asked for auto zoomout |
238 TBool iAutoZoomOut; // If the UI has asked for auto zoomout |
229 TBool iSurfSessionConnected; // If surface session is connected |
239 TBool iSurfSessionConnected; // If surface session is connected |
230 TBool iShiftToCloning; |
240 TBool iShiftToCloning; |
231 TBool iShwFsThumbnail; // If the Fs thumbnail is to be shown before decoding HD images |
241 TBool iShwFsThumbnail; // If the Fs thumbnail is to be shown before decoding HD images |
232 TBool iIsNonJpeg; // If the item is non jpeg |
242 TBool iIsNonJpeg; // If the item is non jpeg |
|
243 MGlxHDMIDecoderObserver& iDecoderObserver; // doesn't own |
|
244 TBool iDecodingCurrent; // Decoding Current Image |
|
245 TBool iDecodingNext; // Decoding Next Image |
|
246 TBool iDecodingNextFailed; // Decoding Next Image |
233 |
247 |
234 #ifdef _DEBUG |
248 #ifdef _DEBUG |
235 TTime iStartTime; |
249 TTime iStartTime; |
236 TTime iStopTime; |
250 TTime iStopTime; |
237 #endif |
251 #endif |