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
e7228cea
Commit
e7228cea
authored
May 24, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: code factorization on Tag parsing
parent
a11cf154
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
49 deletions
+19
-49
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+19
-49
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
e7228cea
...
@@ -196,13 +196,22 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
...
@@ -196,13 +196,22 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
msg_Dbg
(
&
sys
.
demuxer
,
"| - loading cues done."
);
msg_Dbg
(
&
sys
.
demuxer
,
"| - loading cues done."
);
}
}
#define PARSE_TAG( type ) \
do { \
msg_Dbg( &sys.demuxer, "| + " type ); \
ep->Down(); \
while( ( el = ep->Get() ) != NULL ) \
{ \
msg_Dbg( &sys.demuxer, "| | + Unknown (%s)", typeid( *el ).name() ); \
} \
ep->Up(); } while( 0 )
void
matroska_segment_c
::
LoadTags
(
KaxTags
*
tags
)
void
matroska_segment_c
::
LoadTags
(
KaxTags
*
tags
)
{
{
EbmlParser
*
ep
;
EbmlElement
*
el
;
/* Master elements */
/* Master elements */
ep
=
new
EbmlParser
(
&
es
,
tags
,
&
sys
.
demuxer
);
EbmlParser
*
ep
=
new
EbmlParser
(
&
es
,
tags
,
&
sys
.
demuxer
);
EbmlElement
*
el
;
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
{
...
@@ -213,55 +222,15 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
...
@@ -213,55 +222,15 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
{
if
(
MKV_IS_ID
(
el
,
KaxTagTargets
)
)
if
(
MKV_IS_ID
(
el
,
KaxTagTargets
)
)
{
PARSE_TAG
(
"Targets"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + Targets"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
else
if
(
MKV_IS_ID
(
el
,
KaxTagGeneral
)
)
else
if
(
MKV_IS_ID
(
el
,
KaxTagGeneral
)
)
{
PARSE_TAG
(
"General"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + General"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
else
if
(
MKV_IS_ID
(
el
,
KaxTagGenres
)
)
else
if
(
MKV_IS_ID
(
el
,
KaxTagGenres
)
)
{
PARSE_TAG
(
"Genres"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + Genres"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
else
if
(
MKV_IS_ID
(
el
,
KaxTagAudioSpecific
)
)
else
if
(
MKV_IS_ID
(
el
,
KaxTagAudioSpecific
)
)
{
PARSE_TAG
(
"Audio Specific"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + Audio Specific"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
else
if
(
MKV_IS_ID
(
el
,
KaxTagImageSpecific
)
)
else
if
(
MKV_IS_ID
(
el
,
KaxTagImageSpecific
)
)
{
PARSE_TAG
(
"Images Specific"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + Images Specific"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
else
if
(
MKV_IS_ID
(
el
,
KaxTagMultiComment
)
)
else
if
(
MKV_IS_ID
(
el
,
KaxTagMultiComment
)
)
{
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Multi Comment"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + Multi Comment"
);
...
@@ -306,6 +275,7 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
...
@@ -306,6 +275,7 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
msg_Dbg
(
&
sys
.
demuxer
,
"loading tags done."
);
msg_Dbg
(
&
sys
.
demuxer
,
"loading tags done."
);
}
}
#undef PARSE_TAG
/*****************************************************************************
/*****************************************************************************
* InformationCreate:
* InformationCreate:
...
...
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