#include <stdlib.h>
#include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_input.h>
+#include <vlc_access.h>
-#include "codecs.h"
+#include <vlc_codecs.h> /* For WAVEHEADER */
#include "vcd/cdrom.h"
#include <vlc_playlist.h>
{
p_playlist = pl_Yield( p_access );
if( p_playlist->status.p_item->p_input ==
- ((input_thread_t *)p_access->p_parent)->input.p_item )
+ input_GetItem( (input_thread_t *)p_access->p_parent))
p_item = p_playlist->status.p_item;
else
{
- input_item_t *p_current = ( (input_thread_t*)p_access->p_parent)->
- input.p_item;
- p_item = playlist_LockItemGetByInput( p_playlist, p_current );
+ input_item_t *p_current = input_GetItem(
+ (input_thread_t*)p_access->p_parent);
+ p_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
if( !p_item )
{
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" );
vlc_mutex_lock( &p_playlist->object_lock );
playlist_ItemSetName( p_parent, psz_name );
/* If we have CDDB info, change the name */
if( p_sys->p_disc )
{
- char *psz_result;
+ const char *psz_result;
cddb_track_t *t = cddb_disc_get_track( p_sys->p_disc, i );
if( t!= NULL )
{
}
}
#endif
- playlist_AddWhereverNeeded( p_playlist, p_input_item, p_parent,
- p_item_in_category, VLC_FALSE, PLAYLIST_APPEND );
+ playlist_BothAddInput( p_playlist, p_input_item, p_item_in_category,
+ PLAYLIST_APPEND, PLAYLIST_END, NULL, NULL );
free( psz_uri ); free( psz_opt ); free( psz_name );
free( psz_first ); free( psz_last );
}