69 if (aStore) |
69 if (aStore) |
70 StoreImageInfoL(aImageFile, aImageDimensions, aFrameCount); |
70 StoreImageInfoL(aImageFile, aImageDimensions, aFrameCount); |
71 |
71 |
72 if (iGlxTvOut->IsHDMIConnected()) |
72 if (iGlxTvOut->IsHDMIConnected()) |
73 { |
73 { |
74 iIsHDMIconnected = ETrue; |
|
75 if(aImageDimensions.iHeight<=KHdTvHeight && |
74 if(aImageDimensions.iHeight<=KHdTvHeight && |
76 aImageDimensions.iWidth<= KHdTvWidth && aFrameCount > 0) |
75 aImageDimensions.iWidth<= KHdTvWidth && aFrameCount > 0) |
77 { |
76 { |
78 GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 1"); |
77 GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 1"); |
79 DestroySurfaceUpdater(); |
78 DestroySurfaceUpdater(); |
142 if (iGlxTvOut->IsHDMIConnected()) |
141 if (iGlxTvOut->IsHDMIConnected()) |
143 { |
142 { |
144 iSurfaceUpdater->DeactivateZoom(); |
143 iSurfaceUpdater->DeactivateZoom(); |
145 } |
144 } |
146 } |
145 } |
|
146 |
|
147 // ----------------------------------------------------------------------------- |
|
148 // ShiftToCloningMode |
|
149 // ----------------------------------------------------------------------------- |
|
150 EXPORT_C void CGlxHdmiController::ShiftToCloningMode() |
|
151 { |
|
152 TRACER("CGlxHdmiController::ShiftToCloningMode()"); |
|
153 if (iGlxTvOut->IsHDMIConnected() && iSurfaceUpdater) |
|
154 { |
|
155 iSurfaceUpdater->ShiftToCloningMode(); |
|
156 } |
|
157 } |
|
158 |
|
159 // ----------------------------------------------------------------------------- |
|
160 // ShiftToPostingMode |
|
161 // ----------------------------------------------------------------------------- |
|
162 EXPORT_C void CGlxHdmiController::ShiftToPostingMode() |
|
163 { |
|
164 TRACER("CGlxHdmiController::ShiftToPostingMode()"); |
|
165 if (iGlxTvOut->IsHDMIConnected() && iSurfaceUpdater) |
|
166 { |
|
167 iSurfaceUpdater->ShiftToPostingMode(); |
|
168 } |
|
169 } |
|
170 |
147 // ----------------------------------------------------------------------------- |
171 // ----------------------------------------------------------------------------- |
148 // Constructor |
172 // Constructor |
149 // ----------------------------------------------------------------------------- |
173 // ----------------------------------------------------------------------------- |
150 CGlxHdmiController::CGlxHdmiController(const TDesC& aImageFile): |
174 CGlxHdmiController::CGlxHdmiController(const TDesC& aImageFile): |
151 iImagePath(aImageFile) |
175 iImagePath(aImageFile) |
159 // ----------------------------------------------------------------------------- |
183 // ----------------------------------------------------------------------------- |
160 void CGlxHdmiController::ConstructL() |
184 void CGlxHdmiController::ConstructL() |
161 { |
185 { |
162 TRACER("CGlxHdmiController::ConstructL()"); |
186 TRACER("CGlxHdmiController::ConstructL()"); |
163 iGlxTvOut = CGlxTv::NewL(*this); |
187 iGlxTvOut = CGlxTv::NewL(*this); |
164 iIsHDMIconnected = EFalse; |
|
165 iIsHDMIdisConnected = EFalse; |
|
166 } |
188 } |
167 |
189 |
168 // ----------------------------------------------------------------------------- |
190 // ----------------------------------------------------------------------------- |
169 // DestroyContainer |
191 // DestroyContainer |
170 // ----------------------------------------------------------------------------- |
192 // ----------------------------------------------------------------------------- |
237 // HandleTvStatusChangedL |
259 // HandleTvStatusChangedL |
238 // ----------------------------------------------------------------------------- |
260 // ----------------------------------------------------------------------------- |
239 void CGlxHdmiController::HandleTvStatusChangedL( TTvChangeType aChangeType ) |
261 void CGlxHdmiController::HandleTvStatusChangedL( TTvChangeType aChangeType ) |
240 { |
262 { |
241 TRACER("CGlxHdmiController::HandleTvStatusChangedL()"); |
263 TRACER("CGlxHdmiController::HandleTvStatusChangedL()"); |
242 if(iIsHDMIdisConnected) |
264 if ( aChangeType == ETvConnectionChanged ) |
243 { |
|
244 iIsHDMIdisConnected = EFalse; |
|
245 } |
|
246 else if ( aChangeType == ETvConnectionChanged ) |
|
247 { |
265 { |
248 if ( iGlxTvOut->IsHDMIConnected() ) |
266 if ( iGlxTvOut->IsHDMIConnected() ) |
249 { |
267 { |
250 GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Connected"); |
268 GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Connected"); |
251 // Calling SetImageL() with appropriate parameters |
269 // Calling SetImageL() with appropriate parameters |
252 if(!iIsHDMIconnected) |
270 SetImageL(iStoredImagePath->Des(), iImageDimensions, iFrameCount, EFalse); |
253 { |
|
254 SetImageL(iStoredImagePath->Des(), iImageDimensions, iFrameCount, EFalse); |
|
255 } |
|
256 } |
271 } |
257 else |
272 else |
258 { |
273 { |
259 // if it gets disconnected, destroy the surface |
274 // if it gets disconnected, destroy the surface |
260 GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Not Connected"); |
275 GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Not Connected"); |
261 iIsHDMIconnected = EFalse; |
|
262 iIsHDMIdisConnected = ETrue; |
|
263 DestroySurfaceUpdater(); |
276 DestroySurfaceUpdater(); |
264 } |
277 } |
265 } |
278 } |
266 } |
279 } |
267 |
280 |