mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 20:01:53 +00:00
Dump unknown elements recursively.
This commit is contained in:
parent
d2927e24d4
commit
2f8a292f57
@ -1,3 +1,7 @@
|
|||||||
|
2003-10-18 Moritz Bunkus <moritz@bunkus.org>
|
||||||
|
|
||||||
|
* mkvinfo: new feature: Dump unknown elements recursively.
|
||||||
|
|
||||||
2003-10-15 Moritz Bunkus <moritz@bunkus.org>
|
2003-10-15 Moritz Bunkus <moritz@bunkus.org>
|
||||||
|
|
||||||
* mkvmerge: bug fix: Made the SRT reader more tolerant regarding
|
* mkvmerge: bug fix: Made the SRT reader more tolerant regarding
|
||||||
|
@ -156,11 +156,20 @@ void show_error(const char *fmt, ...) {
|
|||||||
mxinfo("(%s) %s\n", NAME, args_buffer);
|
mxinfo("(%s) %s\n", NAME, args_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define show_warning(l, f, args...) _show_element(NULL, NULL, false, l, f, \
|
||||||
|
## args)
|
||||||
|
#define show_unknown_element(e, l) \
|
||||||
|
_show_element(e, es, true, l, "Unknown element: %s", e->Generic().DebugName)
|
||||||
|
#define show_element(e, l, s, args...) _show_element(e, es, false, l, s, \
|
||||||
|
## args)
|
||||||
|
|
||||||
void _show_element(EbmlElement *l, EbmlStream *es, bool skip, int level,
|
void _show_element(EbmlElement *l, EbmlStream *es, bool skip, int level,
|
||||||
const char *fmt, ...) {
|
const char *fmt, ...) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char level_buffer[10];
|
char level_buffer[10];
|
||||||
string new_fmt;
|
string new_fmt;
|
||||||
|
EbmlMaster *m;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (level > 9)
|
if (level > 9)
|
||||||
die("mkvinfo.cpp/show_element(): level > 9: %d", level);
|
die("mkvinfo.cpp/show_element(): level > 9: %d", level);
|
||||||
@ -189,17 +198,16 @@ void _show_element(EbmlElement *l, EbmlStream *es, bool skip, int level,
|
|||||||
}
|
}
|
||||||
#endif // HAVE_WXWINDOWS
|
#endif // HAVE_WXWINDOWS
|
||||||
|
|
||||||
if ((l != NULL) && skip)
|
if ((l != NULL) && skip) {
|
||||||
|
// Dump unknown elements recursively.
|
||||||
|
m = dynamic_cast<EbmlMaster *>(l);
|
||||||
|
if (m != NULL)
|
||||||
|
for (i = 0; i < m->ListSize(); i++)
|
||||||
|
show_unknown_element((*m)[i], level + 1);
|
||||||
l->SkipData(*es, l->Generic().Context);
|
l->SkipData(*es, l->Generic().Context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define show_warning(l, f, args...) _show_element(NULL, NULL, false, l, f, \
|
|
||||||
## args)
|
|
||||||
#define show_unknown_element(e, l) \
|
|
||||||
_show_element(e, es, true, l, "Unknown element: %s", e->Generic().DebugName)
|
|
||||||
#define show_element(e, l, s, args...) _show_element(e, es, false, l, s, \
|
|
||||||
## args)
|
|
||||||
|
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
// {{{ FUNCTION parse_args
|
// {{{ FUNCTION parse_args
|
||||||
|
Loading…
Reference in New Issue
Block a user