videoplayback/videohelix/src/mpxvideoplaybackstate.cpp
branchRCL_3
changeset 21 315810614048
parent 20 2d690156cf8f
equal deleted inserted replaced
20:2d690156cf8f 21:315810614048
    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: 46 %
    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     }
  1273 {
  1273 {
  1274     MPX_ENTER_EXIT(_L("CMPXInitialisedState::HandleForeground()"));
  1274     MPX_ENTER_EXIT(_L("CMPXInitialisedState::HandleForeground()"));
  1275     CommandHandleForeground();
  1275     CommandHandleForeground();
  1276 }
  1276 }
  1277 
  1277 
       
  1278 //  ------------------------------------------------------------------------------------------------
       
  1279 //  CMPXInitialisedState::HandlePause()
       
  1280 //  ------------------------------------------------------------------------------------------------
       
  1281 void CMPXInitialisedState::HandlePause()
       
  1282 {
       
  1283     MPX_ENTER_EXIT(_L("CMPXInitialisedState::HandlePause()"));
       
  1284 
       
  1285     iVideoPlaybackCtlr->iPlaybackMode->HandlePause();
       
  1286 }
       
  1287 
  1278 // *************************************************************************************************
  1288 // *************************************************************************************************
  1279 //
  1289 //
  1280 //                          CMPXPlayingState
  1290 //                          CMPXPlayingState
  1281 //
  1291 //
  1282 // *************************************************************************************************
  1292 // *************************************************************************************************
  1375 //    CMPXPlayingState::HandleSetPosterFrame()
  1385 //    CMPXPlayingState::HandleSetPosterFrame()
  1376 //  ------------------------------------------------------------------------------------------------
  1386 //  ------------------------------------------------------------------------------------------------
  1377 void CMPXPlayingState::HandleSetPosterFrame()
  1387 void CMPXPlayingState::HandleSetPosterFrame()
  1378 {
  1388 {
  1379     MPX_DEBUG(_L("CMPXPlayingState::HandleSetPosterFrame()"));
  1389     MPX_DEBUG(_L("CMPXPlayingState::HandleSetPosterFrame()"));
  1380     
  1390 
  1381     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();    
  1391     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
  1382 }
  1392 }
  1383 
  1393 
  1384 
  1394 
  1385 //  ------------------------------------------------------------------------------------------------
  1395 //  ------------------------------------------------------------------------------------------------
  1386 //  CMPXPlayingState::HandleStartSeekL()
  1396 //  CMPXPlayingState::HandleStartSeekL()
  1540 //  ------------------------------------------------------------------------------------------------
  1550 //  ------------------------------------------------------------------------------------------------
  1541 //    CMPXPausedState::HandleSetPosterFrame()
  1551 //    CMPXPausedState::HandleSetPosterFrame()
  1542 //  ------------------------------------------------------------------------------------------------
  1552 //  ------------------------------------------------------------------------------------------------
  1543 void CMPXPausedState::HandleSetPosterFrame()
  1553 void CMPXPausedState::HandleSetPosterFrame()
  1544 {
  1554 {
  1545     MPX_DEBUG(_L("CMPXPausedState::HandleSetPosterFrame()"));    
  1555     MPX_DEBUG(_L("CMPXPausedState::HandleSetPosterFrame()"));
  1546     
  1556 
  1547     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
  1557     iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
  1548 }
  1558 }
  1549 
  1559 
  1550 //  ------------------------------------------------------------------------------------------------
  1560 //  ------------------------------------------------------------------------------------------------
  1551 //  CMPXPausedState::HandleSetPositionL()
  1561 //  CMPXPausedState::HandleSetPositionL()
  1638     {
  1648     {
  1639         IssuePlayCommand( EMPXVideoPlaying, MMPXPlaybackPluginObserver::EPPlaying, EFalse );
  1649         IssuePlayCommand( EMPXVideoPlaying, MMPXPlaybackPluginObserver::EPPlaying, EFalse );
  1640     }
  1650     }
  1641     else
  1651     else
  1642     {
  1652     {
  1643         // 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
  1644         // 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.
  1645         iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPPaused,
  1655         iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPPaused,
  1646                                                               0,
  1656                                                               0,
  1647                                                               KErrNone );
  1657                                                               KErrNone );
  1648     }
  1658     }
  1649 }
  1659 }