videoplayback/videohelix/src/mpxvideoplayerutility.cpp
branchRCL_3
changeset 9 5294c000a26d
parent 8 ce5ada96ab30
child 10 112a725ff2c2
equal deleted inserted replaced
8:ce5ada96ab30 9:5294c000a26d
    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: 16 %
    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>
   286 // -------------------------------------------------------------------------------------------------
   286 // -------------------------------------------------------------------------------------------------
   287 //
   287 //
   288 void CMpxVideoPlayerUtility::SurfaceRemovedFromView()
   288 void CMpxVideoPlayerUtility::SurfaceRemovedFromView()
   289 {
   289 {
   290     MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SurfaceRemovedFromView()"));
   290     MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SurfaceRemovedFromView()"));
   291     
   291 
   292     if ( ! iSurfaceId.IsNull() )
   292     if ( ! iSurfaceId.IsNull() )
   293     {
   293     {
   294         iSurfaceId = TSurfaceId::CreateNullId();
   294         iSurfaceId = TSurfaceId::CreateNullId();
   295     }
   295     }
   296 }
   296 }
   588 //
   588 //
   589 TInt CMpxVideoPlayerUtility::RemoveSurface()
   589 TInt CMpxVideoPlayerUtility::RemoveSurface()
   590 {
   590 {
   591     TInt error = KErrNone;
   591     TInt error = KErrNone;
   592 
   592 
   593     if ( iSurfaceId.IsNull() )
   593     if ( !iSurfaceId.IsNull() )
   594     {
   594     {
   595         error = KErrNotFound;
   595         //
   596     }
   596         //  Send command to view to remove the surface
   597 
   597         //
   598     //
   598         MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
   599     //  Send command to view to remove the surface
   599 
   600     //
   600         error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
   601     MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
   601 
   602 
   602         iSurfaceId = TSurfaceId::CreateNullId();
   603     error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
   603     }
   604 
       
   605     iSurfaceId = TSurfaceId::CreateNullId();
       
   606 
   604 
   607     return error;
   605     return error;
   608 }
   606 }
   609 
   607 
   610 // -------------------------------------------------------------------------------------------------
   608 // -------------------------------------------------------------------------------------------------