]> git.sesse.net Git - vlc/commitdiff
* core/playlist: PLAYLIST_PAUSE, playlist_IsPlaying, playlist_IsEmpty
authorJon Lech Johansen <jlj@videolan.org>
Wed, 29 Jan 2003 11:34:11 +0000 (11:34 +0000)
committerJon Lech Johansen <jlj@videolan.org>
Wed, 29 Jan 2003 11:34:11 +0000 (11:34 +0000)
 * modules/gui/macosx: started getting rid of p_intf->p_sys->p_input
                       and using p_playlist->p_input instead.

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
include/vlc_playlist.h
modules/gui/macosx/controls.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/playlist.m
src/playlist/playlist.c

index e755e060c7099c4be0cdedab98ad9017fb5aa0d0..5ac43a02670b1757c9e5de3a190ced0e72b05c12 100644 (file)
@@ -5,7 +5,6 @@
         {
             ACTIONS = {
                 deinterlace = id; 
-                fastForward = id; 
                 faster = id; 
                 fullscreen = id; 
                 loop = id; 
@@ -14,7 +13,6 @@
                 pause = id; 
                 play = id; 
                 prev = id; 
-                slowMotion = id; 
                 slower = id; 
                 stop = id; 
                 toggleChapter = id; 
index 54e5c766a1fd5e0d16f9a9fd05592d4739bb0a15..dbc2dfb4ffdfe283e3edec441bcd8cfaa60fcbbc 100644 (file)
@@ -7,7 +7,7 @@
        <key>IBEditorPositions</key>
        <dict>
                <key>29</key>
-               <string>16 822 419 44 0 0 1280 1002 </string>
+               <string>22 973 419 44 0 0 1600 1178 </string>
                <key>303</key>
                <string>60 509 104 66 0 0 1280 1002 </string>
                <key>909</key>
index d8fbd3f699f92e923ea178064966f1550c8be917..ac7df940999147efe55387fecb67689ee1ef91ec 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 8492740114cabb779655a43b173b8a73c202cbb5..631c1a47b5f3c7009de9940d1b6a6792db15a70b 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_playlist.h : Playlist functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: vlc_playlist.h,v 1.7 2002/12/13 16:26:34 babal Exp $
+ * $Id: vlc_playlist.h,v 1.8 2003/01/29 11:34:11 jlj Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -53,6 +53,13 @@ struct playlist_t
     input_thread_t *      p_input;
 };
 
+/*****************************************************************************
+ * Playlist status
+ *****************************************************************************/
+#define PLAYLIST_STOPPED 0
+#define PLAYLIST_RUNNING 1
+#define PLAYLIST_PAUSED  2
+
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
@@ -74,3 +81,25 @@ VLC_EXPORT( int,  playlist_AddItem, ( playlist_t *, playlist_item_t *, int, int
 VLC_EXPORT( int,  playlist_Delete, ( playlist_t *, int ) );
 VLC_EXPORT( int,  playlist_LoadFile, ( playlist_t *, const char * ) );
 VLC_EXPORT( int,  playlist_SaveFile, ( playlist_t *, const char * ) );
+
+static inline vlc_bool_t playlist_IsPlaying( playlist_t * p_playlist )
+{
+    vlc_bool_t b_playing;
+
+    vlc_mutex_lock( &p_playlist->object_lock );
+    b_playing = p_playlist->i_status == PLAYLIST_RUNNING; 
+    vlc_mutex_unlock( &p_playlist->object_lock );
+
+    return( b_playing );
+}
+
+static inline vlc_bool_t playlist_IsEmpty( playlist_t * p_playlist )
+{
+    vlc_bool_t b_empty;
+
+    vlc_mutex_lock( &p_playlist->object_lock );
+    b_empty = p_playlist->i_size == 0;
+    vlc_mutex_unlock( &p_playlist->object_lock );
+
+    return( b_empty );
+}
index 1a0337bd2b7cbc9564bd442b658c7105bb296282..ffaab6cd61e12d7586163e0667b68505dc7d4aef 100644 (file)
@@ -2,7 +2,7 @@
  * controls.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: controls.m,v 1.16 2003/01/28 16:47:46 hartman Exp $
+ * $Id: controls.m,v 1.17 2003/01/29 11:34:11 jlj Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -36,7 +36,6 @@
 #include <vlc/input.h>
 
 #include <Cocoa/Cocoa.h> 
-#include <CoreAudio/AudioHardware.h>
 
 #include "intf.h"
 #include "vout.h"
     IBOutlet id o_main;
     IBOutlet id o_mi_mute;
     IBOutlet id o_volumeslider;
-    int i_ff;
 }
 
 - (IBAction)play:(id)sender;
 - (IBAction)stop:(id)sender;
 - (IBAction)faster:(id)sender;
 - (IBAction)slower:(id)sender;
-- (IBAction)slowMotion:(id)sender;
-- (IBAction)fastForward:(id)sender;
 
 - (IBAction)prev:(id)sender;
 - (IBAction)next:(id)sender;
@@ -89,6 +85,7 @@
 - (IBAction)play:(id)sender
 {
     intf_thread_t * p_intf = [NSApp getIntf];
+
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                        FIND_ANYWHERE );
     if( p_playlist == NULL )
         return;
     }
 
-    if ( p_intf->p_sys->p_input != NULL && p_intf->p_sys->p_input->stream.control.i_status != PAUSE_S)
+    if( playlist_IsPlaying( p_playlist ) )
     {
-        input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+        playlist_Pause( p_playlist );
         vlc_object_release( p_playlist );
     }
     else
     {
-        /* If the playlist is empty, open a file requester instead */
-        vlc_mutex_lock( &p_playlist->object_lock );
-        if( p_playlist->i_size )
+        vlc_bool_t b_empty;
+
+        b_empty = playlist_IsEmpty( p_playlist );
+        vlc_object_release( p_playlist );
+
+        if( !b_empty )
         {
-            vlc_mutex_unlock( &p_playlist->object_lock );
             playlist_Play( p_playlist );
-            vlc_object_release( p_playlist );
         }
         else
         {
-            vlc_mutex_unlock( &p_playlist->object_lock );
-            vlc_object_release( p_playlist );
-
             [o_open openFile: nil];
         }
     }
 - (IBAction)stop:(id)sender
 {
     intf_thread_t * p_intf = [NSApp getIntf];
+
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                        FIND_ANYWHERE );
     if( p_playlist == NULL )
 
     playlist_Stop( p_playlist );
     vlc_object_release( p_playlist );
+
     p_intf->p_sys->b_stopping = 1;
 }
 
 {
     intf_thread_t * p_intf = [NSApp getIntf];
 
-    if( p_intf->p_sys->p_input == NULL )
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+    if( p_playlist == NULL )
     {
         return;
     }
 
-    input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
+    vlc_mutex_lock( &p_playlist->object_lock );
+    if( p_playlist->p_input != NULL )
+    {
+        input_SetStatus( p_playlist->p_input, INPUT_STATUS_FASTER );
+    } 
+    vlc_mutex_unlock( &p_playlist->object_lock );
+
+    vlc_object_release( p_playlist );
 }
 
 - (IBAction)slower:(id)sender
 {
     intf_thread_t * p_intf = [NSApp getIntf];
 
-    if( p_intf->p_sys->p_input == NULL )
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+    if( p_playlist == NULL )
     {
         return;
     }
 
-    input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
-}
-
-- (IBAction)slowMotion:(id)sender
-{
-    i_ff++;
-    switch( [[NSApp currentEvent] type] )
+    vlc_mutex_lock( &p_playlist->object_lock );
+    if( p_playlist->p_input != NULL )
     {
-        case NSPeriodic:
-            if ( i_ff == 1 )
-            {
-                [self slower:sender];
-            }
-            break;
-    
-        case NSLeftMouseUp:
-            if ( i_ff > 1 )
-            {
-                intf_thread_t * p_intf = [NSApp getIntf];
-                
-                [self faster:sender];
-                if ( p_intf->p_sys->p_input != NULL &&
-                            p_intf->p_sys->p_input->stream.control.i_status != PAUSE_S)
-                {
-                    input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
-                }
-            }
-            i_ff = 0;
-            break;
-
-        default:
-            break;
+        input_SetStatus( p_playlist->p_input, INPUT_STATUS_SLOWER );
     }
-}
+    vlc_mutex_unlock( &p_playlist->object_lock );
 
