Commit bf099fea authored by Laurent Aimar's avatar Laurent Aimar

Renamed playlist "playlist-current" to "item-current".

parent 1f029c70
...@@ -116,13 +116,15 @@ TYPEDEF_ARRAY(playlist_item_t*, playlist_item_array_t); ...@@ -116,13 +116,15 @@ TYPEDEF_ARRAY(playlist_item_t*, playlist_item_array_t);
* *
* *
* The playlist defines the following event variables: * The playlist defines the following event variables:
*
* - "item-change": It will contains the input_item_t->i_id of a changed input * - "item-change": It will contains the input_item_t->i_id of a changed input
* item monitored by the playlist. * item monitored by the playlist.
* * - "item-current": It will contains a input_item_t->i_id of the current
* item being played.
*
* - "item-append": It will contains a pointer to a playlist_add_t.
* - "item-deleted": It will contains the playlist_item_t->i_id of a deleted * - "item-deleted": It will contains the playlist_item_t->i_id of a deleted
* playlist_item_t. * playlist_item_t.
* - "item-append": It will contains a pointer to a playlist_add_t.
* - "playlist-current": It will contains a input_item_t->i_id of the current
* item being played.
* *
* XXX Be really carefull, playlist_item_t->i_id and input_item_t->i_id are not * XXX Be really carefull, playlist_item_t->i_id and input_item_t->i_id are not
* the same. Yes, the situation is pretty bad. * the same. Yes, the situation is pretty bad.
......
...@@ -757,7 +757,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -757,7 +757,7 @@ static int Open( vlc_object_t *p_this )
p_playlist = pl_Hold( p_intf ); p_playlist = pl_Hold( p_intf );
PL_LOCK; PL_LOCK;
var_AddCallback( p_playlist, "playlist-current", TrackChange, p_intf ); var_AddCallback( p_playlist, "item-current", TrackChange, p_intf );
var_AddCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf ); var_AddCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf );
var_AddCallback( p_playlist, "item-append", TrackListChangeEmit, p_intf ); var_AddCallback( p_playlist, "item-append", TrackListChangeEmit, p_intf );
var_AddCallback( p_playlist, "item-deleted", TrackListChangeEmit, p_intf ); var_AddCallback( p_playlist, "item-deleted", TrackListChangeEmit, p_intf );
...@@ -786,7 +786,7 @@ static void Close ( vlc_object_t *p_this ) ...@@ -786,7 +786,7 @@ static void Close ( vlc_object_t *p_this )
playlist_t *p_playlist = pl_Hold( p_intf );; playlist_t *p_playlist = pl_Hold( p_intf );;
input_thread_t *p_input; input_thread_t *p_input;
var_DelCallback( p_playlist, "playlist-current", TrackChange, p_intf ); var_DelCallback( p_playlist, "item-current", TrackChange, p_intf );
var_DelCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf ); var_DelCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf );
var_DelCallback( p_playlist, "item-append", TrackListChangeEmit, p_intf ); var_DelCallback( p_playlist, "item-append", TrackListChangeEmit, p_intf );
var_DelCallback( p_playlist, "item-deleted", TrackListChangeEmit, p_intf ); var_DelCallback( p_playlist, "item-deleted", TrackListChangeEmit, p_intf );
...@@ -966,7 +966,7 @@ static int StatusChangeEmit( vlc_object_t *p_this, const char *psz_var, ...@@ -966,7 +966,7 @@ static int StatusChangeEmit( vlc_object_t *p_this, const char *psz_var,
} }
/***************************************************************************** /*****************************************************************************
* TrackChange: callback on playlist "playlist-current" * TrackChange: callback on playlist "item-current"
*****************************************************************************/ *****************************************************************************/
static int TrackChange( vlc_object_t *p_this, const char *psz_var, static int TrackChange( vlc_object_t *p_this, const char *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data ) vlc_value_t oldval, vlc_value_t newval, void *p_data )
......
...@@ -209,7 +209,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame, ...@@ -209,7 +209,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame,
var_AddCallback( p_playlist, "item-change", PlaylistChanged, this ); var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-append", PlaylistChanged, this ); var_AddCallback( p_playlist, "item-append", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-deleted", PlaylistChanged, this ); var_AddCallback( p_playlist, "item-deleted", PlaylistChanged, this );
var_AddCallback( p_playlist, "playlist-current", PlaylistChanged, this ); var_AddCallback( p_playlist, "item-current", PlaylistChanged, this );
char psz_tmp[1024]; char psz_tmp[1024];
#define ADD_ELLIPSIS( a ) \ #define ADD_ELLIPSIS( a ) \
......
...@@ -1410,7 +1410,7 @@ static void * manage_cleanup( void * args ) ...@@ -1410,7 +1410,7 @@ static void * manage_cleanup( void * args )
id self = manage_cleanup_stack->self; id self = manage_cleanup_stack->self;
playlist_t * p_playlist = manage_cleanup_stack->p_playlist; playlist_t * p_playlist = manage_cleanup_stack->p_playlist;
var_AddCallback( p_playlist, "playlist-current", PlaylistChanged, self ); var_AddCallback( p_playlist, "item-current", PlaylistChanged, self );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self ); var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, self ); var_AddCallback( p_playlist, "item-change", PlaylistChanged, self );
var_AddCallback( p_playlist, "item-append", PlaylistChanged, self ); var_AddCallback( p_playlist, "item-append", PlaylistChanged, self );
...@@ -1433,7 +1433,7 @@ static void * manage_cleanup( void * args ) ...@@ -1433,7 +1433,7 @@ static void * manage_cleanup( void * args )
p_playlist = pl_Hold( p_intf ); p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", PlaylistChanged, self ); var_AddCallback( p_playlist, "item-current", PlaylistChanged, self );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self ); var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, self ); var_AddCallback( p_playlist, "item-change", PlaylistChanged, self );
var_AddCallback( p_playlist, "item-append", PlaylistChanged, self ); var_AddCallback( p_playlist, "item-append", PlaylistChanged, self );
......
...@@ -228,7 +228,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -228,7 +228,7 @@ static void Run( intf_thread_t *p_intf )
g_timeout_add( 150 /* miliseconds */, should_die, p_intf ); g_timeout_add( 150 /* miliseconds */, should_die, p_intf );
var_AddCallback( p_intf->p_sys->p_playlist, "item-change", var_AddCallback( p_intf->p_sys->p_playlist, "item-change",
item_changed_cb, p_intf ); item_changed_cb, p_intf );
var_AddCallback( p_intf->p_sys->p_playlist, "playlist-current", var_AddCallback( p_intf->p_sys->p_playlist, "item-current",
playlist_current_cb, p_intf ); playlist_current_cb, p_intf );
var_AddCallback( p_intf->p_sys->p_playlist, "activity", var_AddCallback( p_intf->p_sys->p_playlist, "activity",
activity_cb, p_intf ); activity_cb, p_intf );
...@@ -244,7 +244,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -244,7 +244,7 @@ static void Run( intf_thread_t *p_intf )
delete_input( p_intf ); delete_input( p_intf );
var_DelCallback( p_intf->p_sys->p_playlist, "item-change", var_DelCallback( p_intf->p_sys->p_playlist, "item-change",
item_changed_cb, p_intf ); item_changed_cb, p_intf );
var_DelCallback( p_intf->p_sys->p_playlist, "playlist-current", var_DelCallback( p_intf->p_sys->p_playlist, "item-current",
playlist_current_cb, p_intf ); playlist_current_cb, p_intf );
var_DelCallback( p_intf->p_sys->p_playlist, "activity", var_DelCallback( p_intf->p_sys->p_playlist, "activity",
activity_cb, p_intf ); activity_cb, p_intf );
......
...@@ -221,7 +221,7 @@ void PLModel::addCallbacks() ...@@ -221,7 +221,7 @@ void PLModel::addCallbacks()
/* Some global changes happened -> Rebuild all */ /* Some global changes happened -> Rebuild all */
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this ); var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
/* We went to the next item */ /* We went to the next item */
var_AddCallback( p_playlist, "playlist-current", PlaylistNext, this ); var_AddCallback( p_playlist, "item-current", PlaylistNext, this );
/* One item has been updated */ /* One item has been updated */
var_AddCallback( p_playlist, "item-change", ItemChanged, this ); var_AddCallback( p_playlist, "item-change", ItemChanged, this );
var_AddCallback( p_playlist, "item-append", ItemAppended, this ); var_AddCallback( p_playlist, "item-append", ItemAppended, this );
...@@ -231,7 +231,7 @@ void PLModel::addCallbacks() ...@@ -231,7 +231,7 @@ void PLModel::addCallbacks()
void PLModel::delCallbacks() void PLModel::delCallbacks()
{ {
var_DelCallback( p_playlist, "item-change", ItemChanged, this ); var_DelCallback( p_playlist, "item-change", ItemChanged, this );
var_DelCallback( p_playlist, "playlist-current", PlaylistNext, this ); var_DelCallback( p_playlist, "item-current", PlaylistNext, this );
var_DelCallback( p_playlist, "intf-change", PlaylistChanged, this ); var_DelCallback( p_playlist, "intf-change", PlaylistChanged, this );
var_DelCallback( p_playlist, "item-append", ItemAppended, this ); var_DelCallback( p_playlist, "item-append", ItemAppended, this );
var_DelCallback( p_playlist, "item-deleted", ItemDeleted, this ); var_DelCallback( p_playlist, "item-deleted", ItemDeleted, this );
......
...@@ -825,7 +825,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf ) ...@@ -825,7 +825,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
im = new InputManager( this, p_intf ); im = new InputManager( this, p_intf );
var_AddCallback( THEPL, "item-change", ItemChanged, im ); var_AddCallback( THEPL, "item-change", ItemChanged, im );
var_AddCallback( THEPL, "playlist-current", PLItemChanged, this ); var_AddCallback( THEPL, "item-current", PLItemChanged, this );
var_AddCallback( THEPL, "activity", PLItemChanged, this ); var_AddCallback( THEPL, "activity", PLItemChanged, this );
var_AddCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, this ); var_AddCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, this );
...@@ -836,7 +836,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf ) ...@@ -836,7 +836,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
/* emit check if playlist has allready started playing */ /* emit check if playlist has allready started playing */
vlc_value_t val; vlc_value_t val;
var_Change( THEPL, "playlist-current", VLC_VAR_CHOICESCOUNT, &val, NULL ); var_Change( THEPL, "item-current", VLC_VAR_CHOICESCOUNT, &val, NULL );
IMEvent *event = new IMEvent( ItemChanged_Type, val.i_int); IMEvent *event = new IMEvent( ItemChanged_Type, val.i_int);
customEvent( event ); customEvent( event );
...@@ -857,7 +857,7 @@ MainInputManager::~MainInputManager() ...@@ -857,7 +857,7 @@ MainInputManager::~MainInputManager()
var_DelCallback( THEPL, "activity", PLItemChanged, this ); var_DelCallback( THEPL, "activity", PLItemChanged, this );
var_DelCallback( THEPL, "item-change", ItemChanged, im ); var_DelCallback( THEPL, "item-change", ItemChanged, im );
var_DelCallback( THEPL, "playlist-current", PLItemChanged, this ); var_DelCallback( THEPL, "item-current", PLItemChanged, this );
} }
vout_thread_t* MainInputManager::getVout() vout_thread_t* MainInputManager::getVout()
......
...@@ -153,7 +153,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ), ...@@ -153,7 +153,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
var_AddCallback( pIntf->p_libvlc, "intf-show", var_AddCallback( pIntf->p_libvlc, "intf-show",
onIntfShow, this ); onIntfShow, this );
// Called when the current played item changes // Called when the current played item changes
var_AddCallback( pIntf->p_sys->p_playlist, "playlist-current", var_AddCallback( pIntf->p_sys->p_playlist, "item-current",
onPlaylistChange, this ); onPlaylistChange, this );
// Called when a playlist item changed // Called when a playlist item changed
var_AddCallback( pIntf->p_sys->p_playlist, "item-change", var_AddCallback( pIntf->p_sys->p_playlist, "item-change",
...@@ -189,7 +189,7 @@ VlcProc::~VlcProc() ...@@ -189,7 +189,7 @@ VlcProc::~VlcProc()
onItemDelete, this ); onItemDelete, this );
var_DelCallback( getIntf()->p_libvlc, "intf-show", var_DelCallback( getIntf()->p_libvlc, "intf-show",
onIntfShow, this ); onIntfShow, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "playlist-current", var_DelCallback( getIntf()->p_sys->p_playlist, "item-current",
onPlaylistChange, this ); onPlaylistChange, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "item-change", var_DelCallback( getIntf()->p_sys->p_playlist, "item-change",
onItemChange, this ); onItemChange, this );
......
...@@ -185,7 +185,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -185,7 +185,7 @@ static int Open( vlc_object_t *p_this )
p_playlist = pl_Hold( p_intf ); p_playlist = pl_Hold( p_intf );
PL_LOCK; PL_LOCK;
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_intf ); pl_Release( p_intf );
...@@ -208,7 +208,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -208,7 +208,7 @@ static void Close( vlc_object_t *p_this )
if( p_playlist ) if( p_playlist )
{ {
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_DelCallback( p_playlist, "item-current", ItemChange, p_intf );
p_input = playlist_CurrentInput( p_playlist ); p_input = playlist_CurrentInput( p_playlist );
if ( p_input ) if ( p_input )
......
...@@ -318,7 +318,7 @@ static int vlclua_playlist_search( lua_State *L ) ...@@ -318,7 +318,7 @@ static int vlclua_playlist_search( lua_State *L )
static int vlclua_playlist_current( lua_State *L ) static int vlclua_playlist_current( lua_State *L )
{ {
playlist_t *p_playlist = vlclua_get_playlist_internal( L ); playlist_t *p_playlist = vlclua_get_playlist_internal( L );
lua_pushinteger( L, var_GetInteger( p_playlist, "playlist-current" ) ); lua_pushinteger( L, var_GetInteger( p_playlist, "item-current" ) );
vlclua_release_playlist_internal( p_playlist ); vlclua_release_playlist_internal( p_playlist );
return 1; return 1;
} }
......
...@@ -120,7 +120,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -120,7 +120,7 @@ static int Open( vlc_object_t *p_this )
p_sys->default_icon = (CFDataRef) readFile( buf ); p_sys->default_icon = (CFDataRef) readFile( buf );
playlist_t *p_playlist = pl_Hold( p_intf ); playlist_t *p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
pl_Release( p_intf ); pl_Release( p_intf );
RegisterToGrowl( p_this ); RegisterToGrowl( p_this );
...@@ -141,7 +141,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -141,7 +141,7 @@ static void Close( vlc_object_t *p_this )
free( p_sys ); free( p_sys );
playlist_t *p_playlist = pl_Hold( p_this ); playlist_t *p_playlist = pl_Hold( p_this );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_this ); var_DelCallback( p_playlist, "item-current", ItemChange, p_this );
pl_Release( p_this ); pl_Release( p_this );
} }
......
...@@ -91,7 +91,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -91,7 +91,7 @@ static int Open( vlc_object_t *p_this )
intf_thread_t *p_intf = (intf_thread_t *)p_this; intf_thread_t *p_intf = (intf_thread_t *)p_this;
playlist_t *p_playlist = pl_Hold( p_intf ); playlist_t *p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
pl_Release( p_intf ); pl_Release( p_intf );
RegisterToGrowl( p_this ); RegisterToGrowl( p_this );
...@@ -104,7 +104,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -104,7 +104,7 @@ static int Open( vlc_object_t *p_this )
static void Close( vlc_object_t *p_this ) static void Close( vlc_object_t *p_this )
{ {
playlist_t *p_playlist = pl_Hold( p_this ); playlist_t *p_playlist = pl_Hold( p_this );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_this ); var_DelCallback( p_playlist, "item-current", ItemChange, p_this );
pl_Release( p_this ); pl_Release( p_this );
} }
......
...@@ -103,7 +103,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -103,7 +103,7 @@ static int Open( vlc_object_t *p_this )
p_playlist = pl_Hold( p_intf ); p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "item-change", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-change", ItemChange, p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
pl_Release( p_intf ); pl_Release( p_intf );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -122,7 +122,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -122,7 +122,7 @@ static void Close( vlc_object_t *p_this )
SendToMSN( "\\0Music\\01\\0\\0\\0\\0\\0\\0\\0" ); SendToMSN( "\\0Music\\01\\0\\0\\0\\0\\0\\0\\0" );
var_DelCallback( p_playlist, "item-change", ItemChange, p_intf ); var_DelCallback( p_playlist, "item-change", ItemChange, p_intf );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_DelCallback( p_playlist, "item-current", ItemChange, p_intf );
pl_Release( p_this ); pl_Release( p_this );
/* Destroy structure */ /* Destroy structure */
......
...@@ -103,7 +103,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -103,7 +103,7 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->notification = NULL; p_intf->p_sys->notification = NULL;
p_playlist = pl_Hold( p_intf ); p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
pl_Release( p_intf ); pl_Release( p_intf );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -118,7 +118,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -118,7 +118,7 @@ static void Close( vlc_object_t *p_this )
intf_sys_t *p_sys = p_intf->p_sys; intf_sys_t *p_sys = p_intf->p_sys;
playlist_t *p_playlist = pl_Hold( p_this ); playlist_t *p_playlist = pl_Hold( p_this );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_this ); var_DelCallback( p_playlist, "item-current", ItemChange, p_this );
pl_Release( p_this ); pl_Release( p_this );
if( p_intf->p_sys->notification ) if( p_intf->p_sys->notification )
......
...@@ -126,7 +126,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -126,7 +126,7 @@ static int Open( vlc_object_t *p_this )
p_playlist = pl_Hold( p_intf ); p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "item-change", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-change", ItemChange, p_intf );
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
pl_Release( p_intf ); pl_Release( p_intf );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -142,7 +142,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -142,7 +142,7 @@ static void Close( vlc_object_t *p_this )
input_thread_t *p_input = NULL; input_thread_t *p_input = NULL;
var_DelCallback( p_playlist, "item-change", ItemChange, p_intf ); var_DelCallback( p_playlist, "item-change", ItemChange, p_intf );
var_DelCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_DelCallback( p_playlist, "item-current", ItemChange, p_intf );
if( (p_input = playlist_CurrentInput( p_playlist )) ) if( (p_input = playlist_CurrentInput( p_playlist )) )
{ {
var_DelCallback( p_input, "state", StateChange, p_intf ); var_DelCallback( p_input, "state", StateChange, p_intf );
...@@ -177,7 +177,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -177,7 +177,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
input_thread_t *p_input; input_thread_t *p_input;
/* Don't update Telepathy presence each time an item has been preparsed */ /* Don't update Telepathy presence each time an item has been preparsed */
if( !strncmp( "playlist-current", psz_var, 16 ) ) if( !strncmp( "item-current", psz_var, 16 ) )
{ /* stores the current input item id */ { /* stores the current input item id */
p_intf->p_sys->i_id = newval.i_int; p_intf->p_sys->i_id = newval.i_int;
p_intf->p_sys->i_item_changes = 0; p_intf->p_sys->i_item_changes = 0;
...@@ -211,7 +211,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -211,7 +211,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
} }
} }
if( !strncmp( "playlist-current", psz_var, 16 ) ) if( !strncmp( "item-current", psz_var, 16 ) )
var_AddCallback( p_input, "state", StateChange, p_intf ); var_AddCallback( p_input, "state", StateChange, p_intf );
/* We format the string to be displayed */ /* We format the string to be displayed */
......
...@@ -154,7 +154,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -154,7 +154,7 @@ static int Open( vlc_object_t *p_this )
playlist_t *p_playlist = pl_Hold( p_intf ); playlist_t *p_playlist = pl_Hold( p_intf );
var_AddCallback( p_playlist, "playlist-current", PlaylistNext, p_this ); var_AddCallback( p_playlist, "item-current", PlaylistNext, p_this );
var_AddCallback( p_playlist, "item-change", PlaylistNext, p_this ); var_AddCallback( p_playlist, "item-change", PlaylistNext, p_this );
pl_Release( p_intf ); pl_Release( p_intf );
...@@ -195,7 +195,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -195,7 +195,7 @@ static void Close( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_t *)p_this; intf_thread_t *p_intf = (intf_thread_t *)p_this;
playlist_t *p_playlist = pl_Hold( p_intf ); playlist_t *p_playlist = pl_Hold( p_intf );
var_DelCallback( p_playlist, "playlist-current", PlaylistNext, p_this ); var_DelCallback( p_playlist, "item-current", PlaylistNext, p_this );
var_DelCallback( p_playlist, "item-change", PlaylistNext, p_this ); var_DelCallback( p_playlist, "item-change", PlaylistNext, p_this );
pl_Release( p_intf ); pl_Release( p_intf );
......
...@@ -278,8 +278,8 @@ static void VariablesInit( playlist_t *p_playlist ) ...@@ -278,8 +278,8 @@ static void VariablesInit( playlist_t *p_playlist )
var_Create( p_playlist, "item-append", VLC_VAR_ADDRESS ); var_Create( p_playlist, "item-append", VLC_VAR_ADDRESS );
var_Create( p_playlist, "playlist-current", VLC_VAR_INTEGER ); var_Create( p_playlist, "item-current", VLC_VAR_INTEGER );
var_SetInteger( p_playlist, "playlist-current", -1 ); var_SetInteger( p_playlist, "item-current", -1 );
var_Create( p_playlist, "activity", VLC_VAR_INTEGER ); var_Create( p_playlist, "activity", VLC_VAR_INTEGER );
var_SetInteger( p_playlist, "activity", 0 ); var_SetInteger( p_playlist, "activity", 0 );
......
...@@ -294,7 +294,7 @@ static int PlayItem( playlist_t *p_playlist, playlist_item_t *p_item ) ...@@ -294,7 +294,7 @@ static int PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
} }
PL_UNLOCK; PL_UNLOCK;
var_SetInteger( p_playlist, "playlist-current", p_input->i_id ); var_SetInteger( p_playlist, "item-current", p_input->i_id );
PL_LOCK; PL_LOCK;
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment