From: Kostya Shishkov Date: Sun, 4 Oct 2020 10:48:59 +0000 (+0200) Subject: print duration if available X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=a4c97adf7538932f55d9af134a88db6950157833;p=nihav-tool.git print duration if available --- diff --git a/src/main.rs b/src/main.rs index cbd17d3..c6875fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -197,6 +197,13 @@ println!(" seek error {:?}", ret.err().unwrap()); let mut sids: Vec = Vec::new(); let mut writers: Vec = Vec::new(); let dec_opts = [NAOption{name: FRAME_SKIP_OPTION, value: NAValue::String(smode.to_string())}]; + let duration = dmx.get_duration(); + if duration != 0 { + let s = duration / 1000; + let m = s / 60; + let h = m / 60; + println!(" total duration {}:{:02}:{:02}.{}", h, m % 60, s % 60, (duration / 100) % 10); + } for i in 0..dmx.get_num_streams() { let s = dmx.get_stream(i).unwrap(); let info = s.get_info();