-- (IBAction)fastForward:(id)sender
-{
-    playlist_t * p_playlist = vlc_object_find( [NSApp getIntf], VLC_OBJECT_PLAYLIST,
-                                                       FIND_ANYWHERE );
-                                                       
-    i_ff++;
-    switch( [[NSApp currentEvent] type] )
-    {
-        /* A button does not send a NSLeftMouseDown unfortunately.
-         * Therefore we need to count. I know, it is ugly. We could have used
-         * a bool as well, but now we can also accellerate after a certain period.
-         * Currently this method is called every second if the button is pressed.
-         * You can set this value in intf.m (hartman)
-         */
-        case NSPeriodic:
-            if ( i_ff == 1 )
-            {
-                [self faster:self];
-            }
-            else if ( i_ff == 5 )
-            {
-                [self faster:self];
-            }
-            else if ( i_ff == 15 )
-            {
-                [self faster:self];
-            }
-            break;
-
-        case NSLeftMouseUp:
-            i_ff = 0;
-            
-            vlc_mutex_lock( &p_playlist->object_lock );
-            int i_playlist_size =  p_playlist->i_size ;
-            vlc_mutex_unlock( &p_playlist->object_lock );
-            if( i_playlist_size )
-            {
-                playlist_Play( p_playlist );
-            }
-            break;
-
-        default:
-            break;
-    }
     vlc_object_release( p_playlist );
 }
 
 - (IBAction)prev:(id)sender
 {
     intf_thread_t * p_intf = [NSApp getIntf];
-    input_area_t *  p_area;
+
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                        FIND_ANYWHERE );
+    if( p_playlist == NULL )
+    {
+        return;
+    }
+
+    vlc_mutex_lock( &p_playlist->object_lock );
+
+    if( p_playlist->p_input == NULL )
+    {
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        vlc_object_release( p_playlist );  
+        return;
+    }
 
