From baf5478c14aee2b7e8e6dcb300ced8a45dbdd956 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 15 Nov 2019 19:58:55 +0100 Subject: [PATCH] core: improve interaction with stream type --- nihav-core/src/frame.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() } -- 2.39.5