Commit 8589b249 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

demux/playlist: Don't use playlist_t code.

parent 9e93e037
......@@ -31,7 +31,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_demux.h>
#include <vlc_playlist.h>
#include "playlist.h"
......
......@@ -159,7 +159,7 @@ static int Demux( demux_t *p_demux )
{
if( psz_mrl )
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,
0, NULL, -1 );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
......@@ -215,7 +215,7 @@ static int Demux( demux_t *p_demux )
/* Add last object */
if( psz_mrl )
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,0, NULL, -1 );
p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,0, NULL, -1 );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
......
......@@ -37,7 +37,6 @@
struct demux_sys_t
{
char *psz_prefix;
playlist_t *p_playlist;
xml_t *p_xml;
xml_reader_t *p_xml_reader;
};
......@@ -60,7 +59,6 @@ int Import_podcast( vlc_object_t *p_this )
STANDARD_DEMUX_INIT_MSG( "using podcast reader" );
p_demux->p_sys->psz_prefix = FindPrefix( p_demux );
p_demux->p_sys->p_playlist = NULL;
p_demux->p_sys->p_xml = NULL;
p_demux->p_sys->p_xml_reader = NULL;
......@@ -76,7 +74,6 @@ void Close_podcast( vlc_object_t *p_this )
demux_sys_t *p_sys = p_demux->p_sys;
free( p_sys->psz_prefix );
if( p_sys->p_playlist ) vlc_object_release( p_sys->p_playlist );
if( p_sys->p_xml_reader ) xml_ReaderDelete( p_sys->p_xml, p_sys->p_xml_reader );
if( p_sys->p_xml ) xml_Delete( p_sys->p_xml );
free( p_sys );
......@@ -275,7 +272,7 @@ static int Demux( demux_t *p_demux )
msg_Err( p_demux, "invalid XML (no enclosure markup)" );
return -1;
}
p_input = input_ItemNewExt( p_playlist, psz_item_mrl,
p_input = input_ItemNewExt( p_demux, psz_item_mrl,
psz_item_name, 0, NULL, -1 );
if( p_input == NULL ) break;
#define ADD_INFO( info, field ) \
......
......@@ -60,7 +60,6 @@ volume - 0 (mute) - 100 (max)
struct demux_sys_t
{
playlist_t *p_playlist;
input_item_t *p_current_input;
xml_t *p_xml;
......@@ -90,7 +89,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args );
int Import_QTL( vlc_object_t *p_this )
{
DEMUX_BY_EXTENSION_MSG( ".qtl", "using QuickTime Media Link reader" );
p_demux->p_sys->p_playlist = NULL;
p_demux->p_sys->p_xml = NULL;
p_demux->p_sys->p_xml_reader = NULL;
return VLC_SUCCESS;
......@@ -104,8 +102,6 @@ void Close_QTL( vlc_object_t *p_this )
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
if( p_sys->p_playlist )
vlc_object_release( p_sys->p_playlist );
if( p_sys->p_xml_reader )
xml_ReaderDelete( p_sys->p_xml, p_sys->p_xml_reader );
if( p_sys->p_xml )
......@@ -139,7 +135,6 @@ static int Demux( demux_t *p_demux )
INIT_PLAYLIST_STUFF;
p_sys->p_playlist = p_playlist;
p_sys->p_current_input = p_current_input;
p_xml = p_sys->p_xml = xml_Create( p_demux );
......@@ -354,7 +349,7 @@ static int Demux( demux_t *p_demux )
}
else
{
p_input = input_ItemNewExt( p_sys->p_playlist,
p_input = input_ItemNewExt( p_demux,
psz_src, psz_moviename, 0, NULL, -1 );
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
p_input, "QuickTime Media Link", _(type), "%s", field ) ; }
......@@ -364,7 +359,7 @@ static int Demux( demux_t *p_demux )
vlc_gc_decref( p_input );
if( psz_qtnext )
{
p_input = input_ItemNewExt( p_sys->p_playlist,
p_input = input_ItemNewExt( p_demux,
psz_qtnext, NULL, 0, NULL, -1 );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
......@@ -373,8 +368,6 @@ static int Demux( demux_t *p_demux )
HANDLE_PLAY_AND_RELEASE;
p_sys->p_playlist = NULL;
free( psz_href );
free( psz_moviename );
free( psz_qtnext );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment