diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-11-15 19:58:55 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-11-15 19:58:55 +0100 |
commit | baf5478c14aee2b7e8e6dcb300ced8a45dbdd956 (patch) | |
tree | d89e93de44167a86d2ce81c3cc70970e56246736 /nihav-core/src/frame.rs | |
parent | a65bdeac0942ef46830e4471f62075838851ffec (diff) | |
download | nihav-baf5478c14aee2b7e8e6dcb300ced8a45dbdd956.tar.gz |
core: improve interaction with stream type
Diffstat (limited to 'nihav-core/src/frame.rs')
-rw-r--r-- | nihav-core/src/frame.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs index ae61c88..25c3856 100644 --- a/nihav-core/src/frame.rs +++ b/nihav-core/src/frame.rs @@ -771,7 +771,7 @@ impl fmt::Display for NAFrame { } /// Possible stream types. -#[derive(Debug,Clone,Copy)] +#[derive(Debug,Clone,Copy,PartialEq)] #[allow(dead_code)] pub enum StreamType { /// video stream @@ -832,6 +832,7 @@ impl NAStream { NAStream { media_type: mt, id, num: 0, info: info.into_ref(), tb_num: n, tb_den: d } } pub fn get_id(&self) -> u32 { self.id } + pub fn get_media_type(&self) -> StreamType { self.media_type } pub fn get_num(&self) -> usize { self.num } pub fn set_num(&mut self, num: usize) { self.num = num; } pub fn get_info(&self) -> NACodecInfoRef { self.info.clone() } |