diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-06-01 11:52:15 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-06-01 11:52:15 +0200 |
commit | 7d57ae2f680d7a1eba7af2ee831f305b2f0f9324 (patch) | |
tree | 53180ca6dd3638082bc2ce1f68bcd22f24871741 /nihav-realmedia | |
parent | 20766f15236404c4eb336229d4a9d202d107bb99 (diff) | |
download | nihav-7d57ae2f680d7a1eba7af2ee831f305b2f0f9324.tar.gz |
introduce option handling for decoders
Diffstat (limited to 'nihav-realmedia')
-rw-r--r-- | nihav-realmedia/src/codecs/cook.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/ra144.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/ra288.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/ralf.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/rv10.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/rv20.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/rv30.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/rv40.rs | 6 | ||||
-rw-r--r-- | nihav-realmedia/src/codecs/rv60.rs | 7 |
9 files changed, 55 insertions, 0 deletions
diff --git a/nihav-realmedia/src/codecs/cook.rs b/nihav-realmedia/src/codecs/cook.rs index 448ccae..b4e2ea9 100644 --- a/nihav-realmedia/src/codecs/cook.rs +++ b/nihav-realmedia/src/codecs/cook.rs @@ -676,6 +676,12 @@ impl NADecoder for CookDecoder { } } +impl NAOptionHandler for CookDecoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(CookDecoder::new()) } diff --git a/nihav-realmedia/src/codecs/ra144.rs b/nihav-realmedia/src/codecs/ra144.rs index abb7f38..31f2c01 100644 --- a/nihav-realmedia/src/codecs/ra144.rs +++ b/nihav-realmedia/src/codecs/ra144.rs @@ -311,6 +311,12 @@ impl NADecoder for RA144Decoder { } } +impl NAOptionHandler for RA144Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RA144Decoder::new()) } diff --git a/nihav-realmedia/src/codecs/ra288.rs b/nihav-realmedia/src/codecs/ra288.rs index dc4add3..1d98331 100644 --- a/nihav-realmedia/src/codecs/ra288.rs +++ b/nihav-realmedia/src/codecs/ra288.rs @@ -201,6 +201,12 @@ impl NADecoder for RA288Decoder { } } +impl NAOptionHandler for RA288Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RA288Decoder::new()) } diff --git a/nihav-realmedia/src/codecs/ralf.rs b/nihav-realmedia/src/codecs/ralf.rs index dd8b698..56af967 100644 --- a/nihav-realmedia/src/codecs/ralf.rs +++ b/nihav-realmedia/src/codecs/ralf.rs @@ -471,6 +471,12 @@ impl NADecoder for RALFDecoder { } } +impl NAOptionHandler for RALFDecoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RALFDecoder::new()) } diff --git a/nihav-realmedia/src/codecs/rv10.rs b/nihav-realmedia/src/codecs/rv10.rs index f5e0c8d..e729b0d 100644 --- a/nihav-realmedia/src/codecs/rv10.rs +++ b/nihav-realmedia/src/codecs/rv10.rs @@ -460,6 +460,12 @@ impl NADecoder for RealVideo10Decoder { } } +impl NAOptionHandler for RealVideo10Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RealVideo10Decoder::new()) diff --git a/nihav-realmedia/src/codecs/rv20.rs b/nihav-realmedia/src/codecs/rv20.rs index 3b8e441..39254db 100644 --- a/nihav-realmedia/src/codecs/rv20.rs +++ b/nihav-realmedia/src/codecs/rv20.rs @@ -667,6 +667,12 @@ impl NADecoder for RealVideo20Decoder { } } +impl NAOptionHandler for RealVideo20Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + struct MBB { blocks: usize, bits: u8 } const H263_MBB: &[MBB; 7] = &[ MBB{ blocks: 47, bits: 6 }, diff --git a/nihav-realmedia/src/codecs/rv30.rs b/nihav-realmedia/src/codecs/rv30.rs index 81021d4..1827980 100644 --- a/nihav-realmedia/src/codecs/rv30.rs +++ b/nihav-realmedia/src/codecs/rv30.rs @@ -165,6 +165,12 @@ println!("???"); } } +impl NAOptionHandler for RealVideo30Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RealVideo30Decoder::new()) } diff --git a/nihav-realmedia/src/codecs/rv40.rs b/nihav-realmedia/src/codecs/rv40.rs index 91f6e78..95e2325 100644 --- a/nihav-realmedia/src/codecs/rv40.rs +++ b/nihav-realmedia/src/codecs/rv40.rs @@ -358,6 +358,12 @@ println!("???"); } } +impl NAOptionHandler for RealVideo40Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RealVideo40Decoder::new()) } diff --git a/nihav-realmedia/src/codecs/rv60.rs b/nihav-realmedia/src/codecs/rv60.rs index 45322b5..a32bba1 100644 --- a/nihav-realmedia/src/codecs/rv60.rs +++ b/nihav-realmedia/src/codecs/rv60.rs @@ -1,6 +1,7 @@ use nihav_core::formats::YUV420_FORMAT; use nihav_core::frame::*; use nihav_core::codecs::{NADecoder, NADecoderSupport, DecoderError, DecoderResult}; +use nihav_core::options::*; use nihav_codec_support::codecs::{MV, ZERO_MV, IPBShuffler}; use nihav_core::io::byteio::{MemoryReader,ByteReader}; use nihav_core::io::bitreader::{BitReader,BitReaderMode}; @@ -1521,6 +1522,12 @@ println!("???"); } } +impl NAOptionHandler for RealVideo60Decoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option<NAValue> { None } +} + pub fn get_decoder() -> Box<dyn NADecoder + Send> { Box::new(RealVideo60Decoder::new()) } |