Bläddra i källkod

MacOSX/Framework: Reenable play and pause.

Pierre d'Herbemont 18 år sedan
förälder
incheckning
1d00a1c200
1 ändrade filer med 9 tillägg och 9 borttagningar
  1. 9 9
      Sources/VLCVideoView.m

+ 9 - 9
Sources/VLCVideoView.m

@@ -158,7 +158,7 @@ static void HandleMediaListPlayerStopped( const libvlc_event_t * event, void * s
 {
     libvlc_exception_t p_e;
     libvlc_exception_init( &p_e );
-    //libvlc_media_list_player_pause( p_mlp, &p_e );
+    libvlc_media_list_player_pause( p_mlp, &p_e );
     quit_on_exception( &p_e );
 }
 
@@ -170,14 +170,18 @@ static void HandleMediaListPlayerStopped( const libvlc_event_t * event, void * s
 /* State */
 - (BOOL)isPlaying
 {
-    //libvlc_media_list_player_is_playing( p_mlp, &p_e );
-    //quit_on_exception( &p_e );
-    return FALSE;
+    libvlc_exception_t p_e;
+    BOOL ret = libvlc_media_list_player_is_playing( p_mlp, &p_e );
+    quit_on_exception( &p_e );
+    return ret;
 }
 
 - (BOOL)isPaused
 {
-    return FALSE;
+    libvlc_exception_t p_e;
+    libvlc_state_t state = libvlc_media_list_player_get_state( p_mlp, &p_e );
+    quit_on_exception( &p_e );
+    return (state == libvlc_Paused);
 }
 
 - (VLCTime *)currentTime
@@ -234,10 +238,6 @@ static void HandleMediaListPlayerStopped( const libvlc_event_t * event, void * s
     NSRectFill(aRect);
     [self unlockFocus];
 }
-- (BOOL)preservesContentDuringLiveResize
-{
-    return NO;//YES;
-}
 - (BOOL)isOpaque
 {
     return YES;