-    vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
-    p_area = p_intf->p_sys->p_input->stream.p_selected_area;
+    vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
 
-    /* check if this is the first chapter and whether there are any chapters at all */
-    if( p_area->i_part > 1 && p_area->i_part_nb > 1 )
+#define p_area p_playlist->p_input->stream.p_selected_area
+
+    if( p_area->i_part_nb > 1 && p_area->i_part > 1 )
     {
         p_area->i_part--;
-        vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
 
-        input_ChangeArea( p_intf->p_sys->p_input, p_area );
+        vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
+        input_ChangeArea( p_playlist->p_input, p_area );
+        vlc_mutex_unlock( &p_playlist->object_lock );
 
         p_intf->p_sys->b_chapter_update = VLC_TRUE;
     }
-    else if( p_playlist != NULL )
-    {
-        vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
-        playlist_Prev( p_playlist );
-    }
     else
     {
-        vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
+        vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        playlist_Prev( p_playlist );
     }
-    
-    if ( p_playlist != NULL )
-        vlc_object_release( p_playlist );
+
+#undef p_area
+
+    vlc_object_release( p_playlist );
 }
 
 - (IBAction)next:(id)sender
 {
     intf_thread_t * p_intf = [NSApp getIntf];
-    input_area_t *  p_area;
+
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                        FIND_ANYWHERE );
+    if( p_playlist == NULL )
+    {
+        return;
+    }
 
-    vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
-    p_area = p_intf->p_sys->p_input->stream.p_selected_area;
+    vlc_mutex_lock( &p_playlist->object_lock );
 
