videoplayback/videohelix/src/mpxvideoplayerutility.cpp
changeset 34 bbb98528c666
parent 30 4f111d64a341
child 35 3738fe97f027
equal deleted inserted replaced
33:48e74db5d516 34:bbb98528c666
    13 *
    13 *
    14 * Description:  This class is the interface between the playback plugin and RMMFController
    14 * Description:  This class is the interface between the playback plugin and RMMFController
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 15 %
    18 // Version : %version: 18 %
    19 
    19 
    20 
    20 
    21 #include <AudioPreference.h>
    21 #include <AudioPreference.h>
    22 #include <mmf/server/mmffile.h>
    22 #include <mmf/server/mmffile.h>
    23 #include <caf/caftypes.h>
    23 #include <caf/caftypes.h>
    77         iControllerEventMonitor->Cancel();
    77         iControllerEventMonitor->Cancel();
    78         delete iControllerEventMonitor;
    78         delete iControllerEventMonitor;
    79         iControllerEventMonitor = NULL;
    79         iControllerEventMonitor = NULL;
    80     }
    80     }
    81 
    81 
       
    82     if ( ! iSurfaceId.IsNull() )
       
    83     {
       
    84         MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoRemoveDisplayWindow ) );
       
    85         iSurfaceId = TSurfaceId::CreateNullId();
       
    86     }
       
    87 
    82     iController.Close();
    88     iController.Close();
    83     iDirectScreenAccessAbort = EFalse;
    89     iDirectScreenAccessAbort = EFalse;
    84 }
    90 }
    85 
    91 
    86 void CMpxVideoPlayerUtility::Reset()
    92 void CMpxVideoPlayerUtility::Reset()
   269     {
   275     {
   270         User::LeaveIfError(
   276         User::LeaveIfError(
   271                 iVideoPlayControllerCustomCommands.DirectScreenAccessEvent( EResumeDSA ) );
   277                 iVideoPlayControllerCustomCommands.DirectScreenAccessEvent( EResumeDSA ) );
   272 
   278 
   273         iDirectScreenAccessAbort = EFalse;
   279         iDirectScreenAccessAbort = EFalse;
       
   280     }
       
   281 }
       
   282 
       
   283 
       
   284 // -------------------------------------------------------------------------------------------------
       
   285 //   CMpxVideoPlayerUtility::SurfaceRemovedFromView()
       
   286 // -------------------------------------------------------------------------------------------------
       
   287 //
       
   288 void CMpxVideoPlayerUtility::SurfaceRemovedFromView()
       
   289 {
       
   290     MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SurfaceRemovedFromView()"));
       
   291 
       
   292     if ( ! iSurfaceId.IsNull() )
       
   293     {
       
   294         iSurfaceId = TSurfaceId::CreateNullId();
   274     }
   295     }
   275 }
   296 }
   276 
   297 
   277 TBool CMpxVideoPlayerUtility::AudioEnabledL() const
   298 TBool CMpxVideoPlayerUtility::AudioEnabledL() const
   278 {
   299 {
   567 //
   588 //
   568 TInt CMpxVideoPlayerUtility::RemoveSurface()
   589 TInt CMpxVideoPlayerUtility::RemoveSurface()
   569 {
   590 {
   570     TInt error = KErrNone;
   591     TInt error = KErrNone;
   571 
   592 
   572     if ( iSurfaceId.IsNull() )
   593     if ( !iSurfaceId.IsNull() )
   573     {
   594     {
   574         error = KErrNotFound;
   595         //
   575     }
   596         //  Send command to view to remove the surface
   576 
   597         //
   577     //
   598         MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
   578     //  Send command to view to remove the surface
   599 
   579     //
   600         error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
   580     MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
   601 
   581 
   602         iSurfaceId = TSurfaceId::CreateNullId();
   582     error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
   603     }
   583 
       
   584     iSurfaceId = TSurfaceId::CreateNullId();
       
   585 
   604 
   586     return error;
   605     return error;
   587 }
   606 }
   588 
   607 
   589 // -------------------------------------------------------------------------------------------------
   608 // -------------------------------------------------------------------------------------------------