Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
15172e68
Commit
15172e68
authored
Jul 27, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XML: simplify demuxers
parent
5330c52a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
68 deletions
+18
-68
modules/codec/subtitles/subsusf.c
modules/codec/subtitles/subsusf.c
+9
-16
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+1
-8
modules/demux/playlist/itml.c
modules/demux/playlist/itml.c
+2
-9
modules/demux/playlist/podcast.c
modules/demux/playlist/podcast.c
+2
-10
modules/demux/playlist/qtl.c
modules/demux/playlist/qtl.c
+2
-9
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+1
-8
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+1
-8
No files found.
modules/codec/subtitles/subsusf.c
View file @
15172e68
...
...
@@ -989,7 +989,6 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec,
static
void
ParseUSFHeader
(
decoder_t
*
p_dec
)
{
stream_t
*
p_sub
=
NULL
;
xml_t
*
p_xml
=
NULL
;
xml_reader_t
*
p_xml_reader
=
NULL
;
p_sub
=
stream_MemoryNew
(
VLC_OBJECT
(
p_dec
),
...
...
@@ -999,26 +998,20 @@ static void ParseUSFHeader( decoder_t *p_dec )
if
(
!
p_sub
)
return
;
p_xml
=
xml_Create
(
p_dec
);
if
(
p_xml
)
p_xml
_reader
=
xml_ReaderCreate
(
p_dec
,
p_sub
);
if
(
p_xml
_reader
)
{
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_sub
);
if
(
p_xml_reader
)
/* Look for Root Node */
if
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
{
/* Look for Root Node */
if
(
xml_ReaderRead
(
p_xml_reader
)
==
1
)
{
char
*
psz_node
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
strcasecmp
(
"usfsubtitles"
,
psz_node
)
)
ParseUSFHeaderTags
(
p_dec
,
p_xml_reader
);
char
*
psz_node
=
xml_ReaderName
(
p_xml_reader
);
free
(
psz_node
);
}
if
(
!
strcasecmp
(
"usfsubtitles"
,
psz_node
)
)
ParseUSFHeaderTags
(
p_dec
,
p_xml_reader
);
xml_ReaderDelete
(
p_xml_reader
);
free
(
psz_node
);
}
xml_
Delete
(
p_xml
);
xml_
ReaderDelete
(
p_xml_reader
);
}
stream_Delete
(
p_sub
);
}
...
...
modules/demux/playlist/b4s.c
View file @
15172e68
...
...
@@ -71,7 +71,6 @@ static int Demux( demux_t *p_demux )
{
int
i_ret
=
-
1
;
xml_t
*
p_xml
;
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_elname
=
NULL
;
input_item_t
*
p_input
;
...
...
@@ -81,15 +80,11 @@ static int Demux( demux_t *p_demux )
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
goto
end
;
psz_elname
=
stream_ReadLine
(
p_demux
->
s
);
free
(
psz_elname
);
psz_elname
=
NULL
;
p_xml_reader
=
xml_ReaderCreate
(
p_
xml
,
p_demux
->
s
);
p_xml_reader
=
xml_ReaderCreate
(
p_
demux
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
end
;
...
...
@@ -296,8 +291,6 @@ end:
vlc_gc_decref
(
p_current_input
);
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
return
i_ret
;
}
...
...
modules/demux/playlist/itml.c
View file @
15172e68
...
...
@@ -67,19 +67,14 @@ void Close_iTML( vlc_object_t *p_this )
*/
int
Demux
(
demux_t
*
p_demux
)
{
xml_t
*
p_xml
;
xml_reader_t
*
p_xml_reader
=
NULL
;
xml_reader_t
*
p_xml_reader
;
char
*
psz_name
=
NULL
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
p_demux
->
p_sys
->
i_ntracks
=
0
;
/* create new xml parser from stream */
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
goto
end
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
p_xml_reader
=
xml_ReaderCreate
(
p_demux
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
end
;
...
...
@@ -114,8 +109,6 @@ end:
free
(
psz_name
);
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
/* Needed for correct operation of go back */
return
0
;
...
...
modules/demux/playlist/podcast.c
View file @
15172e68
...
...
@@ -73,8 +73,7 @@ static int Demux( demux_t *p_demux )
bool
b_image
=
false
;
int
i_ret
;
xml_t
*
p_xml
;
xml_reader_t
*
p_xml_reader
=
NULL
;
xml_reader_t
*
p_xml_reader
;
char
*
psz_elname
=
NULL
;
char
*
psz_item_mrl
=
NULL
;
char
*
psz_item_size
=
NULL
;
...
...
@@ -94,11 +93,7 @@ static int Demux( demux_t *p_demux )
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
goto
error
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
p_xml_reader
=
xml_ReaderCreate
(
p_demux
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
error
;
...
...
@@ -366,7 +361,6 @@ static int Demux( demux_t *p_demux )
free
(
psz_art_url
);
free
(
psz_elname
);
xml_ReaderDelete
(
p_xml_reader
);
xml_Delete
(
p_xml
);
input_item_node_PostAndDelete
(
p_subitems
);
vlc_gc_decref
(
p_current_input
);
...
...
@@ -389,8 +383,6 @@ error:
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
if
(
p_subitems
)
input_item_node_Delete
(
p_subitems
);
...
...
modules/demux/playlist/qtl.c
View file @
15172e68
...
...
@@ -102,8 +102,7 @@ void Close_QTL( vlc_object_t *p_this )
static
int
Demux
(
demux_t
*
p_demux
)
{
xml_t
*
p_xml
;
xml_reader_t
*
p_xml_reader
=
NULL
;
xml_reader_t
*
p_xml_reader
;
char
*
psz_eltname
=
NULL
;
input_item_t
*
p_input
;
int
i_ret
=
-
1
;
...
...
@@ -126,11 +125,7 @@ static int Demux( demux_t *p_demux )
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
goto
error
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
p_xml_reader
=
xml_ReaderCreate
(
p_demux
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
error
;
...
...
@@ -326,8 +321,6 @@ static int Demux( demux_t *p_demux )
error:
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
vlc_gc_decref
(
p_current_input
);
...
...
modules/demux/playlist/shoutcast.c
View file @
15172e68
...
...
@@ -79,18 +79,13 @@ void Close_Shoutcast( vlc_object_t *p_this )
static
int
Demux
(
demux_t
*
p_demux
)
{
xml_t
*
p_xml
;
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_eltname
=
NULL
;
int
i_ret
=
-
1
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
input_item_node_t
*
p_input_node
=
NULL
;
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
goto
error
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
p_xml_reader
=
xml_ReaderCreate
(
p_demux
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
error
;
...
...
@@ -135,8 +130,6 @@ static int Demux( demux_t *p_demux )
error:
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
free
(
psz_eltname
);
if
(
p_input_node
)
input_item_node_Delete
(
p_input_node
);
vlc_gc_decref
(
p_current_input
);
...
...
modules/demux/playlist/xspf.c
View file @
15172e68
...
...
@@ -80,7 +80,6 @@ void Close_xspf( vlc_object_t *p_this )
int
Demux
(
demux_t
*
p_demux
)
{
int
i_ret
=
-
1
;
xml_t
*
p_xml
=
NULL
;
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_name
=
NULL
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
...
...
@@ -90,11 +89,7 @@ int Demux( demux_t *p_demux )
p_demux
->
p_sys
->
psz_base
=
NULL
;
/* create new xml parser from stream */
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
goto
end
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_demux
->
s
);
p_xml_reader
=
xml_ReaderCreate
(
p_demux
,
p_demux
->
s
);
if
(
!
p_xml_reader
)
goto
end
;
...
...
@@ -139,8 +134,6 @@ end:
vlc_gc_decref
(
p_current_input
);
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml_reader
);
if
(
p_xml
)
xml_Delete
(
p_xml
);
return
i_ret
;
/* Needed for correct operation of go back */
}
...
...
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