312 } |
312 } |
313 case EMPXControlCmdTvOutConnected: |
313 case EMPXControlCmdTvOutConnected: |
314 { |
314 { |
315 MPX_DEBUG(_L(" [EMPXControlCmdTvOutConnected]")); |
315 MPX_DEBUG(_L(" [EMPXControlCmdTvOutConnected]")); |
316 iTvOutConnected = ETrue; |
316 iTvOutConnected = ETrue; |
317 HandleTvOutEventL( ETrue, aEvent, aValue ); |
317 HandleTvOutEventL( ETrue, aEvent ); |
318 break; |
318 break; |
319 } |
319 } |
320 case EMPXControlCmdTvOutDisconnected: |
320 case EMPXControlCmdTvOutDisconnected: |
321 { |
321 { |
322 MPX_DEBUG(_L(" [EMPXControlCmdTvOutDisConnected]")); |
322 MPX_DEBUG(_L(" [EMPXControlCmdTvOutDisConnected]")); |
323 iTvOutConnected = EFalse; |
323 iTvOutConnected = EFalse; |
324 HandleTvOutEventL( EFalse, aEvent, aValue ); |
324 HandleTvOutEventL( EFalse, aEvent ); |
325 break; |
325 break; |
326 } |
326 } |
327 case EMPXControlCmdHandleBackgroundEvent: |
327 case EMPXControlCmdHandleBackgroundEvent: |
328 { |
328 { |
329 MPX_DEBUG(_L(" [EMPXControlCmdHandleBackgroundEvent]")); |
329 MPX_DEBUG(_L(" [EMPXControlCmdHandleBackgroundEvent]")); |
1795 // ------------------------------------------------------------------------------------------------- |
1795 // ------------------------------------------------------------------------------------------------- |
1796 // CMPXVideoPlaybackControlsController::HandleTvOutEventL |
1796 // CMPXVideoPlaybackControlsController::HandleTvOutEventL |
1797 // ------------------------------------------------------------------------------------------------- |
1797 // ------------------------------------------------------------------------------------------------- |
1798 // |
1798 // |
1799 void CMPXVideoPlaybackControlsController::HandleTvOutEventL( |
1799 void CMPXVideoPlaybackControlsController::HandleTvOutEventL( |
1800 TBool aConnected, TMPXVideoPlaybackControlCommandIds aEvent, TInt aValue ) |
1800 TBool aConnected, TMPXVideoPlaybackControlCommandIds aEvent ) |
1801 { |
1801 { |
1802 MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::HandleTvOutEventL()")); |
1802 MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::HandleTvOutEventL()")); |
1803 |
1803 |
1804 iFileDetails->iTvOutConnected = aConnected; |
1804 iFileDetails->iTvOutConnected = aConnected; |
1805 |
|
1806 if ( iFileDetails->iTvOutConnected ) |
|
1807 { |
|
1808 iFileDetails->iTvOutPlayAllowed = aValue; |
|
1809 } |
|
1810 else |
|
1811 { |
|
1812 iFileDetails->iTvOutPlayAllowed = ETrue; |
|
1813 } |
|
1814 |
|
1815 iControlsConfig->UpdateControlListL( aEvent ); |
1805 iControlsConfig->UpdateControlListL( aEvent ); |
1816 ControlsListUpdatedL(); |
1806 ControlsListUpdatedL(); |
1817 } |
1807 } |
1818 |
1808 |
1819 // ------------------------------------------------------------------------------------------------- |
1809 // ------------------------------------------------------------------------------------------------- |
1948 // CMPXVideoPlaybackControlsController::ShowAspectRatioIcon |
1938 // CMPXVideoPlaybackControlsController::ShowAspectRatioIcon |
1949 // ------------------------------------------------------------------------------------------------- |
1939 // ------------------------------------------------------------------------------------------------- |
1950 // |
1940 // |
1951 TBool CMPXVideoPlaybackControlsController::ShowAspectRatioIcon() |
1941 TBool CMPXVideoPlaybackControlsController::ShowAspectRatioIcon() |
1952 { |
1942 { |
1953 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()")); |
1943 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()")); |
1954 |
1944 |
1955 TBool retVal = EFalse; |
1945 TBool retVal = EFalse; |
1956 |
1946 |
1957 if ( iFileDetails->iVideoEnabled && |
1947 if ( iFileDetails->iVideoEnabled && |
1958 iFileDetails->iVideoHeight > 0 && |
1948 iFileDetails->iVideoHeight > 0 && |
1959 iFileDetails->iVideoWidth > 0 && |
1949 iFileDetails->iVideoWidth > 0 && |
1960 AknLayoutUtils::PenEnabled() ) |
1950 AknLayoutUtils::PenEnabled() ) |
1961 { |
1951 { |
1962 TRect displayRect = iContainer->Rect(); |
1952 TRect displayRect = iContainer->Rect(); |
1963 TReal displayAspectRatio = ( TReal32 )displayRect.Width() / ( TReal32 )displayRect.Height(); |
1953 TReal displayAspectRatio = ( TReal32 )displayRect.Width() / ( TReal32 )displayRect.Height(); |
1964 TReal videoAspectRatio = ( TReal32 )iFileDetails->iVideoWidth / |
1954 TReal videoAspectRatio = ( TReal32 )iFileDetails->iVideoWidth / |
1965 ( TReal32 )iFileDetails->iVideoHeight; |
1955 ( TReal32 )iFileDetails->iVideoHeight; |
1966 |
1956 |
1967 // If clip's AR is as same as screen display AR, AspectRatioIcon does not display. |
1957 // If clip's AR is as same as screen display AR, AspectRatioIcon does not display. |
1968 if ( displayAspectRatio != videoAspectRatio ) |
1958 if ( displayAspectRatio != videoAspectRatio ) |
1969 { |
1959 { |
1970 retVal = ETrue; |
1960 retVal = ETrue; |