From a4c97adf7538932f55d9af134a88db6950157833 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 4 Oct 2020 12:48:59 +0200 Subject: [PATCH] print duration if available --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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(); -- 2.39.5