-    /* check if this is the last chapter and whether there are any chapters at all */
-    if( p_area->i_part_nb > 1 && p_area->i_part < p_area->i_part_nb )
+    if( p_playlist->p_input == NULL )
+    {
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        vlc_object_release( p_playlist );  
+        return;
+    }
+
+    vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
+
+#define p_area p_playlist->p_input->stream.p_selected_area
+
+    if( p_area->i_part_nb > 1 && p_area->i_part + 1 < p_area->i_part_nb )
     {
         p_area->i_part++;
-        vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
 
-        input_ChangeArea( p_intf->p_sys->p_input, p_area );
+        vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
+        input_ChangeArea( p_playlist->p_input, p_area );
+        vlc_mutex_unlock( &p_playlist->object_lock );
 
         p_intf->p_sys->b_chapter_update = VLC_TRUE;
     }
-    else if( p_playlist != NULL )
-    {
-        vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
-        playlist_Next( p_playlist );
-    }
     else
     {
-        vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
+        vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        playlist_Next( p_playlist );
     }
-    
-    if ( p_playlist != NULL )
-        vlc_object_release( p_playlist );
+
+#undef p_area
+
+    vlc_object_release( p_playlist );
 }
 
 - (IBAction)loop:(id)sender
 {
-    NSMenuItem * o_mi = (NSMenuItem *)sender;
     intf_thread_t * p_intf = [NSApp getIntf];
+
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                        FIND_ANYWHERE );
     if( p_playlist == NULL )
         return;
     }
 
-    if( p_intf->p_sys->b_loop )
-    {
-        [o_mi setState: NSOffState];
-        config_PutInt( p_playlist, "loop", 0 );
-    }
-    else
-    {
-        [o_mi setState: NSOnState];
-        config_PutInt( p_playlist, "loop", 1 );
-    }
-
-    p_intf->p_sys->b_loop = !p_intf->p_sys->b_loop;
+    config_PutInt( p_playlist, "loop",
+                   !config_GetInt( p_playlist, "loop" ) );
 
     vlc_object_release( p_playlist );
 }
     NSMenu * o_menu = [o_mi menu];
     intf_thread_t * p_intf = [NSApp getIntf];
 
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+
+    if( p_playlist != NULL )
+    {
+        vlc_mutex_lock( &p_playlist->object_lock );
+    }
+
     if( [[o_mi title] isEqualToString: _NS("Faster")] ||
         [[o_mi title] isEqualToString: _NS("Slower")] )
     {
-        if( p_intf->p_sys->p_input != NULL )
+        if( p_playlist != NULL && p_playlist->p_input != NULL )
         {
-#define p_input p_intf->p_sys->p_input
-            vlc_mutex_lock( &p_input->stream.stream_lock );
-            bEnabled = p_input->stream.b_pace_control;
-            vlc_mutex_unlock( &p_input->stream.stream_lock );
-#undef p_input
+            vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
+            bEnabled = p_playlist->p_input->stream.b_pace_control;
+            vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
         }
         else
         {
     }
     else if( [[o_mi title] isEqualToString: _NS("Stop")] )
     {
-        bEnabled = p_intf->p_sys->p_input != NULL;
+        if( p_playlist == NULL || p_playlist->p_input == NULL )
+        {
+            bEnabled = FALSE;
+        }
     }
     else if( [[o_mi title] isEqualToString: _NS("Previous")] ||
              [[o_mi title] isEqualToString: _NS("Next")] )
     {
-        playlist_t * p_playlist = vlc_object_find( p_intf, 
-                                                   VLC_OBJECT_PLAYLIST,
-                                                   FIND_ANYWHERE );
         if( p_playlist == NULL )
         {
             bEnabled = FALSE;
         }
         else
         {
-            vlc_mutex_lock( &p_playlist->object_lock );
             bEnabled = p_playlist->i_size > 1;
-            vlc_mutex_unlock( &p_playlist->object_lock );
-            vlc_object_release( p_playlist );
         }
     }
+    else if( [[o_mi title] isEqualToString: _NS("Loop")] )
+    {
+        int i_state = config_GetInt( p_playlist, "loop" ) ?
+                      NSOnState : NSOffState;
+
+        [o_mi setState: i_state];
+    }
     else if( [[o_mi title] isEqualToString: _NS("Fullscreen")] )    
     {
         id o_window;
         }
     } 
 
+    if( p_playlist != NULL )
+    {
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        vlc_object_release( p_playlist );
+    }
+
     return( bEnabled );
 }
 
