Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
890dbc22
Commit
890dbc22
authored
Nov 13, 2007
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* XSPF nested playlist
parent
78010fbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
22 deletions
+40
-22
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+25
-10
modules/misc/playlist/xspf.c
modules/misc/playlist/xspf.c
+10
-10
src/playlist/loadsave.c
src/playlist/loadsave.c
+5
-2
No files found.
modules/demux/playlist/xspf.c
View file @
890dbc22
...
...
@@ -477,7 +477,6 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
if
(
!
strcmp
(
psz_name
,
psz_element
)
)
{
FREE_ATT
();
input_ItemAddSubItem
(
p_input_item
,
p_new_input
);
if
(
p_demux
->
p_sys
->
i_identifier
<
p_demux
->
p_sys
->
i_tracklist_entries
)
{
...
...
@@ -655,6 +654,7 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
char
*
psz_application
=
NULL
;
int
i_node
;
xml_elem_hnd_t
*
p_handler
=
NULL
;
input_item_t
*
p_new_input
=
NULL
;
xml_elem_hnd_t
pl_elements
[]
=
{
{
"node"
,
COMPLEX_CONTENT
,
{.
cmplx
=
parse_extension_node
}
},
...
...
@@ -691,14 +691,24 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
}
/* attribute title is mandatory except for <extension> */
if
(
!
strcmp
(
psz_element
,
"node"
)
&&
!
psz_title
)
if
(
!
strcmp
(
psz_element
,
"node"
)
)
{
msg_Warn
(
p_demux
,
"<node> requires
\"
title
\"
attribute"
);
return
VLC_FALSE
;
}
free
(
psz_title
);
if
(
!
psz_title
)
{
msg_Warn
(
p_demux
,
"<node> requires
\"
title
\"
attribute"
);
return
VLC_FALSE
;
}
if
(
!
strcmp
(
psz_element
,
"extension"
)
)
p_new_input
=
input_ItemNewWithType
(
p_playlist
,
""
,
psz_title
,
0
,
NULL
,
-
1
,
ITEM_TYPE_DIRECTORY
);
if
(
p_new_input
)
{
input_ItemAddSubItem
(
p_input_item
,
p_new_input
);
p_input_item
=
p_new_input
;
}
free
(
psz_title
);
}
else
if
(
!
strcmp
(
psz_element
,
"extension"
)
)
{
if
(
!
psz_application
)
{
...
...
@@ -824,6 +834,7 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
*/
static
vlc_bool_t
parse_extitem_node
COMPLEX_INTERFACE
{
input_item_t
*
p_new_input
=
NULL
;
char
*
psz_name
=
NULL
;
char
*
psz_value
=
NULL
;
int
i_href
=
-
1
;
...
...
@@ -858,13 +869,17 @@ static vlc_bool_t parse_extitem_node COMPLEX_INTERFACE
return
VLC_FALSE
;
}
/* XXX: We can't check the validity of the 'href' attribute if we do parse
the extension before the TrackList
if
(
i_href
>
p_demux
->
p_sys
->
i_tracklist_entries
)
{
msg_Warn
(
p_demux
,
"invalid
\"
href
\"
attribute"
);
return
VLC_FALSE
;
}*/
}
p_new_input
=
p_demux
->
p_sys
->
pp_tracklist
[
i_href
];
if
(
p_new_input
)
{
input_ItemAddSubItem
(
p_input_item
,
p_new_input
);
}
/* fix for #1293 - XTAG sends ENDELEM for self closing tag */
/* (libxml sends NONE) */
...
...
modules/misc/playlist/xspf.c
View file @
890dbc22
...
...
@@ -73,16 +73,6 @@ int E_(xspf_export_playlist)( vlc_object_t *p_this )
free
(
psz_temp
);
}
/* export the tree structure in <extension> */
fprintf
(
p_export
->
p_file
,
"
\t
<extension application=
\"
http://www.videolan.org/vlc/playlist/0
\"
>
\n
"
);
i_count
=
0
;
for
(
i
=
0
;
i
<
p_node
->
i_children
;
i
++
)
{
xspf_extension_item
(
p_node
->
pp_children
[
i
],
p_export
->
p_file
,
&
i_count
);
}
fprintf
(
p_export
->
p_file
,
"
\t
</extension>
\n
"
);
/* export all items in a flat format */
fprintf
(
p_export
->
p_file
,
"
\t
<trackList>
\n
"
);
i_count
=
0
;
...
...
@@ -93,6 +83,16 @@ int E_(xspf_export_playlist)( vlc_object_t *p_this )
}
fprintf
(
p_export
->
p_file
,
"
\t
</trackList>
\n
"
);
/* export the tree structure in <extension> */
fprintf
(
p_export
->
p_file
,
"
\t
<extension application=
\"
http://www.videolan.org/vlc/playlist/0
\"
>
\n
"
);
i_count
=
0
;
for
(
i
=
0
;
i
<
p_node
->
i_children
;
i
++
)
{
xspf_extension_item
(
p_node
->
pp_children
[
i
],
p_export
->
p_file
,
&
i_count
);
}
fprintf
(
p_export
->
p_file
,
"
\t
</extension>
\n
"
);
/* close the header elements */
fprintf
(
p_export
->
p_file
,
"</playlist>
\n
"
);
...
...
src/playlist/loadsave.c
View file @
890dbc22
...
...
@@ -99,8 +99,11 @@ static void input_item_subitem_added( const vlc_event_t * p_event,
/* The media library input has one and only one option: "meta-file"
* So we remove that unneeded option. */
free
(
p_item
->
ppsz_options
[
0
]
);
p_item
->
i_options
=
0
;
if
(
p_item
->
i_options
==
1
)
{
free
(
p_item
->
ppsz_options
[
0
]
);
p_item
->
i_options
=
0
;
}
playlist_AddInput
(
p_playlist
,
p_item
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
VLC_FALSE
,
VLC_FALSE
);
...
...
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