*****************************************************************************/
/* Helpers */
-#define PL_LOCK vlc_object_lock( p_playlist )
-#define PL_UNLOCK vlc_object_unlock( p_playlist )
-#define PL_ASSERT_LOCKED vlc_object_assert_locked( p_playlist )
+#define PL_LOCK playlist_Lock( p_playlist )
+#define PL_UNLOCK playlist_Unlock( p_playlist )
+#define PL_ASSERT_LOCKED playlist_AssertLocked( p_playlist )
VLC_EXPORT( playlist_t *, __pl_Hold, ( vlc_object_t * ) );
#define pl_Hold( a ) __pl_Hold( VLC_OBJECT(a) )
#define playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, -1)
#define playlist_Skip(p,i) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, (i) )
+VLC_EXPORT( void, playlist_Lock, ( playlist_t * ) );
+VLC_EXPORT( void, playlist_Unlock, ( playlist_t * ) );
+VLC_EXPORT( void, playlist_AssertLocked, ( playlist_t * ) );
+
/**
* Do a playlist action.
* If there is something in the playlist then you can do playlist actions.
playlist_t *p_pl )
{
mvar_t *s = mvar_New( name, "set" );
- vlc_object_lock( p_pl );
+ playlist_Lock( p_pl );
PlaylistListNode( p_intf, p_pl, p_pl->p_root_category , name, s, 0 );
- vlc_object_unlock( p_pl );
+ playlist_Unlock( p_pl );
return s;
}
int i_id = SSPopN( st, vars );
int i_ret;
- vlc_object_lock( p_sys->p_playlist );
+ playlist_Lock( p_sys->p_playlist );
i_ret = playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
pl_Locked, NULL,
playlist_ItemGetById( p_sys->p_playlist,
i_id, pl_Locked ) );
- vlc_object_unlock( p_sys->p_playlist );
+ playlist_Unlock( p_sys->p_playlist );
msg_Dbg( p_intf, "requested playlist item: %i", i_id );
SSPushN( st, i_ret );
}
};
#define THEPL p_intf->p_sys->p_playlist
-#define QPL_LOCK vlc_object_lock( THEPL );
-#define QPL_UNLOCK vlc_object_unlock( THEPL );
+#define QPL_LOCK playlist_Lock( THEPL );
+#define QPL_UNLOCK playlist_Unlock( THEPL );
#define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( p_intf )
return;
}
- vlc_object_lock( pPlaylist );
+ playlist_Lock( pPlaylist );
const bool b_empty = playlist_IsEmpty( pPlaylist );
- vlc_object_unlock( pPlaylist );
+ playlist_Unlock( pPlaylist );
if( !b_empty )
{
void Playtree::delSelected()
{
Iterator it = begin();
- vlc_object_lock( getIntf()->p_sys->p_playlist );
+ playlist_Lock( getIntf()->p_sys->p_playlist );
for( it = begin(); it != end(); it = getNextVisibleItem( it ) )
{
if( (*it).m_selected && !(*it).isReadonly() )
it = getNextVisibleItem( it );
}
}
- vlc_object_unlock( getIntf()->p_sys->p_playlist );
+ playlist_Unlock( getIntf()->p_sys->p_playlist );
}
void Playtree::action( VarTree *pItem )
{
- vlc_object_lock( m_pPlaylist );
+ playlist_Lock( m_pPlaylist );
VarTree::Iterator it;
playlist_item_t *p_item = (playlist_item_t *)pItem->m_pData;
{
playlist_Control( m_pPlaylist, PLAYLIST_VIEWPLAY, pl_Locked, p_parent, p_item );
}
- vlc_object_unlock( m_pPlaylist );
+ playlist_Unlock( m_pPlaylist );
}
void Playtree::onChange()
void Playtree::buildTree()
{
clear();
- vlc_object_lock( m_pPlaylist );
+ playlist_Lock( m_pPlaylist );
i_items_to_append = 0;
buildNode( m_pPlaylist->p_root_category, *this );
- vlc_object_unlock( m_pPlaylist );
+ playlist_Unlock( m_pPlaylist );
// What is it ?
// checkParents( NULL );
}
inline void LockPlaylist( intf_sys_t *p_sys, playlist_t *p_pl )
{
if( p_sys->i_playlist_usage++ == 0)
- vlc_object_lock( p_pl );
+ playlist_lock( p_pl );
}
inline void UnlockPlaylist( intf_sys_t *p_sys, playlist_t *p_pl )
{
if( --p_sys->i_playlist_usage == 0)
- vlc_object_unlock( p_pl );
+ playlist_Unlock( p_pl );
}
#endif
playlist_AddExt
playlist_AddInput
playlist_AskForArtEnqueue
+playlist_AssertLocked
playlist_BothAddInput
playlist_ChildSearchName
playlist_Clear
playlist_ItemNewWithType
playlist_ItemToNode
playlist_LiveSearchUpdate
+playlist_Lock
playlist_NodeAppend
playlist_NodeChildrenCount
playlist_NodeCreate
playlist_ServicesDiscoveryRemove
playlist_Status
playlist_TreeMove
+playlist_Unlock
__pl_Hold
__pl_Release
resolve_xml_special_chars
vlc_object_release( pl );
}
+void playlist_Lock( playlist_t *pl )
+{
+ vlc_object_lock( pl );
+}
+
+void playlist_Unlock( playlist_t *pl )
+{
+ vlc_object_unlock( pl );
+}
+
+void playlist_AssertLocked( playlist_t *pl )
+{
+ vlc_object_assert_locked( pl );
+}
+
int playlist_Control( playlist_t * p_playlist, int i_query,
bool b_locked, ... )
{