index 42ff7d8a8f29e99de6b1667aea13682928726e3d..6d8e69955981a994069f694ba2c2f23be5534786 100644 (file)
@@ -2,7 +2,7 @@
  * intf.h: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.18 2003/01/27 00:08:31 jlj Exp $
+ * $Id: intf.h,v 1.19 2003/01/29 11:34:11 jlj Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -57,7 +57,6 @@ struct intf_sys_t
     NSPort * o_sendport;
 
     /* special actions */
-    vlc_bool_t b_loop;
     vlc_bool_t b_playing;
     vlc_bool_t b_stopping;
     vlc_bool_t b_mute;
index c2d7d93ec58d88be26b0a2a2c4959cff1548e479..a2638e565385e1b6620312b384d3b9b67db0bdff 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.37 2003/01/28 01:50:52 hartman Exp $
+ * $Id: intf.m,v 1.38 2003/01/29 11:34:11 jlj Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -663,15 +663,6 @@ static void Run( intf_thread_t *p_intf )
     [o_controls setVolumeSlider];
     [o_timeslider setEnabled: b_input];
     
-    if ( (p_intf->p_sys->b_loop = config_GetInt( p_intf, "loop" )) )
-    {
-        [o_mi_loop setState: NSOnState];
-    }
-    else
-    {
-        [o_mi_loop setState: NSOffState];
-    }
-
     if ( p_intf->p_sys->p_input != NULL &&
                 p_intf->p_sys->p_input->stream.control.i_status != PAUSE_S)
     {
index 7ecc360559d7306d70332549566a89fb3be4e495..c876c321b6c71df89cd9c9705d89130f098c50c9 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: playlist.m,v 1.5 2003/01/24 02:31:53 hartman Exp $
+ * $Id: playlist.m,v 1.6 2003/01/29 11:34:11 jlj Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
         return;
     }
 
-    if( p_intf->p_sys->b_loop )
-    {
-        playlist_Delete( p_playlist, p_playlist->i_size - 1 );
-    }
-
     i_items = 0;
     o_enum = [o_array objectEnumerator];
     while( ( o_value = [o_enum nextObject] ) )
         i_items++;
     }
 
-    if( p_intf->p_sys->b_loop )
-    {
-        playlist_Add( p_playlist, "vlc:loop",
-                      PLAYLIST_APPEND, PLAYLIST_END );
-    }
-
     vlc_object_release( p_playlist );
 
     [self playlistUpdated];
index 9a57a6e799c9de0e18b420c5fb99cc6f2153a548..bf879c2bd5e48c2414d724c3c4ccbe15841d98f8 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.c : Playlist management functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: playlist.c,v 1.30 2002/12/13 16:26:35 babal Exp $
+ * $Id: playlist.c,v 1.31 2003/01/29 11:34:11 jlj Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -31,9 +31,6 @@
 
 #include "vlc_playlist.h"
 
-#define PLAYLIST_STOPPED 0
-#define PLAYLIST_RUNNING 1
-
 #define PLAYLIST_FILE_HEADER_0_5  "# vlc playlist file version 0.5"
 #ifdef WIN32
 #   define PLAYLIST_FILE_EOL "\r\n"
@@ -306,12 +303,20 @@ void playlist_Command( playlist_t * p_playlist, int i_command, int i_arg )
 
     case PLAYLIST_PLAY:
         p_playlist->i_status = PLAYLIST_RUNNING;
-        if ( p_playlist->p_input )
+        if( p_playlist->p_input )
         {
             input_SetStatus( p_playlist->p_input, INPUT_STATUS_PLAY );
         }
         break;
 
+    case PLAYLIST_PAUSE:
+        p_playlist->i_status = PLAYLIST_PAUSED;
+        if( p_playlist->p_input )
+        {
+            input_SetStatus( p_playlist->p_input, INPUT_STATUS_PAUSE );
+        }
+        break;
+
     case PLAYLIST_SKIP:
         p_playlist->i_status = PLAYLIST_STOPPED;
         SkipItem( p_playlist, i_arg );