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