/* This file is part of jellything (https://codeberg.org/metamuffin/jellything) 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 std::{fs::File, io::BufReader}; fn main() -> anyhow::Result<()> { env_logger::init_from_env("LOG"); let path = std::env::args().skip(1).next().unwrap(); let mut r = EbmlReader::new(BufReader::new(File::open(path)?)); while let Some(tag) = r.next() { let tag = tag?; match tag { MatroskaTag::SimpleBlock(_) => (), // println!("{} SimpleBlock", r.position), MatroskaTag::Block(_) => (), // println!("{} Block", r.position), _ => println!("{} {tag:?}", r.position), } } Ok(()) }