]> git.sesse.net Git - vlc/commitdiff
Compile fix after d228fdd28e
authorChristophe Mutricy <xtophe@videolan.org>
Sat, 27 Sep 2008 22:49:37 +0000 (23:49 +0100)
committerChristophe Mutricy <xtophe@videolan.org>
Sat, 27 Sep 2008 22:49:37 +0000 (23:49 +0100)
modules/control/dbus.c
modules/misc/notify/notify.c
modules/misc/notify/telepathy.c
modules/misc/notify/xosd.c
modules/video_filter/atmo/atmo.cpp

index 4873e87555f927f98984f2d761293d1dcdf6c045..6fc8cf36f4613ee4ebb8142db7a4413921637e4e 100644 (file)
@@ -168,7 +168,7 @@ DBUS_METHOD( PositionGet )
 
     playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
     PL_LOCK;
-    input_thread_t *p_input = p_playlist->p_input;
+    input_thread_t *p_input = playlist_CurrentInput( p_playlist );
 
     if( !p_input )
         i_pos = 0;
@@ -207,7 +207,7 @@ DBUS_METHOD( PositionSet )
     }
     p_playlist = pl_Hold( ((vlc_object_t*) p_this) );
     PL_LOCK;
-    input_thread_t *p_input = p_playlist->p_input;
+    input_thread_t *p_input = playlist_CurrentInput( p_playlist );
 
     if( p_input )
     {
@@ -320,7 +320,7 @@ DBUS_METHOD( Play )
     playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this );
 
     PL_LOCK;
-    input_thread_t *p_input = p_playlist->p_input;
+    input_thread_t *p_input =  playlist_CurrentInput( p_playlist );
     if( p_input )
         vlc_object_hold( p_input );
     PL_UNLOCK;
@@ -344,8 +344,9 @@ DBUS_METHOD( GetCurrentMetadata )
     OUT_ARGUMENTS;
     playlist_t* p_playlist = pl_Hold( (vlc_object_t*) p_this );
     PL_LOCK;
-    if( p_playlist->status.p_item )
-        GetInputMeta( p_playlist->status.p_item->p_input, &args );
+    playlist_item_t* p_item =  playlist_CurrentPlayingItem( p_playlist );
+    if(  p_item )
+        GetInputMeta( p_item->p_input, &args );
     PL_UNLOCK;
     pl_Release( (vlc_object_t*) p_this );
     REPLY_SEND;
@@ -804,7 +805,7 @@ static void Close   ( vlc_object_t *p_this )
     var_DelCallback( p_playlist, "repeat", StatusChangeEmit, p_intf );
     var_DelCallback( p_playlist, "loop", StatusChangeEmit, p_intf );
 
