Commit a518149f authored by Rémi Duraffort's avatar Rémi Duraffort

Use pl_Locked and pl_Unlocked.

parent cd4c4f1d
...@@ -510,7 +510,7 @@ static void FollowAnchor ( intf_thread_t *p_intf ) ...@@ -510,7 +510,7 @@ static void FollowAnchor ( intf_thread_t *p_intf )
msg_Dbg( p_intf, "calling browser_Open with \"%s\"", psz_url ); msg_Dbg( p_intf, "calling browser_Open with \"%s\"", psz_url );
#endif #endif
(void) browser_Open( psz_url ); (void) browser_Open( psz_url );
playlist_Control( p_playlist, PLAYLIST_PAUSE, false, 0 ); playlist_Control( p_playlist, PLAYLIST_PAUSE, pl_Unlocked, 0 );
} }
free( psz_uri_to_load ); free( psz_uri_to_load );
......
...@@ -507,7 +507,7 @@ DBUS_METHOD( DelTrack ) ...@@ -507,7 +507,7 @@ DBUS_METHOD( DelTrack )
{ {
playlist_DeleteFromInput( p_playlist, playlist_DeleteFromInput( p_playlist,
p_playlist->current.p_elems[i_position]->p_input->i_id, p_playlist->current.p_elems[i_position]->p_input->i_id,
true ); pl_Locked );
} }
PL_UNLOCK; PL_UNLOCK;
......
...@@ -1430,7 +1430,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1430,7 +1430,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
else if( !strcmp( psz_cmd, "clear" ) ) else if( !strcmp( psz_cmd, "clear" ) )
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
playlist_Clear( p_playlist, false ); playlist_Clear( p_playlist, pl_Unlocked );
} }
else if( !strcmp( psz_cmd, "add" ) && else if( !strcmp( psz_cmd, "add" ) &&
newval.psz_string && *newval.psz_string ) newval.psz_string && *newval.psz_string )
...@@ -1442,7 +1442,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1442,7 +1442,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
msg_rc( "Trying to add %s to playlist.", newval.psz_string ); msg_rc( "Trying to add %s to playlist.", newval.psz_string );
int i_ret =playlist_AddInput( p_playlist, p_item, int i_ret =playlist_AddInput( p_playlist, p_item,
PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END, true, PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END, true,
false ); pl_Unlocked );
vlc_gc_decref( p_item ); vlc_gc_decref( p_item );
if( i_ret != VLC_SUCCESS ) if( i_ret != VLC_SUCCESS )
{ {
...@@ -1460,7 +1460,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1460,7 +1460,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
msg_rc( "trying to enqueue %s to playlist", newval.psz_string ); msg_rc( "trying to enqueue %s to playlist", newval.psz_string );
if( playlist_AddInput( p_playlist, p_item, if( playlist_AddInput( p_playlist, p_item,
PLAYLIST_APPEND, PLAYLIST_END, true, PLAYLIST_APPEND, PLAYLIST_END, true,
false ) != VLC_SUCCESS ) pl_Unlocked ) != VLC_SUCCESS )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
displayNameAtPath: o_urlString] UTF8String] ); displayNameAtPath: o_urlString] UTF8String] );
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT, playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT,
PLAYLIST_END, true, false ); PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
......
...@@ -1294,7 +1294,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1294,7 +1294,7 @@ static VLCWizard *_o_sharedInstance = nil;
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP, playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
PLAYLIST_END, true, false ); PLAYLIST_END, true, pl_Unlocked );
if( x == 0 ) if( x == 0 )
{ {
......
...@@ -679,7 +679,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key ) ...@@ -679,7 +679,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
if( p_item->i_children == -1 ) if( p_item->i_children == -1 )
{ {
playlist_DeleteFromInput( p_playlist, playlist_DeleteFromInput( p_playlist,
p_item->p_input->i_id, true ); p_item->p_input->i_id, pl_Locked );
} }
else else
{ {
......
...@@ -705,7 +705,7 @@ void PLModel::doDeleteItem( PLItem *item, QModelIndexList *fullList ) ...@@ -705,7 +705,7 @@ void PLModel::doDeleteItem( PLItem *item, QModelIndexList *fullList )
PL_UNLOCK; return; PL_UNLOCK; return;
} }
if( p_item->i_children == -1 ) if( p_item->i_children == -1 )
playlist_DeleteFromInput( p_playlist, item->i_input_id, true ); playlist_DeleteFromInput( p_playlist, item->i_input_id, pl_Locked );
else else
playlist_NodeDelete( p_playlist, p_item, true, false ); playlist_NodeDelete( p_playlist, p_item, true, false );
/* And finally, remove it from the tree */ /* And finally, remove it from the tree */
......
...@@ -313,7 +313,7 @@ void OpenDialog::finish( bool b_enqueue = false ) ...@@ -313,7 +313,7 @@ void OpenDialog::finish( bool b_enqueue = false )
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input, playlist_AddInput( THEPL, p_input,
PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ), PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
PLAYLIST_END, true, false ); PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
} }
......
...@@ -355,7 +355,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go ) ...@@ -355,7 +355,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input, playlist_AddInput( THEPL, p_input,
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND, go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
PLAYLIST_END, pl, false ); PLAYLIST_END, pl, pl_Unlocked );
input_Read( THEPL, p_input, false ); input_Read( THEPL, p_input, false );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
......
...@@ -74,7 +74,7 @@ void Playtree::delSelected() ...@@ -74,7 +74,7 @@ void Playtree::delSelected()
if( p_item->i_children == -1 ) if( p_item->i_children == -1 )
{ {
playlist_DeleteFromInput( getIntf()->p_sys->p_playlist, playlist_DeleteFromInput( getIntf()->p_sys->p_playlist,
p_item->p_input->i_id, true ); p_item->p_input->i_id, pl_Locked );
it2 = getNextVisibleItem( it ) ; it2 = getNextVisibleItem( it ) ;
it->parent()->removeChild( it ); it->parent()->removeChild( it );
it = it2; it = it2;
......
...@@ -1206,7 +1206,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) ) ...@@ -1206,7 +1206,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, playlist_AddInput( p_playlist, p_input,
PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ), PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
PLAYLIST_END, true, false ); PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
pl_Release( p_playlist ); pl_Release( p_playlist );
......
...@@ -1631,7 +1631,7 @@ void WizardDialog::Run() ...@@ -1631,7 +1631,7 @@ void WizardDialog::Run()
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input, playlist_AddInput( p_playlist, p_input,
PLAYLIST_GO, PLAYLIST_END, true, false ); PLAYLIST_GO, PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
pl_Release( p_playlist ); pl_Release( p_playlist );
} }
......
...@@ -107,7 +107,7 @@ static int vlclua_playlist_clear( lua_State * L ) ...@@ -107,7 +107,7 @@ static int vlclua_playlist_clear( lua_State * L )
{ {
playlist_t *p_playlist = vlclua_get_playlist_internal( L ); playlist_t *p_playlist = vlclua_get_playlist_internal( L );
playlist_Stop( p_playlist ); /* Isn't this already implied by Clear? */ playlist_Stop( p_playlist ); /* Isn't this already implied by Clear? */
playlist_Clear( p_playlist, false ); playlist_Clear( p_playlist, pl_Unlocked );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
return 0; return 0;
} }
......
...@@ -684,7 +684,7 @@ static int Demux( demux_t *p_demux ) ...@@ -684,7 +684,7 @@ static int Demux( demux_t *p_demux )
if( p_playlist->status.p_item && if( p_playlist->status.p_item &&
p_playlist->status.p_item->p_input == p_parent_input ) p_playlist->status.p_item->p_input == p_parent_input )
{ {
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked,
p_playlist->status.p_node, p_playlist->status.p_item ); p_playlist->status.p_node, p_playlist->status.p_item );
} }
...@@ -1540,7 +1540,7 @@ static int RemoveAnnounce( services_discovery_t *p_sd, ...@@ -1540,7 +1540,7 @@ static int RemoveAnnounce( services_discovery_t *p_sd,
if( p_announce->i_input_id > -1 ) if( p_announce->i_input_id > -1 )
{ {
playlist_DeleteFromInput( pl_Yield( p_sd ), playlist_DeleteFromInput( pl_Yield( p_sd ),
p_announce->i_input_id, false ); p_announce->i_input_id, pl_Unlocked );
pl_Release( p_sd ); pl_Release( p_sd );
} }
......
...@@ -100,7 +100,7 @@ static void input_item_subitem_added( const vlc_event_t * p_event, ...@@ -100,7 +100,7 @@ static void input_item_subitem_added( const vlc_event_t * p_event,
/* playlist_AddInput() can fail, but we have no way to report that .. /* playlist_AddInput() can fail, but we have no way to report that ..
* Any way when it has failed, either the playlist is dying, either OOM */ * Any way when it has failed, either the playlist is dying, either OOM */
playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END, playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END,
false, false ); false, pl_Unlocked );
} }
int playlist_MLLoad( playlist_t *p_playlist ) int playlist_MLLoad( playlist_t *p_playlist )
......
...@@ -269,7 +269,7 @@ static void playlist_sd_item_removed( const vlc_event_t * p_event, void * user_d ...@@ -269,7 +269,7 @@ static void playlist_sd_item_removed( const vlc_event_t * p_event, void * user_d
/* Delete the non-node item normally */ /* Delete the non-node item normally */
playlist_DeleteFromInputInParent( p_parent->p_playlist, p_input->i_id, playlist_DeleteFromInputInParent( p_parent->p_playlist, p_input->i_id,
p_parent, true ); p_parent, pl_Locked );
vlc_object_unlock( p_parent->p_playlist ); vlc_object_unlock( p_parent->p_playlist );
} }
......
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