# include "config.h"
#endif
+#include <assert.h>
+
#include <vlc_common.h>
#include <vlc_es.h>
#include <vlc_input.h>
/* */
playlist_private_t *p_sys = pl_priv(p_playlist);
- /* Fetcher */
- p_sys->p_fetcher = playlist_fetcher_New( p_playlist );
- if( !p_sys->p_fetcher )
- msg_Err( p_playlist, "cannot create playlist fetcher" );
-
- /* Preparse */
- p_sys->p_preparser = playlist_preparser_New( p_playlist, p_sys->p_fetcher );
- if( !p_sys->p_preparser )
- msg_Err( p_playlist, "cannot create playlist preparser" );
-
/* Start the playlist thread */
if( vlc_clone( &p_sys->thread, Thread, p_playlist,
VLC_THREAD_PRIORITY_LOW ) )
msg_Dbg( p_playlist, "Deactivate" );
- vlc_object_kill( p_playlist );
PL_LOCK;
+ vlc_object_kill( p_playlist );
vlc_cond_signal( &p_sys->signal );
PL_UNLOCK;
vlc_join( p_sys->thread, NULL );
assert( !p_sys->p_input );
- PL_LOCK;
- playlist_preparser_t *p_preparser = p_sys->p_preparser;
- playlist_fetcher_t *p_fetcher = p_sys->p_fetcher;
-
- p_sys->p_preparser = NULL;
- p_sys->p_fetcher = NULL;
- PL_UNLOCK;
-
- if( p_preparser )
- playlist_preparser_Delete( p_preparser );
- if( p_fetcher )
- playlist_fetcher_Delete( p_fetcher );
-
/* release input resources */
if( p_sys->p_input_resource )
input_resource_Delete( p_sys->p_input_resource );
p_sys->p_input_resource = NULL;
- /* */
- playlist_MLDump( p_playlist );
+ if( var_InheritBool( p_playlist, "media-library" ) )
+ playlist_MLDump( p_playlist );
PL_LOCK;
p_sys->p_input = p_input_thread;
var_AddCallback( p_input_thread, "intf-event", InputEvent, p_playlist );
+ var_SetAddress( p_playlist, "input-current", p_input_thread );
+
if( input_Start( p_sys->p_input ) )
{
vlc_object_release( p_input_thread );
free( psz_arturl );
free( psz_name );
}
-
+ /* FIXME: this is not safe !!*/
PL_UNLOCK;
var_SetAddress( p_playlist, "item-current", p_input );
PL_LOCK;