[vlc-devel] [PATCH] rc interface prints status change messages that show the status code. The value

Ken Self kenself at optusnet.com.au
Fri Jan 16 09:06:37 CET 2009


---
 modules/control/rc.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 2055f38..6f6b9c4 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -556,21 +556,21 @@ static void Run( intf_thread_t *p_intf )
                 (status == PLAYLIST_STOPPED) )
             {
                 p_intf->p_sys->i_last_state = PLAYLIST_STOPPED;
-                msg_rc( STATUS_CHANGE "( stop state: 5 )" );
+                msg_rc( STATUS_CHANGE "( stop state: %d )", status );
             }
             else if(
                 (p_intf->p_sys->i_last_state != status) &&
                 (status == PLAYLIST_RUNNING) )
             {
                 p_intf->p_sys->i_last_state = PLAYLIST_RUNNING;
-                 msg_rc( STATUS_CHANGE "( play state: 3 )" );
+                 msg_rc( STATUS_CHANGE "( play state: %d )", status );
             }
             else if(
                 (p_intf->p_sys->i_last_state != status) &&
                 (status == PLAYLIST_PAUSED) )
             {
                 p_intf->p_sys->i_last_state = PLAYLIST_PAUSED;
-                msg_rc( STATUS_CHANGE "( pause state: 4 )" );
+                msg_rc( STATUS_CHANGE "( pause state: %d )", status );
             }
             PL_UNLOCK;
         }
@@ -1513,16 +1513,20 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
             switch( playlist_Status(p_playlist) )
             {
                 case PLAYLIST_STOPPED:
-                    msg_rc( STATUS_CHANGE "( stop state: 5 )" );
+                    msg_rc( STATUS_CHANGE "( stop state: %d )",
+                            playlist_Status(p_playlist) );
                     break;
                 case PLAYLIST_RUNNING:
-                    msg_rc( STATUS_CHANGE "( play state: 3 )" );
+                    msg_rc( STATUS_CHANGE "( play state: %d )",
+                            playlist_Status(p_playlist) );
                     break;
                 case PLAYLIST_PAUSED:
-                    msg_rc( STATUS_CHANGE "( pause state: 4 )" );
+                    msg_rc( STATUS_CHANGE "( pause state: %d )",
+                            playlist_Status(p_playlist) );
                     break;
                 default:
-                    msg_rc( STATUS_CHANGE "( unknown state: -1 )" );
+                    msg_rc( STATUS_CHANGE "( unknown state: %d )",
+                            playlist_Status(p_playlist) );
                     break;
             }
             PL_UNLOCK;
-- 
1.5.4.3




More information about the vlc-devel mailing list