- vlc_thread_join( p_playlist );
-
- var_Destroy( p_playlist, "intf-change" );
-
- vlc_object_destroy( p_playlist );
-}
-
-/**
- * Add an MRL to the playlist. This is a simplified version of
- * playlist_AddExt inculded for convenince. It equals calling playlist_AddExt
- * with psz_name == psz_target and i_duration == -1
- */
-
-int playlist_Add( playlist_t *p_playlist, const char *psz_target,
- const char **ppsz_options, int i_options,
- int i_mode, int i_pos )
-{
- return playlist_AddExt( p_playlist, psz_target, psz_target, -1,
- ppsz_options, i_options, i_mode, i_pos );
-}
-
-/**
- * Add a MRL into the playlist.
- *
- * \param p_playlist the playlist to add into
- * \param psz_uri the mrl to add to the playlist
- * \param psz_name a text giving a name or description of this item
- * \param i_duration a hint about the duration of this item, in miliseconds, or
- * -1 if unknown.
- * \param ppsz_options array of options
- * \param i_options number of items in ppsz_options
- * \param i_mode the mode used when adding
- * \param i_pos the position in the playlist where to add. If this is
- * PLAYLIST_END the item will be added at the end of the playlist
- * regardless of it's size
- * \return always returns 0
-*/
-int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
- const char * psz_name, mtime_t i_duration,
- const char **ppsz_options, int i_options, int i_mode,
- int i_pos )
-{
- playlist_item_t * p_item;
-
- p_item = malloc( sizeof( playlist_item_t ) );
- if( p_item == NULL )
- {
- msg_Err( p_playlist, "out of memory" );
- }
-
- p_item->psz_name = strdup( psz_name );
- p_item->psz_uri = strdup( psz_uri );
- p_item->i_duration = i_duration;
- p_item->i_type = 0;
- p_item->i_status = 0;
- p_item->b_autodeletion = VLC_FALSE;
-
- p_item->ppsz_options = NULL;
- p_item->i_options = i_options;
-
- if( i_options )
- {
- int i;
-
- p_item->ppsz_options = (char **)malloc( i_options * sizeof(char *) );
- for( i = 0; i < i_options; i++ )
- p_item->ppsz_options[i] = strdup( ppsz_options[i] );
-
- }
-
- return playlist_AddItem( p_playlist, p_item, i_mode, i_pos );
-}
-
-/**
- * Add a playlist item into a playlist
- *
- * \param p_playlist the playlist to insert into
- * \param p_item the playlist item to insert
- * \param i_mode the mode used when adding
- * \param i_pos the possition in the playlist where to add. If this is
- * PLAYLIST_END the item will be added at the end of the playlist
- * regardless of it's size
- * \return always returns 0
-*/
-int playlist_AddItem( playlist_t *p_playlist, playlist_item_t * p_item,
- int i_mode, int i_pos)
-{
- vlc_value_t val;
-
- vlc_mutex_lock( &p_playlist->object_lock );
-
- /*
- * CHECK_INSERT : checks if the item is already enqued before
- * enqueing it
- */
- if ( i_mode & PLAYLIST_CHECK_INSERT )