videoplayback/videohelix/src/mpxvideoplaybackstate.cpp
changeset 52 e3cecb93e76a
parent 47 45e72b57a2fd
child 62 0e1e938beb1a
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
    14 * Description:  This class plays local video file
    14 * Description:  This class plays local video file
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 47 %
    19 // Version : %version: 48 %
    20 
    20 
    21 
    21 
    22 //
    22 //
    23 //  INCLUDE FILES
    23 //  INCLUDE FILES
    24 //
    24 //
   175 //  ------------------------------------------------------------------------------------------------
   175 //  ------------------------------------------------------------------------------------------------
   176 //    CMPXVideoPlaybackState::HandleSetPosterFrame()
   176 //    CMPXVideoPlaybackState::HandleSetPosterFrame()
   177 //  ------------------------------------------------------------------------------------------------
   177 //  ------------------------------------------------------------------------------------------------
   178 void CMPXVideoPlaybackState::HandleSetPosterFrame()
   178 void CMPXVideoPlaybackState::HandleSetPosterFrame()
   179 {
   179 {
   180     MPX_DEBUG(_L("CMPXVideoPlaybackState::HandleSetPosterFrame()"));    
   180     MPX_DEBUG(_L("CMPXVideoPlaybackState::HandleSetPosterFrame()"));
   181 }
   181 }
   182 
   182 
   183 //  ------------------------------------------------------------------------------------------------
   183 //  ------------------------------------------------------------------------------------------------
   184 //    CMPXVideoPlaybackState::HandleForeground()
   184 //    CMPXVideoPlaybackState::HandleForeground()
   185 //  ------------------------------------------------------------------------------------------------
   185 //  ------------------------------------------------------------------------------------------------
   237 void CMPXVideoPlaybackState::HandlePlaybackComplete( TInt aError )
   237 void CMPXVideoPlaybackState::HandlePlaybackComplete( TInt aError )
   238 {
   238 {
   239     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::HandlePlaybackComplete()"),
   239     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::HandlePlaybackComplete()"),
   240                    _L("error = %d"), aError );
   240                    _L("error = %d"), aError );
   241 
   241 
       
   242     iVideoPlaybackCtlr->ChangeState( EMPXVideoStopped );
       
   243 
   242     if ( aError == KErrNone )
   244     if ( aError == KErrNone )
   243     {
   245     {
   244         iVideoPlaybackCtlr->ChangeState( EMPXVideoStopped );
       
   245 
       
   246         iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent(
   246         iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent(
   247             MMPXPlaybackPluginObserver::EPPlayComplete,
   247             MMPXPlaybackPluginObserver::EPPlayComplete,
   248             0,
   248             0,
   249             aError );
   249             aError );
   250     }
   250     }
  1385 //    CMPXPlayingState::HandleSetPosterFrame()
  1385 //    CMPXPlayingState::HandleSetPosterFrame()
  1386 //  ------------------------------------------------------------------------------------------------
  1386 //  ------------------------------------------------------------------------------------------------
  1387 void CMPXPlayingState::HandleSetPosterFrame()
  1387 void CMPXPlayingState::HandleSetPosterFrame()
  1388 {
  1388 {
  1389     MPX_DEBUG(_L("CMPXPlayingState::HandleSetPosterFrame()"));
  1389     MPX_DEBUG(_L("CMPXPlayingState::HandleSetPosterFrame()"));
  1390     
  1390 
  1391     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();    
  1391     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
  1392 }
  1392 }
  1393 
  1393 
  1394 
  1394 
  1395 //  ------------------------------------------------------------------------------------------------
  1395 //  ------------------------------------------------------------------------------------------------
  1396 //  CMPXPlayingState::HandleStartSeekL()
  1396 //  CMPXPlayingState::HandleStartSeekL()
  1550 //  ------------------------------------------------------------------------------------------------
  1550 //  ------------------------------------------------------------------------------------------------
  1551 //    CMPXPausedState::HandleSetPosterFrame()
  1551 //    CMPXPausedState::HandleSetPosterFrame()
  1552 //  ------------------------------------------------------------------------------------------------
  1552 //  ------------------------------------------------------------------------------------------------
  1553 void CMPXPausedState::HandleSetPosterFrame()
  1553 void CMPXPausedState::HandleSetPosterFrame()
  1554 {
  1554 {
  1555     MPX_DEBUG(_L("CMPXPausedState::HandleSetPosterFrame()"));    
  1555     MPX_DEBUG(_L("CMPXPausedState::HandleSetPosterFrame()"));
  1556     
  1556 
  1557     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
  1557     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
  1558 }
  1558 }
  1559 
  1559 
  1560 //  ------------------------------------------------------------------------------------------------
  1560 //  ------------------------------------------------------------------------------------------------
  1561 //  CMPXPausedState::HandleSetPositionL()
  1561 //  CMPXPausedState::HandleSetPositionL()
  1648     {
  1648     {
  1649         IssuePlayCommand( EMPXVideoPlaying, MMPXPlaybackPluginObserver::EPPlaying, EFalse );
  1649         IssuePlayCommand( EMPXVideoPlaying, MMPXPlaybackPluginObserver::EPPlaying, EFalse );
  1650     }
  1650     }
  1651     else
  1651     else
  1652     {
  1652     {
  1653         // As the custom play command could not resume the playback. Send a pause event to 
  1653         // As the custom play command could not resume the playback. Send a pause event to
  1654         // the view though the MPX FW to get the view state in sync playback plugin. 
  1654         // the view though the MPX FW to get the view state in sync playback plugin.
  1655         iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPPaused,
  1655         iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPPaused,
  1656                                                               0,
  1656                                                               0,
  1657                                                               KErrNone );
  1657                                                               KErrNone );
  1658     }
  1658     }
  1659 }
  1659 }