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
Hide 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 )
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
)
{
EbmlParser
*
ep
;
EbmlElement
*
el
;
/* Master elements */
ep
=
new
EbmlParser
(
&
es
,
tags
,
&
sys
.
demuxer
);
EbmlParser
*
ep
=
new
EbmlParser
(
&
es
,
tags
,
&
sys
.
demuxer
);
EbmlElement
*
el
;
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
...
...
@@ -213,55 +222,15 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
if
(
MKV_IS_ID
(
el
,
KaxTagTargets
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Targets"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
PARSE_TAG
(
"Targets"
);
else
if
(
MKV_IS_ID
(
el
,
KaxTagGeneral
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + General"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
PARSE_TAG
(
"General"
);
else
if
(
MKV_IS_ID
(
el
,
KaxTagGenres
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Genres"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
PARSE_TAG
(
"Genres"
);
else
if
(
MKV_IS_ID
(
el
,
KaxTagAudioSpecific
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Audio Specific"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
PARSE_TAG
(
"Audio Specific"
);
else
if
(
MKV_IS_ID
(
el
,
KaxTagImageSpecific
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Images Specific"
);
ep
->
Down
();
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
}
ep
->
Up
();
}
PARSE_TAG
(
"Images Specific"
);
else
if
(
MKV_IS_ID
(
el
,
KaxTagMultiComment
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Multi Comment"
);
...
...
@@ -306,6 +275,7 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
msg_Dbg
(
&
sys
.
demuxer
,
"loading tags done."
);
}
#undef PARSE_TAG
/*****************************************************************************
* 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