-    p_input = p_playlist->p_input;
+    p_input = playlist_CurrentInput( p_playlist );
     if ( p_input )
     {
         vlc_object_hold( p_input );
@@ -997,7 +998,7 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var,
     p_sys->b_meta_read = false;
 
     p_playlist = pl_Hold( p_intf );
-    p_input = p_playlist->p_input;
+    p_input = playlist_CurrentInput( p_playlist );
 
     if( !p_input )
     {
@@ -1040,14 +1041,15 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
     
     if( p_playlist->current.i_size > 0 )
         i_caps |= CAPS_CAN_PLAY | CAPS_CAN_GO_PREV | CAPS_CAN_GO_NEXT;
-
-    if( p_playlist->p_input )
+    
+    input_thread_t* p_input = playlist_CurrentInput( p_playlist );
+    if( p_input )
     {
         /* XXX: if UpdateCaps() is called too early, these are
          * unconditionnaly true */
-        if( var_GetBool( p_playlist->p_input, "can-pause" ) )
+        if( var_GetBool( p_input, "can-pause" ) )
             i_caps |= CAPS_CAN_PAUSE;
-        if( var_GetBool( p_playlist->p_input, "seekable" ) )
+        if( var_GetBool( p_input, "seekable" ) )
             i_caps |= CAPS_CAN_SEEK;
     }
 
@@ -1166,7 +1168,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
 
     i_state = 2;
 
-    p_input = p_playlist->p_input;
+    p_input = playlist_CurrentInput( p_playlist );
     if( p_input )
     {
         var_Get( p_input, "state", &val );
index 5fc7bd68e7142381659cdbbec40584c1145d0a3e..879e8cfecb29074d217dcdc2753a9ffebf792fdf 100644 (file)
@@ -144,7 +144,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     char                *psz_artist     = NULL;
     char                *psz_album      = NULL;
     char                *psz_arturl     = NULL;
-    input_thread_t      *p_input        = ((playlist_t*) p_this)->p_input;
+    input_thread_t      *p_input        =  playlist_CurrentInput(
+                                                    (playlist_t*) p_this );
     intf_thread_t       *p_intf         = ( intf_thread_t* ) param;
     intf_sys_t          *p_sys          = p_intf->p_sys;
 
index 91950fae38f2f141194982abecbfefdf9e60d825..ffbcd4c579287357e1db5f2879d056c39c59da9b 100644 (file)
@@ -137,12 +137,13 @@ static void Close( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
     playlist_t *p_playlist = pl_Hold( p_this );
+    input_thread_t *p_input = NULL;
 
     PL_LOCK;
     var_DelCallback( p_playlist, "item-change", ItemChange, p_intf );
     var_DelCallback( p_playlist, "playlist-current", ItemChange, p_intf );
-    if( p_playlist->p_input )
-        var_DelCallback( p_playlist->p_input, "state", StateChange, p_intf );
+    if( (p_input = playlist_CurrentInput( p_playlist )) )
+        var_DelCallback( p_input, "state", StateChange, p_intf );
     PL_UNLOCK;
     pl_Release( p_this );
 
@@ -190,7 +191,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
         p_intf->p_sys->i_item_changes++;
     }
 
-    p_input = p_playlist->p_input;
+    p_input = playlist_CurrentInput( p_playlist );
 
     if( !p_input ) return VLC_SUCCESS;
     vlc_object_hold( p_input );
index b8bd21cc7337398adf6da8e9b35ba03cc6a54627..dd5dbc6888fb5ce676c96ef106883530a360d728 100644 (file)
@@ -234,19 +234,20 @@ static void Run( intf_thread_t *p_intf )
             }
             free( psz_display );
             psz_display = NULL;
-            if( p_playlist->status.i_status == PLAYLIST_STOPPED )
+            int i_status = playlist_Status( p_playlist );
+            if( i_status == PLAYLIST_STOPPED )
             {
                 psz_display = strdup(_("Stop"));
                 pl_Release( p_intf );
             }
-            else if( p_playlist->status.i_status == PLAYLIST_PAUSED )
+            else if( i_status == PLAYLIST_PAUSED )
             {
                 psz_display = strdup(_("Pause"));
                 pl_Release( p_intf );
             }
             else
             {
-                p_item = p_playlist->status.p_item;
+                p_item = playlist_CurrentPlayingItem( p_playlist );
                 p_input = p_item->p_input;
 
                 pl_Release( p_intf );
index 08fe4ef4fecd8f21b108f4869903902d4b45135d..1b5328f12505f3e28490ee0e91527d0c46b09b4f 100644 (file)
@@ -1930,7 +1930,7 @@ static int StateCallback( vlc_object_t *p_this, char const *psz_cmd,
 static void AddStateVariableCallback(filter_t *p_filter)
 {
     playlist_t *p_playlist = pl_Hold( p_filter );
-    input_thread_t *p_input = p_playlist->p_input;
+    input_thread_t *p_input = playlist_CurrentInput( p_playlist );
     if(p_input)
     {
         var_AddCallback( p_input, "state", StateCallback, p_filter );
@@ -1948,7 +1948,7 @@ static void AddStateVariableCallback(filter_t *p_filter)
 static void DelStateVariableCallback( filter_t *p_filter )
 {
     playlist_t *p_playlist = pl_Hold( p_filter );
-    input_thread_t *p_input = p_playlist->p_input;
+    input_thread_t *p_input = playlist_CurrentInput( p_playlist );
     if(p_input)
     {
         var_DelCallback( p_input, "state", StateCallback, p_filter );