Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
84218f98
Commit
84218f98
authored
Aug 16, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/demux/playlist/*.c: Use the new playlist independant way to announce sub items.
parent
609a1146
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
57 additions
and
129 deletions
+57
-129
modules/demux/playlist/asx.c
modules/demux/playlist/asx.c
+13
-21
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+2
-5
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+1
-3
modules/demux/playlist/gvp.c
modules/demux/playlist/gvp.c
+3
-8
modules/demux/playlist/ifo.c
modules/demux/playlist/ifo.c
+1
-4
modules/demux/playlist/luaplaylist.c
modules/demux/playlist/luaplaylist.c
+2
-6
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+1
-3
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+1
-13
modules/demux/playlist/pls.c
modules/demux/playlist/pls.c
+4
-8
modules/demux/playlist/podcast.c
modules/demux/playlist/podcast.c
+4
-7
modules/demux/playlist/qtl.c
modules/demux/playlist/qtl.c
+4
-12
modules/demux/playlist/sgimb.c
modules/demux/playlist/sgimb.c
+2
-4
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+6
-15
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+11
-16
modules/demux/playlist/xspf.h
modules/demux/playlist/xspf.h
+2
-4
No files found.
modules/demux/playlist/asx.c
View file @
84218f98
...
...
@@ -460,12 +460,8 @@ static int Demux( demux_t *p_demux )
memcpy
(
psz_string
,
psz_backup
,
i_strlen
);
psz_string
[
i_strlen
]
=
'\0'
;
p_input
=
input_ItemNew
(
p_playlist
,
psz_string
,
psz_title_asx
);
input_ItemCopyOptions
(
p_current
->
p_input
,
p_input
);
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemCopyOptions
(
p_current_input
,
p_input
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
free
(
psz_string
);
}
else
continue
;
...
...
@@ -501,7 +497,7 @@ static int Demux( demux_t *p_demux )
if
(
p_sys
->
b_skip_ads
&&
b_skip_entry
)
{
msg_Dbg
(
p_demux
,
"skipped entry %d %s (%s)"
,
i_entry_count
,
(
psz_title_entry
?
psz_title_entry
:
p_current
->
p
_input
->
psz_name
),
psz_href
);
i_entry_count
,
(
psz_title_entry
?
psz_title_entry
:
p_current_input
->
psz_name
),
psz_href
);
}
else
{
...
...
@@ -518,11 +514,11 @@ static int Demux( demux_t *p_demux )
}
/* create the new entry */
asprintf
(
&
psz_name
,
"%d %s"
,
i_entry_count
,
(
psz_title_entry
?
psz_title_entry
:
p_current
->
p
_input
->
psz_name
)
);
asprintf
(
&
psz_name
,
"%d %s"
,
i_entry_count
,
(
psz_title_entry
?
psz_title_entry
:
p_current_input
->
psz_name
)
);
p_entry
=
input_ItemNewExt
(
p_playlist
,
psz_href
,
psz_name
,
i_options
,
(
const
char
*
const
*
)
ppsz_options
,
-
1
);
FREENULL
(
psz_name
);
input_ItemCopyOptions
(
p_current
->
p
_input
,
p_entry
);
input_ItemCopyOptions
(
p_current_input
,
p_entry
);
while
(
i_options
)
{
psz_name
=
ppsz_options
[
--
i_options
];
...
...
@@ -534,11 +530,7 @@ static int Demux( demux_t *p_demux )
if
(
psz_copyright_entry
)
input_item_SetCopyright
(
p_entry
,
psz_copyright_entry
);
if
(
psz_moreinfo_entry
)
input_item_SetURL
(
p_entry
,
psz_moreinfo_entry
);
if
(
psz_abstract_entry
)
input_item_SetDescription
(
p_entry
,
psz_abstract_entry
);
playlist_BothAddInput
(
p_playlist
,
p_entry
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_entry
);
}
/* cleanup entry */
...
...
@@ -675,13 +667,13 @@ static int Demux( demux_t *p_demux )
}
else
if
(
!
strncasecmp
(
psz_parse
,
"</ASX"
,
5
)
)
{
vlc_mutex_lock
(
&
p_current
->
p
_input
->
lock
);
if
(
psz_title_asx
)
input_item_SetTitle
(
p_current
->
p
_input
,
psz_title_asx
);
if
(
psz_artist_asx
)
input_item_SetArtist
(
p_current
->
p
_input
,
psz_artist_asx
);
if
(
psz_copyright_asx
)
input_item_SetCopyright
(
p_current
->
p
_input
,
psz_copyright_asx
);
if
(
psz_moreinfo_asx
)
input_item_SetURL
(
p_current
->
p
_input
,
psz_moreinfo_asx
);
if
(
psz_abstract_asx
)
input_item_SetDescription
(
p_current
->
p
_input
,
psz_abstract_asx
);
vlc_mutex_unlock
(
&
p_current
->
p
_input
->
lock
);
vlc_mutex_lock
(
&
p_current_input
->
lock
);
if
(
psz_title_asx
)
input_item_SetTitle
(
p_current_input
,
psz_title_asx
);
if
(
psz_artist_asx
)
input_item_SetArtist
(
p_current_input
,
psz_artist_asx
);
if
(
psz_copyright_asx
)
input_item_SetCopyright
(
p_current_input
,
psz_copyright_asx
);
if
(
psz_moreinfo_asx
)
input_item_SetURL
(
p_current_input
,
psz_moreinfo_asx
);
if
(
psz_abstract_asx
)
input_item_SetDescription
(
p_current_input
,
psz_abstract_asx
);
vlc_mutex_unlock
(
&
p_current_input
->
lock
);
FREENULL
(
psz_base_asx
);
FREENULL
(
psz_title_asx
);
FREENULL
(
psz_artist_asx
);
...
...
modules/demux/playlist/b4s.c
View file @
84218f98
...
...
@@ -155,7 +155,7 @@ static int Demux( demux_t *p_demux )
}
else
if
(
!
strcmp
(
psz_name
,
"label"
)
)
{
playlist_ItemSetName
(
p_curren
t
,
psz_value
);
input_ItemSetName
(
p_current_inpu
t
,
psz_value
);
}
else
{
...
...
@@ -266,10 +266,7 @@ static int Demux( demux_t *p_demux )
if
(
psz_bitrate
)
msg_Err
(
p_playlist
,
"Unsupported meta bitrate"
);
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
FREENULL
(
psz_name
);
FREENULL
(
psz_mrl
);
FREENULL
(
psz_genre
);
...
...
modules/demux/playlist/dvb.c
View file @
84218f98
...
...
@@ -118,9 +118,7 @@ static int Demux( demux_t *p_demux )
EnsureUTF8
(
ppsz_options
[
i
]
);
input_ItemAddOption
(
p_input
,
ppsz_options
[
i
]
);
}
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
while
(
i_options
--
)
free
(
ppsz_options
[
i_options
]
);
if
(
ppsz_options
)
free
(
ppsz_options
);
...
...
modules/demux/playlist/gvp.c
View file @
84218f98
...
...
@@ -59,8 +59,7 @@ description:The now infamous Apple Macintosh commercial aired during the 1984 Su
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
;
};
/*****************************************************************************
...
...
@@ -132,8 +131,7 @@ static int Demux( demux_t *p_demux )
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
;
while
(
(
psz_line
=
stream_ReadLine
(
p_demux
->
s
)
)
)
{
...
...
@@ -212,10 +210,7 @@ static int Demux( demux_t *p_demux )
SADD_INFO
(
"gvp_version"
,
psz_version
);
SADD_INFO
(
"docid"
,
psz_docid
);
SADD_INFO
(
"description"
,
psz_description
);
playlist_BothAddInput
(
p_sys
->
p_playlist
,
p_input
,
p_sys
->
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
}
HANDLE_PLAY_AND_RELEASE
;
...
...
modules/demux/playlist/ifo.c
View file @
84218f98
...
...
@@ -94,10 +94,7 @@ static int Demux( demux_t *p_demux )
snprintf
(
psz_url
,
len
+
1
,
"dvd://%s"
,
p_demux
->
psz_path
);
p_input
=
input_ItemNewExt
(
p_playlist
,
psz_url
,
psz_url
,
0
,
NULL
,
-
1
);
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
HANDLE_PLAY_AND_RELEASE
;
...
...
modules/demux/playlist/luaplaylist.c
View file @
84218f98
...
...
@@ -295,7 +295,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
const
char
*
psz_vlcpath
=
config_GetDataDir
();
const
char
*
psz_vlcpath
=
NULL
;
//
config_GetDataDir();
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
return
VLC_ENOMEM
;
if
(
asprintf
(
&
ppsz_dir_list
[
2
],
"%s"
DIR_SEP
"share"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
...
...
@@ -643,11 +643,7 @@ static int Demux( demux_t *p_demux )
p_input
);
/* Append item to playlist */
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
while
(
i_options
>
0
)
free
(
ppsz_options
[
--
i_options
]
);
...
...
modules/demux/playlist/m3u.c
View file @
84218f98
...
...
@@ -185,9 +185,7 @@ static int Demux( demux_t *p_demux )
if
(
psz_artist
&&
*
psz_artist
)
input_ItemAddInfo
(
p_input
,
_
(
VLC_META_INFO_CAT
),
_
(
VLC_META_ARTIST
),
"%s"
,
psz_artist
);
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
free
(
psz_mrl
);
}
...
...
modules/demux/playlist/playlist.h
View file @
84218f98
...
...
@@ -75,22 +75,10 @@ void E_(Close_VideoPortal) ( vlc_object_t * );
#define INIT_PLAYLIST_STUFF \
playlist_t *p_playlist = pl_Yield( p_demux ); \
vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" ); \
input_thread_t *p_input_thread = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); \
input_item_t *p_current_input = input_GetItem( p_input_thread ); \
playlist_item_t *p_current = \
playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE ); \
playlist_item_t *p_item_in_category = \
playlist_ItemToNode( p_playlist, p_current, \
VLC_TRUE ); \
b_play = b_play && p_current == p_playlist->status.p_item; \
if( p_item_in_category ) \
p_item_in_category->p_input->i_type = ITEM_TYPE_PLAYLIST;
input_item_t *p_current_input = input_GetItem( p_input_thread );
#define HANDLE_PLAY_AND_RELEASE \
/* Go back and play the playlist */
\
if( b_play && p_item_in_category ) \
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_item_in_category, NULL ); \
vlc_object_release( p_input_thread ); \
vlc_object_release( p_playlist );
modules/demux/playlist/pls.c
View file @
84218f98
...
...
@@ -160,10 +160,8 @@ static int Demux( demux_t *p_demux )
{
p_input
=
input_ItemNewExt
(
p_playlist
,
psz_mrl
,
psz_name
,
0
,
NULL
,
-
1
);
input_ItemCopyOptions
(
p_current
->
p_input
,
p_input
);
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemCopyOptions
(
p_current_input
,
p_input
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
}
else
{
...
...
@@ -221,10 +219,8 @@ static int Demux( demux_t *p_demux )
if
(
psz_mrl
)
{
p_input
=
input_ItemNewExt
(
p_playlist
,
psz_mrl
,
psz_name
,
0
,
NULL
,
-
1
);
input_ItemCopyOptions
(
p_current
->
p_input
,
p_input
);
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemCopyOptions
(
p_current_input
,
p_input
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
free
(
psz_mrl_orig
);
psz_mrl
=
NULL
;
}
...
...
modules/demux/playlist/podcast.c
View file @
84218f98
...
...
@@ -229,12 +229,12 @@ static int Demux( demux_t *p_demux )
else
if
(
b_item
==
VLC_FALSE
&&
b_image
==
VLC_FALSE
&&
!
strcmp
(
psz_elname
,
"title"
)
)
{
playlist_ItemSetName
(
p_curren
t
,
psz_text
);
input_ItemSetName
(
p_current_inpu
t
,
psz_text
);
}
#define ADD_GINFO( info, name ) \
else if( !b_item && !b_image && !strcmp( psz_elname, name ) ) \
{ \
input_ItemAddInfo( p_current
->p
_input, _("Podcast Info"), \
input_ItemAddInfo( p_current_input, _("Podcast Info"), \
_( info ), "%s", psz_text ); \
}
ADD_GINFO
(
"Podcast Link"
,
"link"
)
...
...
@@ -247,7 +247,7 @@ static int Demux( demux_t *p_demux )
&&
(
!
strcmp
(
psz_elname
,
"itunes:summary"
)
||!
strcmp
(
psz_elname
,
"description"
)
)
)
{
/* <description> isn't standard iTunes podcast stuff */
input_ItemAddInfo
(
p_current
->
p
_input
,
input_ItemAddInfo
(
p_current_input
,
_
(
"Podcast Info"
),
_
(
"Podcast Summary"
),
"%s"
,
psz_text
);
}
...
...
@@ -290,10 +290,7 @@ static int Demux( demux_t *p_demux )
"%s bytes"
,
psz_item_size
);
}
playlist_BothAddInput
(
p_playlist
,
p_input
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
FREENULL
(
psz_item_name
);
FREENULL
(
psz_item_mrl
);
FREENULL
(
psz_item_size
);
...
...
modules/demux/playlist/qtl.c
View file @
84218f98
...
...
@@ -58,8 +58,7 @@ volume - 0 (mute) - 100 (max)
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
;
...
...
@@ -138,8 +137,7 @@ static int Demux( demux_t *p_demux )
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
;
...
...
@@ -359,18 +357,12 @@ static int Demux( demux_t *p_demux )
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_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
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_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
}
}
...
...
modules/demux/playlist/sgimb.c
View file @
84218f98
...
...
@@ -382,7 +382,7 @@ static int Demux ( demux_t *p_demux )
return
VLC_EGENERIC
;
}
input_ItemCopyOptions
(
p_current
->
p
_input
,
p_child
);
input_ItemCopyOptions
(
p_current_input
,
p_child
);
if
(
p_sys
->
i_packet_size
&&
p_sys
->
psz_mcast_ip
)
{
char
*
psz_option
;
...
...
@@ -406,9 +406,7 @@ static int Demux ( demux_t *p_demux )
free
(
psz_option
);
}
playlist_BothAddInput
(
p_playlist
,
p_child
,
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_current_input
,
p_child
);
HANDLE_PLAY_AND_RELEASE
return
-
1
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/shoutcast.c
View file @
84218f98
...
...
@@ -37,8 +37,7 @@
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
;
...
...
@@ -108,8 +107,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_eltname
=
NULL
;
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
;
...
...
@@ -236,13 +234,10 @@ static int DemuxGenre( demux_t *p_demux )
psz_name
);
p_input
=
input_ItemNewExt
(
p_sys
->
p_playlist
,
psz_mrl
,
psz_name
,
0
,
NULL
,
-
1
);
input_ItemCopyOptions
(
p_sys
->
p_current
->
p
_input
,
input_ItemCopyOptions
(
p_sys
->
p_current_input
,
p_input
);
free
(
psz_mrl
);
playlist_BothAddInput
(
p_sys
->
p_playlist
,
p_input
,
p_sys
->
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_sys
->
p_current_input
,
p_input
);
FREENULL
(
psz_name
);
}
FREENULL
(
psz_eltname
);
...
...
@@ -414,7 +409,7 @@ static int DemuxStation( demux_t *p_demux )
psz_name
,
0
,
NULL
,
-
1
);
free
(
psz_mrl
);
input_ItemCopyOptions
(
p_sys
->
p_current
->
p
_input
,
input_ItemCopyOptions
(
p_sys
->
p_current_input
,
p_input
);
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
...
...
@@ -429,11 +424,7 @@ static int DemuxStation( demux_t *p_demux )
input_item_SetNowPlaying
(
p_input
,
psz_ct
);
if
(
psz_rt
)
input_item_SetRating
(
p_input
,
psz_rt
);
playlist_BothAddInput
(
p_sys
->
p_playlist
,
p_input
,
p_sys
->
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_sys
->
p_current_input
,
p_input
);
FREENULL
(
psz_name
);
FREENULL
(
psz_mt
)
...
...
modules/demux/playlist/xspf.c
View file @
84218f98
...
...
@@ -75,7 +75,6 @@ int Demux( demux_t *p_demux )
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_name
=
NULL
;
INIT_PLAYLIST_STUFF
;
p_demux
->
p_sys
->
p_item_in_category
=
p_item_in_category
;
p_demux
->
p_sys
->
pp_tracklist
=
NULL
;
p_demux
->
p_sys
->
i_tracklist_entries
=
0
;
p_demux
->
p_sys
->
i_identifier
=
0
;
...
...
@@ -117,7 +116,7 @@ int Demux( demux_t *p_demux )
FREE_NAME
();
}
i_ret
=
parse_playlist_node
(
p_demux
,
p_playlist
,
p_current
,
NULL
,
i_ret
=
parse_playlist_node
(
p_demux
,
p_playlist
,
p_current
_input
,
p_xml_reader
,
"playlist"
);
HANDLE_PLAY_AND_RELEASE
;
if
(
p_xml_reader
)
...
...
@@ -137,8 +136,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
* \brief parse the root node of a XSPF playlist
* \param p_demux demuxer instance
* \param p_playlist playlist instance
* \param p_item current playlist item
* \param p_input current input item
* \param p_input_item current input item
* \param p_xml_reader xml reader instance
* \param psz_element name of element to parse
*/
...
...
@@ -236,7 +234,7 @@ static vlc_bool_t parse_playlist_node COMPLEX_INTERFACE
{
if
(
p_handler
->
pf_handler
.
cmplx
(
p_demux
,
p_playlist
,
p_i
tem
,
NULL
,
p_i
nput_item
,
p_xml_reader
,
p_handler
->
name
)
)
{
...
...
@@ -290,7 +288,7 @@ static vlc_bool_t parse_playlist_node COMPLEX_INTERFACE
if
(
p_handler
->
pf_handler
.
smpl
)
{
p_handler
->
pf_handler
.
smpl
(
p_i
tem
,
NULL
,
p_handler
->
name
,
p_handler
->
pf_handler
.
smpl
(
p_i
nput_item
,
p_handler
->
name
,
psz_value
);
}
FREE_ATT
();
...
...
@@ -340,7 +338,7 @@ static vlc_bool_t parse_tracklist_node COMPLEX_INTERFACE
FREE_NAME
();
/* parse the track data in a separate function */
if
(
parse_track_node
(
p_demux
,
p_playlist
,
p_i
tem
,
NULL
,
if
(
parse_track_node
(
p_demux
,
p_playlist
,
p_i
nput_item
,
p_xml_reader
,
"track"
)
==
VLC_TRUE
)
i_ntracks
++
;
}
...
...
@@ -439,7 +437,7 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
}
if
(
p_handler
->
pf_handler
.
cmplx
(
p_demux
,
p_playlist
,
NULL
,
p_new_input
,
p_new_input
,
p_xml_reader
,
p_handler
->
name
)
)
{
...
...
@@ -479,10 +477,7 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
if
(
!
strcmp
(
psz_name
,
psz_element
)
)
{
FREE_ATT
();
playlist_BothAddInput
(
p_playlist
,
p_new_input
,
p_demux
->
p_sys
->
p_item_in_category
,
PLAYLIST_APPEND
|
PLAYLIST_SPREPARSE
,
PLAYLIST_END
,
NULL
,
NULL
,
VLC_FALSE
);
input_ItemAddSubItem
(
p_input_item
,
p_new_input
);
if
(
p_demux
->
p_sys
->
i_identifier
<
p_demux
->
p_sys
->
i_tracklist_entries
)
{
...
...
@@ -549,7 +544,7 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
p_new_input
=
input_ItemNewExt
(
p_playlist
,
psz_uri
,
NULL
,
0
,
NULL
,
-
1
);
free
(
psz_uri
);
input_ItemCopyOptions
(
p_i
tem
->
p_input
,
p_new_input
);
input_ItemCopyOptions
(
p_i
nput_item
,
p_new_input
);
psz_uri
=
NULL
;
FREE_ATT
();
p_handler
=
NULL
;
...
...
@@ -576,7 +571,7 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
}
if
(
p_handler
->
pf_handler
.
smpl
)
{
p_handler
->
pf_handler
.
smpl
(
NULL
,
p_new_input
,
p_handler
->
pf_handler
.
smpl
(
p_new_input
,
p_handler
->
name
,
psz_value
);
FREE_ATT
();
...
...
@@ -724,7 +719,7 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
{
if
(
p_handler
->
pf_handler
.
cmplx
(
p_demux
,
p_playlist
,
p_i
tem
,
NULL
,
p_i
nput_item
,
p_xml_reader
,
p_handler
->
name
)
)
{
...
...
@@ -778,7 +773,7 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
if
(
p_handler
->
pf_handler
.
smpl
)
{
p_handler
->
pf_handler
.
smpl
(
p_i
tem
,
NULL
,
p_handler
->
name
,
p_handler
->
pf_handler
.
smpl
(
p_i
nput_item
,
p_handler
->
name
,
psz_value
);
}
FREE_ATT
();
...
...
modules/demux/playlist/xspf.h
View file @
84218f98
...
...
@@ -29,14 +29,12 @@
#define SIMPLE_CONTENT 1
#define COMPLEX_CONTENT 2
#define SIMPLE_INTERFACE (playlist_item_t *p_item,\
input_item_t *p_input,\
#define SIMPLE_INTERFACE (input_item_t *p_input,\
const char *psz_name,\
char *psz_value)
#define COMPLEX_INTERFACE (demux_t *p_demux,\
playlist_t *p_playlist,\
playlist_item_t *p_item,\
input_item_t *p_input, \
input_item_t *p_input_item,\
xml_reader_t *p_xml_reader,\
const char *psz_element)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment