void playlist_Lock( playlist_t *pl )
{
- vlc_object_lock( pl );
+ vlc_mutex_lock( &pl_priv(pl)->lock );
}
void playlist_Unlock( playlist_t *pl )
{
- vlc_object_unlock( pl );
+ vlc_mutex_unlock( &pl_priv(pl)->lock );
}
void playlist_AssertLocked( playlist_t *pl )
{
- vlc_object_assert_locked( pl );
+ vlc_assert_locked( &pl_priv(pl)->lock );
}
int playlist_Control( playlist_t * p_playlist, int i_query,
libvlc_priv(p_parent->p_libvlc)->p_playlist = p_playlist;
VariablesInit( p_playlist );
+ vlc_mutex_init( &p->lock );
vlc_cond_init( &p->signal );
/* Initialise data structures */
assert( !p_sys->p_fetcher );
vlc_cond_destroy( &p_sys->signal );
+ vlc_mutex_destroy( &p_sys->lock );
/* Remove all remaining items */
FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
} request;
vlc_thread_t thread; /**< engine thread */
+ vlc_mutex_t lock; /**< dah big playlist global lock */
vlc_cond_t signal; /**< wakes up the playlist engine thread */
int i_last_playlist_id; /**< Last id to an item */
else
{
if( vlc_object_alive( p_playlist ) )
- vlc_cond_wait( &pl_priv(p_playlist)->signal,
- &vlc_internals(p_playlist)->lock );
+ vlc_cond_wait( &p_sys->signal, &p_sys->lock );
}
return;
}
/* If there is an input, check that it doesn't need to die. */
while( !LoopInput( p_playlist ) )
- vlc_cond_wait( &pl_priv(p_playlist)->signal,
- &vlc_internals(p_playlist)->lock );
+ vlc_cond_wait( &p_sys->signal, &p_sys->lock );
LoopRequest( p_playlist );
}