1311 // Both are likely. "AV Out -> HDMI" occurs if AV Out cable is connected and HDMI cable is then connected. |
1311 // Both are likely. "AV Out -> HDMI" occurs if AV Out cable is connected and HDMI cable is then connected. |
1312 // "HDMI -> AV Out" occurs if both AV Out and HDMI cables are connected and HDMI cable is then disconnected. |
1312 // "HDMI -> AV Out" occurs if both AV Out and HDMI cables are connected and HDMI cable is then disconnected. |
1313 // HDMI is preferred over AV Out. |
1313 // HDMI is preferred over AV Out. |
1314 |
1314 |
1315 // update external display window data |
1315 // update external display window data |
1316 iExtDisplayHandler->UpdateWindow(); |
1316 if(iExtDisplayHandler) |
1317 TRect externalDisplayRect(TPoint(0, 0), iExtDisplayHandler->DisplaySizeInPixels()); |
|
1318 (*iWindowsArrayPtr)[0].iClipRect = externalDisplayRect; |
|
1319 (*iWindowsArrayPtr)[0].iVideoExtent = externalDisplayRect; |
|
1320 TRAPD(err, (*iWindowsArrayPtr)[0].iAutoScaleType = ExtDisplayAutoScaleTypeL()); |
|
1321 if(err == KErrNone) |
|
1322 { |
1317 { |
1323 RemoveBackgroundSurface(ETrue); |
1318 iExtDisplayHandler->UpdateWindow(); |
1324 RedrawWindows(iCropRegion); |
1319 TRect externalDisplayRect(TPoint(0, 0), iExtDisplayHandler->DisplaySizeInPixels()); |
|
1320 (*iWindowsArrayPtr)[0].iClipRect = externalDisplayRect; |
|
1321 (*iWindowsArrayPtr)[0].iVideoExtent = externalDisplayRect; |
|
1322 TRAPD(err, (*iWindowsArrayPtr)[0].iAutoScaleType = ExtDisplayAutoScaleTypeL()); |
|
1323 if(err == KErrNone) |
|
1324 { |
|
1325 RemoveBackgroundSurface(ETrue); |
|
1326 RedrawWindows(iCropRegion); |
|
1327 } |
|
1328 else |
|
1329 { |
|
1330 // Not a lot we can do. Just keep as it is but external display output will be incorrect. |
|
1331 DEBUG_PRINTF2("CMediaClientVideoDisplayBody::MedcpcExtDisplayNotifyConnected ExtDisplayAutoScaleTypeL failed %d", err); |
|
1332 } |
1325 } |
1333 } |
1326 else |
1334 else |
1327 { |
1335 { |
1328 // Not a lot we can do. Just keep as it is but external display output will be incorrect. |
1336 // External display handler does not exist, probably because there was a failure during its earlier construction. |
1329 DEBUG_PRINTF2("CMediaClientVideoDisplayBody::MedcpcExtDisplayNotifyConnected ExtDisplayAutoScaleTypeL failed %d", err); |
1337 // Ignore notification. |
|
1338 DEBUG_PRINTF("CMediaClientVideoDisplayBody::MedcpcExtDisplayNotifyConnected iExtDisplayHandler does not exist - switch not attempted!"); |
1330 } |
1339 } |
1331 } |
1340 } |
1332 } |
1341 } |
1333 else |
1342 else |
1334 { |
1343 { |