From 8de1ab1c18e6be051132e2bfe6a6d78b3f8c7dbb Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 4 Jan 2024 21:21:14 +0100 Subject: recursive import --- matroska/src/bin/mkvdump.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'matroska') diff --git a/matroska/src/bin/mkvdump.rs b/matroska/src/bin/mkvdump.rs index 4db1223..0070a72 100644 --- a/matroska/src/bin/mkvdump.rs +++ b/matroska/src/bin/mkvdump.rs @@ -3,7 +3,9 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2023 metamuffin */ -use jellymatroska::{matroska::MatroskaTag, read::EbmlReader, unflatten::IterWithPos}; +use jellymatroska::{ + block::Block, matroska::MatroskaTag, read::EbmlReader, unflatten::IterWithPos, +}; use std::{fs::File, io::BufReader}; fn main() { @@ -14,8 +16,10 @@ fn main() { while let Some(tag) = r.next() { let tag = tag.unwrap(); match tag { - MatroskaTag::SimpleBlock(_) => (), // println!("{} SimpleBlock", r.position), - MatroskaTag::Block(_) => (), // println!("{} Block", r.position), + MatroskaTag::SimpleBlock(b) | MatroskaTag::Block(b) => { + let b = Block::parse(&b).unwrap(); + eprintln!("block kf={} ts_off={}", b.keyframe, b.timestamp_off) + } _ => println!("{} {tag:?}", r.position), } } -- cgit v1.2.3-70-g09d2