/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <ctype.h> /* isspace() */
#include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/intf.h>
+#include <vlc_demux.h>
+#include <vlc_interface.h>
#include "playlist.h"
#include "vlc_xml.h"
*****************************************************************************/
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
-static char *GetNextToken(char *psz_cur_string);
+//static char *GetNextToken(char *psz_cur_string);
static int IsWhitespace( char *psz_string );
/*****************************************************************************
*****************************************************************************/
int E_(Import_B4S)( vlc_object_t *p_this )
{
- DEMUX_BY_EXTENSION_OR_FORCED_MSG( ".b4s", "b4s-open",
+ DEMUX_BY_EXTENSION_OR_FORCED_MSG( ".b4s", "b4s-open",
"using B4S playlist reader" );
p_demux->p_sys->psz_prefix = E_(FindPrefix)( p_demux );
p_demux->p_sys->p_xml = NULL;
xml_reader_t *p_xml_reader;
char *psz_elname = NULL;
int i_type;
+ input_item_t *p_input;
char *psz_mrl = NULL, *psz_name = NULL, *psz_genre = NULL;
char *psz_now = NULL, *psz_listeners = NULL, *psz_bitrate = NULL;
}
else if( !strcmp( psz_name, "label" ) )
{
- playlist_ItemSetName( p_current, psz_value );
+ input_item_SetName( p_current_input, psz_value );
}
else
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
0, NULL, -1 );
if( psz_now )
- vlc_meta_SetNowPlaying( p_input->p_meta, psz_now );
+ input_item_SetNowPlaying( p_input, psz_now );
if( psz_genre )
- vlc_meta_SetGenre( p_input->p_meta, psz_genre );
+ input_item_SetGenre( p_input, psz_genre );
if( psz_listeners )
msg_Err( p_playlist, "Unsupported meta listeners" );
if( psz_bitrate )
msg_Err( p_playlist, "Unsupported meta bitrate" );
- playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
- p_item_in_category, (i_parent_id > 0 ) ? VLC_TRUE:
- VLC_FALSE, PLAYLIST_APPEND );
-
+ input_ItemAddSubItem( p_current_input, p_input );
FREENULL( psz_name );
FREENULL( psz_mrl );
FREENULL( psz_genre );
}
HANDLE_PLAY_AND_RELEASE;
- return VLC_SUCCESS;
+ return -1; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_EGENERIC;
}
+#if 0
/**
* Get a in-string pointer to the start of the next token from a
* string terminating the pointer returned by a previous call.
psz_cur_string++;
return psz_cur_string;
}
+#endif
static int IsWhitespace( char *psz_string )
{