[vlc-commits] playlist: remove activity callback in favor of input-current

Rémi Denis-Courmont git at videolan.org
Thu Mar 19 19:12:09 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Feb 20 00:11:23 2015 +0200| [2d6e21de8306826313f11b50ec235abea1671351] | committer: Rémi Denis-Courmont

playlist: remove activity callback in favor of input-current

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d6e21de8306826313f11b50ec235abea1671351
---

 modules/control/dbus/dbus.c       |    8 ++++----
 modules/gui/macosx/intf.m         |    4 ++--
 modules/gui/qt4/input_manager.cpp |    4 ++--
 src/playlist/engine.c             |    2 --
 src/playlist/thread.c             |    2 --
 5 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 2570ff1..62ec170 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -236,7 +236,7 @@ static int Open( vlc_object_t *p_this )
     p_playlist = pl_Get( p_intf );
     p_sys->p_playlist = p_playlist;
 
-    var_AddCallback( p_playlist, "activity", AllCallback, p_intf );
+    var_AddCallback( p_playlist, "input-current", AllCallback, p_intf );
     var_AddCallback( p_playlist, "intf-change", AllCallback, p_intf );
     var_AddCallback( p_playlist, "volume", AllCallback, p_intf );
     var_AddCallback( p_playlist, "mute", AllCallback, p_intf );
@@ -298,7 +298,7 @@ static void Close   ( vlc_object_t *p_this )
     vlc_cancel( p_sys->thread );
     vlc_join( p_sys->thread, NULL );
 
-    var_DelCallback( p_playlist, "activity", AllCallback, p_intf );
+    var_DelCallback( p_playlist, "input-current", AllCallback, p_intf );
     var_DelCallback( p_playlist, "intf-change", AllCallback, p_intf );
     var_DelCallback( p_playlist, "volume", AllCallback, p_intf );
     var_DelCallback( p_playlist, "mute", AllCallback, p_intf );
@@ -981,7 +981,7 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
     callback_info_t info = { .signal = SIGNAL_NONE };
 
     // Wich event is it ?
-    if( !strcmp( "activity", psz_var ) )
+    if( !strcmp( "input-current", psz_var ) )
         info.signal = SIGNAL_ITEM_CURRENT;
     else if( !strcmp( "volume", psz_var ) )
     {
@@ -1036,7 +1036,7 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
 }
 
 /*****************************************************************************
- * TrackChange: callback on playlist "activity"
+ * TrackChange: callback on playlist "input-current"
  *****************************************************************************/
 static int TrackChange( intf_thread_t *p_intf )
 {
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 8682361..db4e721 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -688,7 +688,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     var_AddCallback(p_intf->p_libvlc, "intf-show", ShowController, self);
     var_AddCallback(p_intf->p_libvlc, "intf-boss", BossCallback, self);
     var_AddCallback(p_playlist, "item-change", PLItemUpdated, self);
-    var_AddCallback(p_playlist, "activity", PLItemChanged, self);
+    var_AddCallback(p_playlist, "input-current", PLItemChanged, self);
     var_AddCallback(p_playlist, "playlist-item-append", PLItemAppended, self);
     var_AddCallback(p_playlist, "playlist-item-deleted", PLItemRemoved, self);
     var_AddCallback(p_playlist, "random", PlaybackModeUpdated, self);
@@ -861,7 +861,7 @@ static bool f_appExit = false;
     var_DelCallback(p_intf, "dialog-question", DialogCallback, self);
     var_DelCallback(p_intf, "dialog-progress-bar", DialogCallback, self);
     var_DelCallback(p_playlist, "item-change", PLItemUpdated, self);
-    var_DelCallback(p_playlist, "activity", PLItemChanged, self);
+    var_DelCallback(p_playlist, "input-current", PLItemChanged, self);
     var_DelCallback(p_playlist, "playlist-item-append", PLItemAppended, self);
     var_DelCallback(p_playlist, "playlist-item-deleted", PLItemRemoved, self);
     var_DelCallback(p_playlist, "random", PlaybackModeUpdated, self);
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 749be0f..d9b0199 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1020,7 +1020,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
 
     /* Core Callbacks */
     var_AddCallback( THEPL, "item-change", ItemChanged, im );
-    var_AddCallback( THEPL, "activity", PLItemChanged, this );
+    var_AddCallback( THEPL, "input-current", PLItemChanged, this );
     var_AddCallback( THEPL, "leaf-to-parent", LeafToParent, this );
     var_AddCallback( THEPL, "playlist-item-append", PLItemAppended, this );
     var_AddCallback( THEPL, "playlist-item-deleted", PLItemRemoved, this );
@@ -1046,7 +1046,7 @@ MainInputManager::~MainInputManager()
        emit inputChanged( NULL );
     }
 
-    var_DelCallback( THEPL, "activity", PLItemChanged, this );
+    var_DelCallback( THEPL, "input-current", PLItemChanged, this );
     var_DelCallback( THEPL, "item-change", ItemChanged, im );
     var_DelCallback( THEPL, "leaf-to-parent", LeafToParent, this );
 
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 05ea3b1..c34be2d 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -451,8 +451,6 @@ static void VariablesInit( playlist_t *p_playlist )
 
     var_Create( p_playlist, "input-current", VLC_VAR_ADDRESS );
 
-    var_Create( p_playlist, "activity", VLC_VAR_VOID );
-
     /* Variables to control playback */
     var_Create( p_playlist, "playlist-autostart", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_playlist, "random", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index 95d734e..178c5cc 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -237,7 +237,6 @@ static bool PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
     p_sys->p_input = p_input_thread;
     PL_UNLOCK;
 
-    var_TriggerCallback( p_playlist, "activity" );
     var_SetAddress( p_playlist, "input-current", p_input_thread );
 
     PL_LOCK;
@@ -460,7 +459,6 @@ static void LoopInput( playlist_t *p_playlist )
         var_DelCallback( p_input, "intf-event", InputEvent, p_playlist );
 
         input_Close( p_input );
-        var_TriggerCallback( p_playlist, "activity" );
         PL_LOCK;
         return;
     }



More information about the vlc-commits mailing list