/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <ctype.h> /* isspace() */
#include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/intf.h>
+#include <vlc_demux.h>
#include "playlist.h"
#include "vlc_xml.h"
struct demux_sys_t
{
playlist_t *p_playlist;
- playlist_item_t *p_current;
- playlist_item_t *p_item_in_category;
+ input_item_t *p_current_input;
xml_t *p_xml;
xml_reader_t *p_xml_reader;
FULLSCREEN_HALF,
FULLSCREEN_CURRENT,
FULLSCREEN_FULL } qtl_fullscreen_t;
-char* ppsz_fullscreen[] = { "normal", "double", "half", "current", "full" };
+const char* ppsz_fullscreen[] = { "normal", "double", "half", "current", "full" };
typedef enum { LOOP_TRUE,
LOOP_FALSE,
LOOP_PALINDROME } qtl_loop_t;
-char* ppsz_loop[] = { "true", "false", "palindrome" };
+const char* ppsz_loop[] = { "true", "false", "palindrome" };
/*****************************************************************************
* Local prototypes
INIT_PLAYLIST_STUFF;
p_sys->p_playlist = p_playlist;
- p_sys->p_current = p_current;
- p_sys->p_item_in_category = p_item_in_category;
+ p_sys->p_current_input = p_current_input;
p_xml = p_sys->p_xml = xml_Create( p_demux );
if( !p_xml ) return -1;
{
msg_Err( p_demux, "invalid root node %i, %s",
xml_ReaderNodeType( p_xml_reader ), psz_eltname );
- FREE( psz_eltname );
+ free( psz_eltname );
/* second line has <?quicktime tag ... so we try to skip it */
msg_Dbg( p_demux, "trying to read one more node" );
{
msg_Err( p_demux, "invalid root node %i, %s",
xml_ReaderNodeType( p_xml_reader ), psz_eltname );
- FREE( psz_eltname );
+ free( psz_eltname );
return -1;
}
}
- FREE( psz_eltname );
+ free( psz_eltname );
while( xml_ReaderNextAttr( p_sys->p_xml_reader ) == VLC_SUCCESS )
{
if( !psz_attrname || !psz_attrvalue )
{
- FREE( psz_attrname );
- FREE( psz_attrvalue );
+ free( psz_attrname );
+ free( psz_attrvalue );
return -1;
}
msg_Dbg( p_demux, "Attribute %s with value %s isn't valid",
psz_attrname, psz_attrvalue );
}
- FREE( psz_attrname );
- FREE( psz_attrvalue );
+ free( psz_attrname );
+ free( psz_attrvalue );
}
msg_Dbg( p_demux, "autoplay: %s (unused by VLC)",
p_input, "QuickTime Media Link", _(type), "%s", field ) ; }
SADD_INFO( "href", psz_href );
SADD_INFO( "mime type", psz_mimetype );
- playlist_BothAddInput( p_sys->p_playlist, p_input,
- p_sys->p_item_in_category, PLAYLIST_APPEND,
- PLAYLIST_END );
+ input_ItemAddSubItem( p_current_input, p_input );
if( psz_qtnext )
{
p_input = input_ItemNewExt( p_sys->p_playlist,
psz_qtnext, NULL, 0, NULL, -1 );
- playlist_BothAddInput( p_sys->p_playlist, p_input,
- p_sys->p_item_in_category,
- PLAYLIST_APPEND, PLAYLIST_END );
+ input_ItemAddSubItem( p_current_input, p_input );
}
}
p_sys->p_playlist = NULL;
- FREE( psz_href );
- FREE( psz_moviename );
- FREE( psz_qtnext );
- FREE( psz_src );
- FREE( psz_mimetype );
+ free( psz_href );
+ free( psz_moviename );
+ free( psz_qtnext );
+ free( psz_src );
+ free( psz_mimetype );
return -1; /* Needed for correct operation of go back */
}