diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-10-04 12:48:59 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-10-04 12:48:59 +0200 |
commit | a4c97adf7538932f55d9af134a88db6950157833 (patch) | |
tree | e38c9749442be268b995e0308c406c7bef96acce | |
parent | ad8d992fda91522c4488be832e3461444669fb8f (diff) | |
download | nihav-tool-a4c97adf7538932f55d9af134a88db6950157833.tar.gz |
print duration if available
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<u32> = Vec::new(); let mut writers: Vec<Outputter> = 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(); |