diff options
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/impl.rs | 11 | ||||
-rw-r--r-- | common/src/lib.rs | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/common/src/impl.rs b/common/src/impl.rs index 009b7c7..25cc47d 100644 --- a/common/src/impl.rs +++ b/common/src/impl.rs @@ -27,14 +27,19 @@ impl AssetRole { impl std::fmt::Display for SourceTrack { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let kspec = match &self.kind { - SourceTrackKind::Video { width, height, fps } => { - format!("Video: {width}x{height} {fps}fps ") + SourceTrackKind::Video { + width, height, fps, .. + } => { + format!("Video: {width}x{height} {}fps ", fps.unwrap_or(0.)) } SourceTrackKind::Audio { channels, sample_rate, bit_depth, - } => format!("Audio: {channels}ch {sample_rate}Hz {bit_depth}bits "), + } => format!( + "Audio: {channels}ch {sample_rate}Hz {}bits ", + bit_depth.unwrap_or(0) + ), SourceTrackKind::Subtitles => "Subtitles: ".to_string(), }; f.write_fmt(format_args!( diff --git a/common/src/lib.rs b/common/src/lib.rs index 56d0d2e..8878edc 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -224,12 +224,14 @@ pub enum SourceTrackKind { Video { width: u64, height: u64, - fps: f64, + display_width: Option<u64>, + display_height: Option<u64>, + fps: Option<f64>, }, Audio { channels: usize, sample_rate: f64, - bit_depth: usize, + bit_depth: Option<usize>, }, Subtitles, } |