mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
Added some meta information as a third verbosity level. This episode features frame types and timecode on one line.
This commit is contained in:
parent
36ff48dc52
commit
bf83058489
@ -44,6 +44,13 @@ the seek head entries and the cue entries.
|
||||
level 2
|
||||
will also print the seek head entries, the cue entries and the file position
|
||||
at which each Matroska element can be found at.
|
||||
.TP
|
||||
level 3
|
||||
will print some information that is not directly connected to a Matroska
|
||||
element. All other elements only print stuff about the elements that were
|
||||
just found. Level 3 adds meta information to ease debugging (read: it's
|
||||
intended for developpers only). All lines written by level 3 are enclosed
|
||||
in square brackets to make filtering them out easy.
|
||||
.LP
|
||||
.SH AUTHOR
|
||||
.I mkvinfo
|
||||
|
@ -318,9 +318,10 @@ bool process_file(const char *file_name) {
|
||||
EbmlElement *l5 = NULL, *l6 = NULL, *l7 = NULL;
|
||||
EbmlStream *es;
|
||||
KaxCluster *cluster;
|
||||
uint64_t cluster_tc, tc_scale = TIMECODE_SCALE, file_size;
|
||||
uint64_t cluster_tc, tc_scale = TIMECODE_SCALE, file_size, lf_timecode;
|
||||
int lf_tnum;
|
||||
char mkv_track_type;
|
||||
bool ms_compat;
|
||||
bool ms_compat, bref_found, fref_found;
|
||||
char *str;
|
||||
string strc;
|
||||
mm_io_c *in;
|
||||
@ -947,6 +948,9 @@ bool process_file(const char *file_name) {
|
||||
} else if (EbmlId(*l2) == KaxBlockGroup::ClassInfos.GlobalId) {
|
||||
show_element(l2, 2, "Block group");
|
||||
|
||||
bref_found = false;
|
||||
fref_found = false;
|
||||
|
||||
upper_lvl_el = 0;
|
||||
l3 = es->FindNextElement(l2->Generic().Context, upper_lvl_el,
|
||||
0xFFFFFFFFL, false, 1);
|
||||
@ -964,6 +968,8 @@ bool process_file(const char *file_name) {
|
||||
"timecode %.3fs)", block.TrackNum(),
|
||||
block.NumberFrames(),
|
||||
(float)block.GlobalTimecode() / 1000000000.0);
|
||||
lf_timecode = block.GlobalTimecode() / 1000000;
|
||||
lf_tnum = block.TrackNum();
|
||||
for (i = 0; i < (int)block.NumberFrames(); i++) {
|
||||
DataBuffer &data = block.GetBuffer(i);
|
||||
show_element(NULL, 4, "Frame with size %u", data.Size());
|
||||
@ -984,6 +990,10 @@ bool process_file(const char *file_name) {
|
||||
reference.ReadData(es->I_O());
|
||||
show_element(l3, 3, "Reference block: %.3fms",
|
||||
((float)int64(reference)) * tc_scale / 1000000.0);
|
||||
if (int64(reference) < 0)
|
||||
bref_found = true;
|
||||
else if (int64(reference) > 0)
|
||||
fref_found = true;
|
||||
|
||||
} else if (EbmlId(*l3) ==
|
||||
KaxReferencePriority::ClassInfos.GlobalId) {
|
||||
@ -1113,6 +1123,12 @@ bool process_file(const char *file_name) {
|
||||
|
||||
} // while (l3 != NULL)
|
||||
|
||||
if (verbose > 2)
|
||||
show_element(NULL, 2, "[%c frame for track %u, timecode %u]",
|
||||
bref_found && fref_found ? 'B' :
|
||||
bref_found ? 'P' : !fref_found ? 'I' : '?',
|
||||
lf_tnum, lf_timecode);
|
||||
|
||||
} else if (!is_ebmlvoid(l2, 2, upper_lvl_el))
|
||||
show_unknown_element(l2, 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user