videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp
changeset 50 21fe8338c6bf
parent 38 ff53afa8ad05
child 58 d2b028fd1f7d
--- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Fri Jul 23 11:10:06 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Fri Aug 06 09:43:48 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 62 %
+// Version : %version: 65 %
 
 
 //
@@ -544,7 +544,21 @@
             case EPbCmdSetPosterFrame:
             {
                 iState->HandleSetPosterFrame();
-                break;    
+                break;
+            }
+            case EPbCmdSurfaceRemovedFromWindow:
+            {
+                TSurfaceId surfaceId =
+                    aCmd.ValueTObjectL<TSurfaceId>( KMPXMediaVideoDisplayTSurfaceId );
+
+                TInt error = iPlayer->RemoveSurfaceFromHelix( surfaceId );
+
+                if ( error != KErrNone )
+                {
+                    MPX_TRAPD( err, iState->SendErrorToViewL( error ) );
+                }
+
+                break;
             }
         }
     }
@@ -770,12 +784,7 @@
     }
     else if ( aEvent.iEventType == KMMFEventCategoryVideoRemoveSurface )
     {
-        TInt error = iPlayer->RemoveSurface();
-
-        if ( error != KErrNone )
-        {
-            MPX_TRAPD( err, iState->SendErrorToViewL( error ) );
-        }
+        iPlayer->RemoveSurface();
     }
 #endif // SYMBIAN_BUILD_GCE
     else if ( aEvent.iEventType == KMMFEventCategoryVideoPlayerGeneralError )
@@ -868,7 +877,7 @@
         _L("CMPXVideoPlaybackController::SetVolumeCenRepL()"),
         _L("aVolume = %d"), aVolume );
 
-    if ( iFileDetails && iFileDetails->iAudioEnabled )
+    if ( iFileDetails && iFileDetails->iAudioEnabled && !iAccessoryMonitor->IsTvOutConnected() )
     {
         TInt volume( 0 );
 
@@ -891,7 +900,7 @@
         // For example, if we get 77, we need to save it as 70 in 10 volume steps
         //
         volume -= volume % iVolumeNormalizer;
- 
+
         MPX_DEBUG(
             _L("CMPXVideoPlaybackController::SetVolumeCenRepL(): Setting volume = %d"), volume );
 
@@ -2522,15 +2531,15 @@
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
-//  ------------------------------------------------------------------------------------------------ 
-//    CMPXVideoPlaybackController::IsViewActivated() 
-//  ------------------------------------------------------------------------------------------------ 
-// 
-TBool CMPXVideoPlaybackController::IsViewActivated() 
-{ 
-    MPX_DEBUG(_L("CMPXVideoPlaybackController::IsViewActivated")); 
-    return iViewActivated; 
-} 
+//  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackController::IsViewActivated()
+//  ------------------------------------------------------------------------------------------------
+//
+TBool CMPXVideoPlaybackController::IsViewActivated()
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackController::IsViewActivated(%d)"), iViewActivated);
+    return iViewActivated;
+}
 
 //  ------------------------------------------------------------------------------------------------
 //    CMPXVideoPlaybackController::HandleFrameReady()
@@ -2539,7 +2548,7 @@
 void CMPXVideoPlaybackController::HandleFrameReady(TInt aError)
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackController::HandleFrameReady"));
-    
+
     iPlaybackMode->HandleFrameReady(aError);
 }
 // End of file