Commit 0900f110 authored by Clément Stenac's avatar Clément Stenac

Finish the playlist API transition (hopefully)

 - Remove a bunch of transition now-useless API.
 - Remove all playlist_Lock* functions. Matching functions now accept a
   b_locked parameter that should be set to VLC_TRUE if the playlist is
   locked when calling the function. The advantages are that it reduces
   the API bloat and that the b_locked flag can be propagated in the
   call stack
 - Remove useless playlist testsuite
 - Remove broken daap plugin (unmaintained wrt VLC API changes, relies on 
   an unmaintained library, probably unable to read content from new itunes, 
   ...). Implementations exist in rhythmbox, xmms2 and 
   daap-sharp, we should see if a proper lib exists or if we could 
   make one
 - Reduce verbosity a bit
 - Documentation
parent a54f7868
...@@ -5064,20 +5064,6 @@ then ...@@ -5064,20 +5064,6 @@ then
fi fi
fi fi
dnl
dnl DAAP access plugin and services discovery
dnl
AC_ARG_ENABLE(daap,
[ --enable-daap DAAP shares services discovery support (default enabled)])
if test "$enable_daap" != "no"
then
PKG_CHECK_MODULES(DAAP, opendaap >= 0.3.0,
[ VLC_ADD_PLUGINS([daap])
VLC_ADD_LDFLAGS([daap],[$DAAP_LIBS])
VLC_ADD_CFLAGS([daap],[$DAAP_CFLAGS])]:,
[AC_MSG_WARN(DAAP library not found)])
fi
dnl dnl
dnl Bonjour services discovery dnl Bonjour services discovery
dnl dnl
......
...@@ -37,12 +37,85 @@ TYPEDEF_ARRAY(input_item_t*, input_item_array_t); ...@@ -37,12 +37,85 @@ TYPEDEF_ARRAY(input_item_t*, input_item_array_t);
* to the playlist in vlc * to the playlist in vlc
* *
* \defgroup vlc_playlist Playlist * \defgroup vlc_playlist Playlist
*
* The VLC playlist system has a tree structure. This allows advanced
* categorization, like for SAP streams (which are grouped by "sap groups").
*
* The base structure for all playlist operations is the input_item_t. This
* contains all information needed to play a stream and get info, ie, mostly,
* mrl and metadata. This structure contains a unique i_id field. ids are
* not recycled when an item is destroyed.
*
* Input items are not used directly, but through playlist items.
* The playlist items are themselves in a tree structure. They only contain
* a link to the input item, a unique id and a few flags. the playlist
* item id is NOT the same as the input item id.
* Several playlist items can be attached to a single input item. The input
* item is refcounted and is automatically destroyed when it is not used
* anymore.
*
* In the playlist itself, there are two trees, that should always be kept
* in sync. The "category" tree contains the whole tree structure with
* several levels, while the onelevel tree contains only one level :), ie
* it only contains "real" items, not nodes
* For example, if you open a directory, you will have
*
* Category tree: Onevelel tree:
* Playlist Playlist
* - Dir - item1
* - Subdir - item2
* - item1
* - item2
*
* The top-level items of both tree are the same, and they are reproduced
* in the left-part of the playlist GUIs, they are the "sources" from the
* source selectors. Top-level items include: playlist, media library, SAP,
* Shoutcast, devices, ...
*
* It is envisioned that a third tree will appear: VLM, but it's not done yet
*
* The playlist also stores, for utility purposes, an array of all input
* items, an array of all playlist items and an array of all playlist items
* and nodes (both are represented by the same structure).
*
* So, here is an example:
*
* Inputs array
* - input 1 -> name = foo 1 uri = ...
* - input 2 -> name = foo 2 uri = ...
*
* Category tree Onlevel tree
* - playlist (id 1) - playlist (id 3)
* - category 1 (id 2) - foo 2 (id 8 - input 2)
* - foo 2 (id 6 - input 2) - media library (id 4)
* - media library (id 2) - foo 1 (id6 - input 1)
* - foo 1 (id 5 - input 1)
*
* Sometimes, an item must be transformed to a node. This happens for the
* directory access for example. In that case, the item is removed from
* the onelevel tree, as it is not a real item anymore.
*
* For "standard" item addition, you can use playlist_Add, playlist_AddExt
* (more options) or playlist_AddInput if you already created your input
* item. This will add the item at the root of "Playlist" or of "Media library"
* in each of the two trees.
*
* If you want more control (like, adding the item as the child of a given
* node in the category tree, use playlist_BothAddInput. You'll have to provide
* the node in the category tree. The item will be added as a child of
* this node in the category tree, and as a child of the matching top-level
* node in the onelevel tree. (Nodes are created with playlist_NodeCreate)
*
* Generally speaking, playlist_NodeAddInput should not be used in newer code, it
* will maybe become useful again when we merge VLM;
*
* To delete an item, use playlist_DeleteFromInput( input_id ) which will
* remove all occurences of the input in both trees
*
* @{ * @{
*/ */
/** /** Helper structure to export to file part of the playlist */
* playlist export helper structure
*/
struct playlist_export_t struct playlist_export_t
{ {
char *psz_filename; char *psz_filename;
...@@ -50,10 +123,7 @@ struct playlist_export_t ...@@ -50,10 +123,7 @@ struct playlist_export_t
playlist_item_t *p_root; playlist_item_t *p_root;
}; };
/** /** playlist item / node */
* playlist item / node
* \see playlist_t
*/
struct playlist_item_t struct playlist_item_t
{ {
input_item_t *p_input; /**< input item descriptor */ input_item_t *p_input; /**< input item descriptor */
...@@ -105,19 +175,19 @@ struct playlist_t ...@@ -105,19 +175,19 @@ struct playlist_t
playlist_item_array_t current; /**< Items currently being played */ playlist_item_array_t current; /**< Items currently being played */
int i_current_index; /**< Index in current array */ int i_current_index; /**< Index in current array */
/** Reset current item ? */ /** Reset current item array */
vlc_bool_t b_reset_currently_playing; vlc_bool_t b_reset_currently_playing;
mtime_t last_rebuild_date; mtime_t last_rebuild_date;
int i_last_playlist_id; /**< Last id to an item */ int i_last_playlist_id; /**< Last id to an item */
int i_last_input_id ; /**< Last id on an input */ int i_last_input_id ; /**< Last id on an input */
services_discovery_t **pp_sds; services_discovery_t **pp_sds; /**< Loaded service discovery modules */
int i_sds; int i_sds; /**< Number of service discovery modules */
/* Predefined items */ /* Predefined items */
playlist_item_t * p_root_category; playlist_item_t * p_root_category; /**< Root of category tree */
playlist_item_t * p_root_onelevel; playlist_item_t * p_root_onelevel; /**< Root of onelevel tree */
playlist_item_t * p_local_category; /** < "Playlist" in CATEGORY view */ playlist_item_t * p_local_category; /** < "Playlist" in CATEGORY view */
playlist_item_t * p_ml_category; /** < "Library" in CATEGORY view */ playlist_item_t * p_ml_category; /** < "Library" in CATEGORY view */
playlist_item_t * p_local_onelevel; /** < "Playlist" in ONELEVEL view */ playlist_item_t * p_local_onelevel; /** < "Playlist" in ONELEVEL view */
...@@ -165,10 +235,9 @@ struct playlist_t ...@@ -165,10 +235,9 @@ struct playlist_t
} request; } request;
// Playlist-unrelated fields // Playlist-unrelated fields
interaction_t *p_interaction; /**< Interaction manager */ interaction_t *p_interaction; /**< Interaction manager */
/** The input thread computing stats */ input_thread_t *p_stats_computer; /**< Input thread computing stats */
input_thread_t *p_stats_computer; global_stats_t *p_stats; /**< Global statistics */
global_stats_t *p_stats; /**< Global statistics */
}; };
/** Helper to add an item */ /** Helper to add an item */
...@@ -216,18 +285,16 @@ static inline playlist_t *__pl_Yield( vlc_object_t *p_this ) ...@@ -216,18 +285,16 @@ static inline playlist_t *__pl_Yield( vlc_object_t *p_this )
#define pl_Release(a) vlc_object_release( a->p_libvlc->p_playlist ); #define pl_Release(a) vlc_object_release( a->p_libvlc->p_playlist );
/* Playlist control */ /* Playlist control */
#define playlist_Play(p) playlist_LockControl(p,PLAYLIST_PLAY ) #define playlist_Play(p) playlist_Control(p,PLAYLIST_PLAY, VLC_FALSE )
#define playlist_Pause(p) playlist_LockControl(p,PLAYLIST_PAUSE ) #define playlist_Pause(p) playlist_Control(p,PLAYLIST_PAUSE, VLC_FALSE )
#define playlist_Stop(p) playlist_LockControl(p,PLAYLIST_STOP ) #define playlist_Stop(p) playlist_Control(p,PLAYLIST_STOP, VLC_FALSE )
#define playlist_Next(p) playlist_LockControl(p,PLAYLIST_SKIP, 1) #define playlist_Next(p) playlist_Control(p,PLAYLIST_SKIP, VLC_FALSE, 1)
#define playlist_Prev(p) playlist_LockControl(p,PLAYLIST_SKIP, -1) #define playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, VLC_FALSE, -1)
#define playlist_Skip(p,i) playlist_LockControl(p,PLAYLIST_SKIP, i) #define playlist_Skip(p,i) playlist_Control(p,PLAYLIST_SKIP, VLC_FALSE, i)
VLC_EXPORT( int, playlist_Control, ( playlist_t *, int, ... ) ); VLC_EXPORT( int, playlist_Control, ( playlist_t *, int, vlc_bool_t, ... ) );
VLC_EXPORT( int, playlist_LockControl, ( playlist_t *, int, ... ) );
VLC_EXPORT( void, playlist_Clear, ( playlist_t * ) ); VLC_EXPORT( void, playlist_Clear, ( playlist_t *, vlc_bool_t ) );
VLC_EXPORT( void, playlist_LockClear, ( playlist_t * ) );
VLC_EXPORT( int, playlist_PreparseEnqueue, (playlist_t *, input_item_t *) ); VLC_EXPORT( int, playlist_PreparseEnqueue, (playlist_t *, input_item_t *) );
VLC_EXPORT( int, playlist_PreparseEnqueueItem, (playlist_t *, playlist_item_t *) ); VLC_EXPORT( int, playlist_PreparseEnqueueItem, (playlist_t *, playlist_item_t *) );
...@@ -245,7 +312,7 @@ VLC_EXPORT( int, playlist_TreeMove, ( playlist_t *, playlist_item_t *, playlist ...@@ -245,7 +312,7 @@ VLC_EXPORT( int, playlist_TreeMove, ( playlist_t *, playlist_item_t *, playlist
VLC_EXPORT( int, playlist_NodeSort, ( playlist_t *, playlist_item_t *,int, int ) ); VLC_EXPORT( int, playlist_NodeSort, ( playlist_t *, playlist_item_t *,int, int ) );
VLC_EXPORT( int, playlist_RecursiveNodeSort, ( playlist_t *, playlist_item_t *,int, int ) ); VLC_EXPORT( int, playlist_RecursiveNodeSort, ( playlist_t *, playlist_item_t *,int, int ) );
/* Load/Save */ /* Save a playlist file */
VLC_EXPORT( int, playlist_Export, ( playlist_t *, const char *, playlist_item_t *, const char * ) ); VLC_EXPORT( int, playlist_Export, ( playlist_t *, const char *, playlist_item_t *, const char * ) );
/******************************************************** /********************************************************
...@@ -275,11 +342,7 @@ VLC_EXPORT( playlist_item_t *, __playlist_ItemNewFromInput, ( vlc_object_t *p_ob ...@@ -275,11 +342,7 @@ VLC_EXPORT( playlist_item_t *, __playlist_ItemNewFromInput, ( vlc_object_t *p_ob
/*************************** Item deletion **************************/ /*************************** Item deletion **************************/
VLC_EXPORT( int, playlist_ItemDelete, ( playlist_item_t * ) ); VLC_EXPORT( int, playlist_ItemDelete, ( playlist_item_t * ) );
VLC_EXPORT( int, playlist_DeleteAllFromInput, ( playlist_t *, int ) ); VLC_EXPORT( int, playlist_DeleteFromInput, ( playlist_t *, int, vlc_bool_t ) );
VLC_EXPORT( int, playlist_DeleteFromInput, ( playlist_t *, int, playlist_item_t *, vlc_bool_t ) );
VLC_EXPORT( int, playlist_DeleteFromItemId, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_LockDelete, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_LockDeleteAllFromInput, ( playlist_t *, int ) );
/*************************** Item fields accessors **************************/ /*************************** Item fields accessors **************************/
VLC_EXPORT( int, playlist_ItemSetName, (playlist_item_t *, const char * ) ); VLC_EXPORT( int, playlist_ItemSetName, (playlist_item_t *, const char * ) );
...@@ -289,40 +352,18 @@ VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char *, i ...@@ -289,40 +352,18 @@ VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char *, i
VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, vlc_bool_t ) ); VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, vlc_bool_t ) );
VLC_EXPORT( int, playlist_AddInput, ( playlist_t *, input_item_t *,int , int, vlc_bool_t ) ); VLC_EXPORT( int, playlist_AddInput, ( playlist_t *, input_item_t *,int , int, vlc_bool_t ) );
VLC_EXPORT( playlist_item_t *, playlist_NodeAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int ) ); VLC_EXPORT( playlist_item_t *, playlist_NodeAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int ) );
VLC_EXPORT( void, playlist_NodeAddItem, ( playlist_t *, playlist_item_t *, playlist_item_t *,int , int ) ); VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, int*, int* ) );
VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int ) );
/********************** Misc item operations **********************/ /********************** Misc item operations **********************/
VLC_EXPORT( playlist_item_t*, playlist_ItemToNode, (playlist_t *,playlist_item_t *) ); VLC_EXPORT( playlist_item_t*, playlist_ItemToNode, (playlist_t *,playlist_item_t *, vlc_bool_t) );
VLC_EXPORT( playlist_item_t*, playlist_LockItemToNode, (playlist_t *,playlist_item_t *) );
playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist, playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
int i_input_id, playlist_item_t *p_root, int i_input_id, playlist_item_t *p_root,
vlc_bool_t ); vlc_bool_t );
/********************************** Item search *************************/ /********************************** Item search *************************/
VLC_EXPORT( playlist_item_t *, playlist_ItemGetById, (playlist_t *, int) ); VLC_EXPORT( playlist_item_t *, playlist_ItemGetById, (playlist_t *, int, vlc_bool_t) );
VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInput, (playlist_t *,input_item_t * ) ); VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInput, (playlist_t *,input_item_t *, vlc_bool_t ) );
static inline playlist_item_t *playlist_LockItemGetById( playlist_t *p_playlist,
int i_id)
{
playlist_item_t *p_ret;
vlc_mutex_lock( &p_playlist->object_lock );
p_ret = playlist_ItemGetById( p_playlist, i_id );
vlc_mutex_unlock( &p_playlist->object_lock );
return p_ret;
}
static inline playlist_item_t *playlist_LockItemGetByInput(
playlist_t *p_playlist, input_item_t *p_item )
{
playlist_item_t *p_ret;
vlc_mutex_lock( &p_playlist->object_lock );
p_ret = playlist_ItemGetByInput( p_playlist, p_item );
vlc_mutex_unlock( &p_playlist->object_lock );
return p_ret;
}
VLC_EXPORT( int, playlist_LiveSearchUpdate, (playlist_t *, playlist_item_t *, const char *) ); VLC_EXPORT( int, playlist_LiveSearchUpdate, (playlist_t *, playlist_item_t *, const char *) );
...@@ -367,7 +408,6 @@ static inline int playlist_Import( playlist_t *p_playlist, const char *psz_file) ...@@ -367,7 +408,6 @@ static inline int playlist_Import( playlist_t *p_playlist, const char *psz_file)
/** Tell the number of items in the current playing context */ /** Tell the number of items in the current playing context */
#define playlist_CurrentSize( obj ) obj->p_libvlc->p_playlist->current.i_size #define playlist_CurrentSize( obj ) obj->p_libvlc->p_playlist->current.i_size
/** Ask the playlist to do some work */ /** Ask the playlist to do some work */
static inline void playlist_Signal( playlist_t *p_playlist ) static inline void playlist_Signal( playlist_t *p_playlist )
{ {
...@@ -376,8 +416,6 @@ static inline void playlist_Signal( playlist_t *p_playlist ) ...@@ -376,8 +416,6 @@ static inline void playlist_Signal( playlist_t *p_playlist )
PL_UNLOCK; PL_UNLOCK;
} }
/** /** @} */
* @}
*/
#endif #endif
...@@ -256,10 +256,10 @@ struct module_symbols_t ...@@ -256,10 +256,10 @@ struct module_symbols_t
void (*__vlc_object_release_inner) (vlc_object_t *); void (*__vlc_object_release_inner) (vlc_object_t *);
vlc_list_t * (*__vlc_list_find_inner) (vlc_object_t *, int, int); vlc_list_t * (*__vlc_list_find_inner) (vlc_object_t *, int, int);
void (*vlc_list_release_inner) (vlc_list_t *); void (*vlc_list_release_inner) (vlc_list_t *);
int (*playlist_Control_inner) (playlist_t *, int, ...); int (*playlist_Control_inner) (playlist_t *, int, vlc_bool_t, ...);
int (*playlist_LockControl_inner) (playlist_t *, int, ...); void *playlist_LockControl_deprecated;
void (*playlist_Clear_inner) (playlist_t *); void (*playlist_Clear_inner) (playlist_t *, vlc_bool_t);
void (*playlist_LockClear_inner) (playlist_t *); void *playlist_LockClear_deprecated;
int (*playlist_PreparseEnqueue_inner) (playlist_t *, input_item_t *); int (*playlist_PreparseEnqueue_inner) (playlist_t *, input_item_t *);
int (*playlist_ServicesDiscoveryAdd_inner) (playlist_t *, const char *); int (*playlist_ServicesDiscoveryAdd_inner) (playlist_t *, const char *);
int (*playlist_ServicesDiscoveryRemove_inner) (playlist_t *, const char *); int (*playlist_ServicesDiscoveryRemove_inner) (playlist_t *, const char *);
...@@ -290,20 +290,20 @@ struct module_symbols_t ...@@ -290,20 +290,20 @@ struct module_symbols_t
int (*playlist_Add_inner) (playlist_t *, const char *, const char *, int, int, vlc_bool_t); int (*playlist_Add_inner) (playlist_t *, const char *, const char *, int, int, vlc_bool_t);
int (*playlist_AddExt_inner) (playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, vlc_bool_t); int (*playlist_AddExt_inner) (playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, vlc_bool_t);
void *playlist_ItemAdd_deprecated; void *playlist_ItemAdd_deprecated;
void (*playlist_NodeAddItem_inner) (playlist_t *, playlist_item_t *, playlist_item_t *,int , int); void *playlist_NodeAddItem_deprecated;
void *playlist_Delete_deprecated; void *playlist_Delete_deprecated;
int (*playlist_LockDelete_inner) (playlist_t *, int); void *playlist_LockDelete_deprecated;
void *playlist_Disable_deprecated; void *playlist_Disable_deprecated;
void *playlist_Enable_deprecated; void *playlist_Enable_deprecated;
playlist_item_t* (*playlist_ItemToNode_inner) (playlist_t *,playlist_item_t *); playlist_item_t* (*playlist_ItemToNode_inner) (playlist_t *,playlist_item_t *, vlc_bool_t);
playlist_item_t* (*playlist_LockItemToNode_inner) (playlist_t *,playlist_item_t *); void *playlist_LockItemToNode_deprecated;
void *playlist_Replace_deprecated; void *playlist_Replace_deprecated;
void *playlist_LockReplace_deprecated; void *playlist_LockReplace_deprecated;
playlist_item_t * (*playlist_ItemGetById_inner) (playlist_t *, int); playlist_item_t * (*playlist_ItemGetById_inner) (playlist_t *, int, vlc_bool_t);
void *playlist_LockItemGetById_deprecated; void *playlist_LockItemGetById_deprecated;
void *playlist_ItemGetByPos_deprecated; void *playlist_ItemGetByPos_deprecated;
void *playlist_LockItemGetByPos_deprecated; void *playlist_LockItemGetByPos_deprecated;
playlist_item_t * (*playlist_ItemGetByInput_inner) (playlist_t *,input_item_t *); playlist_item_t * (*playlist_ItemGetByInput_inner) (playlist_t *,input_item_t *, vlc_bool_t);
void *playlist_LockItemGetByInput_deprecated; void *playlist_LockItemGetByInput_deprecated;
void *playlist_GetPositionById_deprecated; void *playlist_GetPositionById_deprecated;
void *playlist_ItemAddOption_deprecated; void *playlist_ItemAddOption_deprecated;
...@@ -498,16 +498,16 @@ struct module_symbols_t ...@@ -498,16 +498,16 @@ struct module_symbols_t
void *playlist_PlaylistAdd_deprecated; void *playlist_PlaylistAdd_deprecated;
void *playlist_PlaylistAddExt_deprecated; void *playlist_PlaylistAddExt_deprecated;
void *playlist_PlaylistAddInput_deprecated; void *playlist_PlaylistAddInput_deprecated;
int (*playlist_BothAddInput_inner) (playlist_t *, input_item_t *,playlist_item_t *,int , int); int (*playlist_BothAddInput_inner) (playlist_t *, input_item_t *,playlist_item_t *,int , int, int*, int*);
playlist_item_t * (*__playlist_ItemNewFromInput_inner) (vlc_object_t *p_obj,input_item_t *p_input); playlist_item_t * (*__playlist_ItemNewFromInput_inner) (vlc_object_t *p_obj,input_item_t *p_input);
input_item_t * (*input_ItemGetById_inner) (playlist_t *, int); input_item_t * (*input_ItemGetById_inner) (playlist_t *, int);
int (*playlist_LiveSearchUpdate_inner) (playlist_t *, playlist_item_t *, const char *); int (*playlist_LiveSearchUpdate_inner) (playlist_t *, playlist_item_t *, const char *);
void *vlc_input_item_AddOption_deprecated; void *vlc_input_item_AddOption_deprecated;
int (*playlist_DeleteFromInput_inner) (playlist_t *, int, playlist_item_t *, vlc_bool_t); int (*playlist_DeleteFromInput_inner) (playlist_t *, int, vlc_bool_t);
int (*playlist_DeleteAllFromInput_inner) (playlist_t *, int); void *playlist_DeleteAllFromInput_deprecated;
int (*playlist_LockDeleteAllFromInput_inner) (playlist_t *, int); void *playlist_LockDeleteAllFromInput_deprecated;
void *playlist_AddWhereverNeeded_deprecated; void *playlist_AddWhereverNeeded_deprecated;
int (*playlist_DeleteFromItemId_inner) (playlist_t *, int); void *playlist_DeleteFromItemId_deprecated;
void (*playlist_NodeDump_inner) (playlist_t *p_playlist, playlist_item_t *p_item, int i_level); void (*playlist_NodeDump_inner) (playlist_t *p_playlist, playlist_item_t *p_item, int i_level);
void *__intf_UserOkayCancel_deprecated; void *__intf_UserOkayCancel_deprecated;
int (*__intf_UserStringInput_inner) (vlc_object_t*, const char*, const char*, char **); int (*__intf_UserStringInput_inner) (vlc_object_t*, const char*, const char*, char **);
...@@ -793,9 +793,7 @@ struct module_symbols_t ...@@ -793,9 +793,7 @@ struct module_symbols_t
# define __vlc_list_find (p_symbols)->__vlc_list_find_inner # define __vlc_list_find (p_symbols)->__vlc_list_find_inner
# define vlc_list_release (p_symbols)->vlc_list_release_inner # define vlc_list_release (p_symbols)->vlc_list_release_inner
# define playlist_Control (p_symbols)->playlist_Control_inner # define playlist_Control (p_symbols)->playlist_Control_inner
# define playlist_LockControl (p_symbols)->playlist_LockControl_inner
# define playlist_Clear (p_symbols)->playlist_Clear_inner # define playlist_Clear (p_symbols)->playlist_Clear_inner
# define playlist_LockClear (p_symbols)->playlist_LockClear_inner
# define playlist_PreparseEnqueue (p_symbols)->playlist_PreparseEnqueue_inner # define playlist_PreparseEnqueue (p_symbols)->playlist_PreparseEnqueue_inner
# define playlist_ServicesDiscoveryAdd (p_symbols)->playlist_ServicesDiscoveryAdd_inner # define playlist_ServicesDiscoveryAdd (p_symbols)->playlist_ServicesDiscoveryAdd_inner
# define playlist_ServicesDiscoveryRemove (p_symbols)->playlist_ServicesDiscoveryRemove_inner # define playlist_ServicesDiscoveryRemove (p_symbols)->playlist_ServicesDiscoveryRemove_inner
...@@ -814,10 +812,7 @@ struct module_symbols_t ...@@ -814,10 +812,7 @@ struct module_symbols_t
# define playlist_NodeEmpty (p_symbols)->playlist_NodeEmpty_inner # define playlist_NodeEmpty (p_symbols)->playlist_NodeEmpty_inner
# define playlist_Add (p_symbols)->playlist_Add_inner # define playlist_Add (p_symbols)->playlist_Add_inner
# define playlist_AddExt (p_symbols)->playlist_AddExt_inner # define playlist_AddExt (p_symbols)->playlist_AddExt_inner
# define playlist_NodeAddItem (p_symbols)->playlist_NodeAddItem_inner
# define playlist_LockDelete (p_symbols)->playlist_LockDelete_inner
# define playlist_ItemToNode (p_symbols)->playlist_ItemToNode_inner # define playlist_ItemToNode (p_symbols)->playlist_ItemToNode_inner
# define playlist_LockItemToNode (p_symbols)->playlist_LockItemToNode_inner
# define playlist_ItemGetById (p_symbols)->playlist_ItemGetById_inner # define playlist_ItemGetById (p_symbols)->playlist_ItemGetById_inner
# define playlist_ItemGetByInput (p_symbols)->playlist_ItemGetByInput_inner # define playlist_ItemGetByInput (p_symbols)->playlist_ItemGetByInput_inner
# define playlist_NodeSort (p_symbols)->playlist_NodeSort_inner # define playlist_NodeSort (p_symbols)->playlist_NodeSort_inner
...@@ -994,9 +989,6 @@ struct module_symbols_t ...@@ -994,9 +989,6 @@ struct module_symbols_t
# define input_ItemGetById (p_symbols)->input_ItemGetById_inner # define input_ItemGetById (p_symbols)->input_ItemGetById_inner
# define playlist_LiveSearchUpdate (p_symbols)->playlist_LiveSearchUpdate_inner # define playlist_LiveSearchUpdate (p_symbols)->playlist_LiveSearchUpdate_inner
# define playlist_DeleteFromInput (p_symbols)->playlist_DeleteFromInput_inner # define playlist_DeleteFromInput (p_symbols)->playlist_DeleteFromInput_inner
# define playlist_DeleteAllFromInput (p_symbols)->playlist_DeleteAllFromInput_inner
# define playlist_LockDeleteAllFromInput (p_symbols)->playlist_LockDeleteAllFromInput_inner
# define playlist_DeleteFromItemId (p_symbols)->playlist_DeleteFromItemId_inner
# define playlist_NodeDump (p_symbols)->playlist_NodeDump_inner # define playlist_NodeDump (p_symbols)->playlist_NodeDump_inner
# define __intf_UserStringInput (p_symbols)->__intf_UserStringInput_inner # define __intf_UserStringInput (p_symbols)->__intf_UserStringInput_inner
# define input_AddSubtitles (p_symbols)->input_AddSubtitles_inner # define input_AddSubtitles (p_symbols)->input_AddSubtitles_inner
...@@ -1273,9 +1265,7 @@ struct module_symbols_t ...@@ -1273,9 +1265,7 @@ struct module_symbols_t
((p_symbols)->__vlc_list_find_inner) = __vlc_list_find; \ ((p_symbols)->__vlc_list_find_inner) = __vlc_list_find; \
((p_symbols)->vlc_list_release_inner) = vlc_list_release; \ ((p_symbols)->vlc_list_release_inner) = vlc_list_release; \
((p_symbols)->playlist_Control_inner) = playlist_Control; \ ((p_symbols)->playlist_Control_inner) = playlist_Control; \
((p_symbols)->playlist_LockControl_inner) = playlist_LockControl; \
((p_symbols)->playlist_Clear_inner) = playlist_Clear; \ ((p_symbols)->playlist_Clear_inner) = playlist_Clear; \
((p_symbols)->playlist_LockClear_inner) = playlist_LockClear; \
((p_symbols)->playlist_PreparseEnqueue_inner) = playlist_PreparseEnqueue; \ ((p_symbols)->playlist_PreparseEnqueue_inner) = playlist_PreparseEnqueue; \
((p_symbols)->playlist_ServicesDiscoveryAdd_inner) = playlist_ServicesDiscoveryAdd; \ ((p_symbols)->playlist_ServicesDiscoveryAdd_inner) = playlist_ServicesDiscoveryAdd; \
((p_symbols)->playlist_ServicesDiscoveryRemove_inner) = playlist_ServicesDiscoveryRemove; \ ((p_symbols)->playlist_ServicesDiscoveryRemove_inner) = playlist_ServicesDiscoveryRemove; \
...@@ -1294,10 +1284,7 @@ struct module_symbols_t ...@@ -1294,10 +1284,7 @@ struct module_symbols_t
((p_symbols)->playlist_NodeEmpty_inner) = playlist_NodeEmpty; \ ((p_symbols)->playlist_NodeEmpty_inner) = playlist_NodeEmpty; \
((p_symbols)->playlist_Add_inner) = playlist_Add; \ ((p_symbols)->playlist_Add_inner) = playlist_Add; \
((p_symbols)->playlist_AddExt_inner) = playlist_AddExt; \ ((p_symbols)->playlist_AddExt_inner) = playlist_AddExt; \
((p_symbols)->playlist_NodeAddItem_inner) = playlist_NodeAddItem; \
((p_symbols)->playlist_LockDelete_inner) = playlist_LockDelete; \
((p_symbols)->playlist_ItemToNode_inner) = playlist_ItemToNode; \ ((p_symbols)->playlist_ItemToNode_inner) = playlist_ItemToNode; \
((p_symbols)->playlist_LockItemToNode_inner) = playlist_LockItemToNode; \
((p_symbols)->playlist_ItemGetById_inner) = playlist_ItemGetById; \ ((p_symbols)->playlist_ItemGetById_inner) = playlist_ItemGetById; \
((p_symbols)->playlist_ItemGetByInput_inner) = playlist_ItemGetByInput; \ ((p_symbols)->playlist_ItemGetByInput_inner) = playlist_ItemGetByInput; \
((p_symbols)->playlist_NodeSort_inner) = playlist_NodeSort; \ ((p_symbols)->playlist_NodeSort_inner) = playlist_NodeSort; \
...@@ -1474,9 +1461,6 @@ struct module_symbols_t ...@@ -1474,9 +1461,6 @@ struct module_symbols_t
((p_symbols)->input_ItemGetById_inner) = input_ItemGetById; \ ((p_symbols)->input_ItemGetById_inner) = input_ItemGetById; \
((p_symbols)->playlist_LiveSearchUpdate_inner) = playlist_LiveSearchUpdate; \ ((p_symbols)->playlist_LiveSearchUpdate_inner) = playlist_LiveSearchUpdate; \
((p_symbols)->playlist_DeleteFromInput_inner) = playlist_DeleteFromInput; \ ((p_symbols)->playlist_DeleteFromInput_inner) = playlist_DeleteFromInput; \
((p_symbols)->playlist_DeleteAllFromInput_inner) = playlist_DeleteAllFromInput; \
((p_symbols)->playlist_LockDeleteAllFromInput_inner) = playlist_LockDeleteAllFromInput; \
((p_symbols)->playlist_DeleteFromItemId_inner) = playlist_DeleteFromItemId; \
((p_symbols)->playlist_NodeDump_inner) = playlist_NodeDump; \ ((p_symbols)->playlist_NodeDump_inner) = playlist_NodeDump; \
((p_symbols)->__intf_UserStringInput_inner) = __intf_UserStringInput; \ ((p_symbols)->__intf_UserStringInput_inner) = __intf_UserStringInput; \
((p_symbols)->input_AddSubtitles_inner) = input_AddSubtitles; \ ((p_symbols)->input_AddSubtitles_inner) = input_AddSubtitles; \
...@@ -1522,6 +1506,8 @@ struct module_symbols_t ...@@ -1522,6 +1506,8 @@ struct module_symbols_t
(p_symbols)->sout_CfgCreate_deprecated = NULL; \ (p_symbols)->sout_CfgCreate_deprecated = NULL; \
(p_symbols)->vlc_input_item_GetInfo_deprecated = NULL; \ (p_symbols)->vlc_input_item_GetInfo_deprecated = NULL; \
(p_symbols)->vlc_input_item_AddInfo_deprecated = NULL; \ (p_symbols)->vlc_input_item_AddInfo_deprecated = NULL; \
(p_symbols)->playlist_LockControl_deprecated = NULL; \
(p_symbols)->playlist_LockClear_deprecated = NULL; \
(p_symbols)->__playlist_ItemNew_deprecated = NULL; \ (p_symbols)->__playlist_ItemNew_deprecated = NULL; \
(p_symbols)->__playlist_ItemCopy_deprecated = NULL; \ (p_symbols)->__playlist_ItemCopy_deprecated = NULL; \
(p_symbols)->playlist_ItemAddParent_deprecated = NULL; \ (p_symbols)->playlist_ItemAddParent_deprecated = NULL; \
...@@ -1534,9 +1520,12 @@ struct module_symbols_t ...@@ -1534,9 +1520,12 @@ struct module_symbols_t
(p_symbols)->playlist_ViewDump_deprecated = NULL; \ (p_symbols)->playlist_ViewDump_deprecated = NULL; \
(p_symbols)->playlist_ViewEmpty_deprecated = NULL; \ (p_symbols)->playlist_ViewEmpty_deprecated = NULL; \
(p_symbols)->playlist_ItemAdd_deprecated = NULL; \ (p_symbols)->playlist_ItemAdd_deprecated = NULL; \
(p_symbols)->playlist_NodeAddItem_deprecated = NULL; \
(p_symbols)->playlist_Delete_deprecated = NULL; \ (p_symbols)->playlist_Delete_deprecated = NULL; \
(p_symbols)->playlist_LockDelete_deprecated = NULL; \
(p_symbols)->playlist_Disable_deprecated = NULL; \ (p_symbols)->playlist_Disable_deprecated = NULL; \
(p_symbols)->playlist_Enable_deprecated = NULL; \ (p_symbols)->playlist_Enable_deprecated = NULL; \
(p_symbols)->playlist_LockItemToNode_deprecated = NULL; \
(p_symbols)->playlist_Replace_deprecated = NULL; \ (p_symbols)->playlist_Replace_deprecated = NULL; \
(p_symbols)->playlist_LockReplace_deprecated = NULL; \ (p_symbols)->playlist_LockReplace_deprecated = NULL; \
(p_symbols)->playlist_LockItemGetById_deprecated = NULL; \ (p_symbols)->playlist_LockItemGetById_deprecated = NULL; \
...@@ -1568,7 +1557,10 @@ struct module_symbols_t ...@@ -1568,7 +1557,10 @@ struct module_symbols_t
(p_symbols)->playlist_PlaylistAddExt_deprecated = NULL; \ (p_symbols)->playlist_PlaylistAddExt_deprecated = NULL; \
(p_symbols)->playlist_PlaylistAddInput_deprecated = NULL; \ (p_symbols)->playlist_PlaylistAddInput_deprecated = NULL; \
(p_symbols)->vlc_input_item_AddOption_deprecated = NULL; \ (p_symbols)->vlc_input_item_AddOption_deprecated = NULL; \
(p_symbols)->playlist_DeleteAllFromInput_deprecated = NULL; \
(p_symbols)->playlist_LockDeleteAllFromInput_deprecated = NULL; \
(p_symbols)->playlist_AddWhereverNeeded_deprecated = NULL; \ (p_symbols)->playlist_AddWhereverNeeded_deprecated = NULL; \
(p_symbols)->playlist_DeleteFromItemId_deprecated = NULL; \
(p_symbols)->__intf_UserOkayCancel_deprecated = NULL; \ (p_symbols)->__intf_UserOkayCancel_deprecated = NULL; \
(p_symbols)->playlist_NodesCreateForSD_deprecated = NULL; \ (p_symbols)->playlist_NodesCreateForSD_deprecated = NULL; \
(p_symbols)->stats_TimerClean_deprecated = NULL; \ (p_symbols)->stats_TimerClean_deprecated = NULL; \
......
...@@ -195,7 +195,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -195,7 +195,7 @@ static int Open( vlc_object_t *p_this )
{ {
input_item_t *p_current = ( (input_thread_t*)p_access->p_parent)-> input_item_t *p_current = ( (input_thread_t*)p_access->p_parent)->
input.p_item; input.p_item;
p_item = playlist_LockItemGetByInput( p_playlist, p_current ); p_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
if( !p_item ) if( !p_item )
{ {
...@@ -415,7 +415,7 @@ static int GetTracks( access_t *p_access, ...@@ -415,7 +415,7 @@ static int GetTracks( access_t *p_access,
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_item_in_category = playlist_LockItemToNode( p_playlist, p_parent ); p_item_in_category = playlist_ItemToNode( p_playlist, p_parent, VLC_FALSE );
psz_name = strdup( "Audio CD" ); psz_name = strdup( "Audio CD" );
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
playlist_ItemSetName( p_parent, psz_name ); playlist_ItemSetName( p_parent, psz_name );
...@@ -502,7 +502,7 @@ static int GetTracks( access_t *p_access, ...@@ -502,7 +502,7 @@ static int GetTracks( access_t *p_access,
} }
#endif #endif
playlist_BothAddInput( p_playlist, p_input_item, p_item_in_category, playlist_BothAddInput( p_playlist, p_input_item, p_item_in_category,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, PLAYLIST_END, NULL, NULL );
free( psz_uri ); free( psz_opt ); free( psz_name ); free( psz_uri ); free( psz_opt ); free( psz_name );
free( psz_first ); free( psz_last ); free( psz_first ); free( psz_last );
} }
......
...@@ -844,12 +844,6 @@ CDDACreatePlaylistItem( const access_t *p_access, cdda_data_t *p_cdda, ...@@ -844,12 +844,6 @@ CDDACreatePlaylistItem( const access_t *p_access, cdda_data_t *p_cdda,
free(psz_title); free(psz_title);
if( !p_child ) return NULL; if( !p_child ) return NULL;
#if 0
playlist_NodeAddItem( p_playlist, p_child,
p_item->p_parent->i_view,
p_item, PLAYLIST_APPEND, PLAYLIST_END );
playlist_CopyParents( p_item, p_child );
#endif
return p_child; return p_child;
} }