equal
deleted
inserted
replaced
81 CMMAVideoPlayer::CMMAVideoPlayer( |
81 CMMAVideoPlayer::CMMAVideoPlayer( |
82 CMMAMMFResolver* aResolver): |
82 CMMAMMFResolver* aResolver): |
83 CMMAAudioPlayer(aResolver), |
83 CMMAAudioPlayer(aResolver), |
84 iVideoControllerCustomCommands(iController), |
84 iVideoControllerCustomCommands(iController), |
85 iVideoPlayControllerCustomCommands(iController), |
85 iVideoPlayControllerCustomCommands(iController), |
86 iVideoPlaySurfaceSupportCustomCommands(iController) |
86 iVideoPlaySurfaceSupportCustomCommands(iController), |
|
87 isHDMICableConnected(EFalse) |
87 { |
88 { |
88 iMMASurface.iPrevSurfaceAvailable = EFalse; |
89 iMMASurface.iPrevSurfaceAvailable = EFalse; |
89 } |
90 } |
90 |
91 |
91 void CMMAVideoPlayer::ConstructL() |
92 void CMMAVideoPlayer::ConstructL() |
246 |
247 |
247 // Start player again and ignore error |
248 // Start player again and ignore error |
248 if ((aEvent.iEventType == KMMFEventCategoryVideoPlayerGeneralError) && |
249 if ((aEvent.iEventType == KMMFEventCategoryVideoPlayerGeneralError) && |
249 (aEvent.iErrorCode == KMMVideoBlitError)) |
250 (aEvent.iErrorCode == KMMVideoBlitError)) |
250 { |
251 { |
251 TRAPD(error, StartL(EFalse)); |
252 // incase of HDMI cable is inserted, start the player again before ignoring the error otherwise simply ignore |
252 if (KErrNone != error) |
253 if(isHDMICableConnected) |
253 { |
254 { |
254 DEBUG_INT("MMA:CMMAVideoPlayer::HandleEvent, StartL() error %d", error); |
255 TRAPD(error, StartL(EFalse)); |
255 } |
256 if (KErrNone != error) |
256 return; |
257 { |
|
258 DEBUG_INT("MMA:CMMAVideoPlayer::HandleEvent, StartL() error %d", |
|
259 error); |
|
260 } |
|
261 return; |
|
262 } |
|
263 else // no HDMI cable is inserted, Hence ignore the error. |
|
264 { |
|
265 return; |
|
266 } |
257 } |
267 } |
258 |
268 |
259 // KNotCompleteVideoError can be notified when video is not complete |
269 // KNotCompleteVideoError can be notified when video is not complete |
260 // ( missing sound ) but still can be played. Because |
270 // ( missing sound ) but still can be played. Because |
261 // CMMAAudioPlayer::HandleEvent fails with all negative error codes, |
271 // CMMAAudioPlayer::HandleEvent fails with all negative error codes, |
567 { |
577 { |
568 TAccMonCapability deviceType = aAccessoryInfo->AccDeviceType() ; |
578 TAccMonCapability deviceType = aAccessoryInfo->AccDeviceType() ; |
569 DEBUG_INT("MID::CMMAVideoPlayer::ConnectedL %d", deviceType); |
579 DEBUG_INT("MID::CMMAVideoPlayer::ConnectedL %d", deviceType); |
570 if (iSurfaceWindow && (deviceType == KAccMonAVDevice)) |
580 if (iSurfaceWindow && (deviceType == KAccMonAVDevice)) |
571 { |
581 { |
|
582 isHDMICableConnected = ETrue; |
572 iSurfaceWindow->SetAVCableConnStatus(ETrue); |
583 iSurfaceWindow->SetAVCableConnStatus(ETrue); |
573 } |
584 } |
574 } |
585 } |
575 |
586 |
576 void CMMAVideoPlayer::DisconnectedL(CAccMonitorInfo* aAccessoryInfo) |
587 void CMMAVideoPlayer::DisconnectedL(CAccMonitorInfo* aAccessoryInfo) |
577 { |
588 { |
578 TAccMonCapability deviceType = aAccessoryInfo->AccDeviceType() ; |
589 TAccMonCapability deviceType = aAccessoryInfo->AccDeviceType() ; |
579 DEBUG_INT("MID::CMMAVideoPlayer::DisconnectedL %d", deviceType); |
590 DEBUG_INT("MID::CMMAVideoPlayer::DisconnectedL %d", deviceType); |
580 if (iSurfaceWindow && (deviceType == KAccMonAVDevice)) |
591 if (iSurfaceWindow && (deviceType == KAccMonAVDevice)) |
581 { |
592 { |
|
593 isHDMICableConnected = EFalse; |
582 iSurfaceWindow->SetAVCableConnStatus(EFalse); |
594 iSurfaceWindow->SetAVCableConnStatus(EFalse); |
583 } |
595 } |
584 } |
596 } |
585 |
597 |
586 void CMMAVideoPlayer::AccMonitorObserverError(TInt aError) |
598 void CMMAVideoPlayer::AccMonitorObserverError(TInt aError) |