introduce option handling for decoders
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 1 Jun 2020 09:52:15 +0000 (11:52 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 1 Jun 2020 09:52:15 +0000 (11:52 +0200)
50 files changed:
nihav-commonfmt/src/codecs/aac.rs
nihav-commonfmt/src/codecs/atrac3.rs
nihav-commonfmt/src/codecs/cinepak.rs
nihav-commonfmt/src/codecs/clearvideo.rs
nihav-commonfmt/src/codecs/pcm.rs
nihav-commonfmt/src/codecs/sipro.rs
nihav-commonfmt/src/codecs/ts102366.rs
nihav-core/src/codecs/mod.rs
nihav-duck/src/codecs/dkadpcm.rs
nihav-duck/src/codecs/on2avc.rs
nihav-duck/src/codecs/truemotion1.rs
nihav-duck/src/codecs/truemotion2.rs
nihav-duck/src/codecs/truemotion2x.rs
nihav-duck/src/codecs/truemotionrt.rs
nihav-duck/src/codecs/vp3.rs
nihav-duck/src/codecs/vp5.rs
nihav-duck/src/codecs/vp6.rs
nihav-duck/src/codecs/vp7.rs
nihav-game/src/codecs/bmv.rs
nihav-game/src/codecs/bmv3.rs
nihav-game/src/codecs/gremlinvideo.rs
nihav-game/src/codecs/lhst500f22.rs
nihav-game/src/codecs/midivid.rs
nihav-game/src/codecs/midivid3.rs
nihav-game/src/codecs/vmd.rs
nihav-indeo/src/codecs/imc.rs
nihav-indeo/src/codecs/indeo2.rs
nihav-indeo/src/codecs/indeo3.rs
nihav-indeo/src/codecs/indeo4.rs
nihav-indeo/src/codecs/indeo5.rs
nihav-indeo/src/codecs/intel263.rs
nihav-ms/src/codecs/imaadpcm.rs
nihav-ms/src/codecs/msadpcm.rs
nihav-ms/src/codecs/msvideo1.rs
nihav-rad/src/codecs/bink2.rs
nihav-rad/src/codecs/binkaud.rs
nihav-rad/src/codecs/binkvid.rs
nihav-rad/src/codecs/smacker.rs
nihav-realmedia/src/codecs/cook.rs
nihav-realmedia/src/codecs/ra144.rs
nihav-realmedia/src/codecs/ra288.rs
nihav-realmedia/src/codecs/ralf.rs
nihav-realmedia/src/codecs/rv10.rs
nihav-realmedia/src/codecs/rv20.rs
nihav-realmedia/src/codecs/rv30.rs
nihav-realmedia/src/codecs/rv40.rs
nihav-realmedia/src/codecs/rv60.rs
nihav-vivo/src/codecs/g723_1.rs
nihav-vivo/src/codecs/siren.rs
nihav-vivo/src/codecs/vivo.rs

index 6de5a963e0ec2d8fc0269866b0ceac4f5ba17e08..0c65d50b1576020c7dcd259dab7c92445de4fee9 100644 (file)
@@ -1258,6 +1258,12 @@ impl NADecoder for AACDecoder {
     }
 }
 
+impl NAOptionHandler for AACDecoder {
+    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(AACDecoder::new())
 }
index 44f49f75290d28f9ee041dc68b2f5e94d934f3b6..b74c5339149d9e0d00a9f84cb1972a752d1b9c0c 100644 (file)
@@ -695,6 +695,12 @@ impl NADecoder for Atrac3Decoder {
     }
 }
 
+impl NAOptionHandler for Atrac3Decoder {
+    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(Atrac3Decoder::new())
 }
index b3e1b18e266bd2c152716adf021498181e5c2c55..5f03e14f55f9a74af61772b6f8de5ac9a99392e7 100644 (file)
@@ -380,6 +380,12 @@ impl NADecoder for CinepakDecoder {
     }
 }
 
+impl NAOptionHandler for CinepakDecoder {
+    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(CinepakDecoder::new())
 }
index 4236ae0c83180400d2191ea6dfe97f15a32411e9..3d0f7bc09f2543292c0e2057a4f31ad5533f50af 100644 (file)
@@ -707,6 +707,12 @@ impl NADecoder for ClearVideoDecoder {
     }
 }
 
+impl NAOptionHandler for ClearVideoDecoder {
+    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(ClearVideoDecoder::new(false))
 }
index 13eee09f9be01d6161b3dd0afe85af8a99befac5..b4ded8746bccb11a8f63e392b18bc6f7af40a8de 100644 (file)
@@ -60,6 +60,12 @@ impl NADecoder for PCMDecoder {
     }
 }
 
+impl NAOptionHandler for PCMDecoder {
+    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(PCMDecoder::new())
 }
index f52fa313c3b4e44ce6deb7f5d5347cf8b43db4ab..03cd7627c43616de6aab3a90ff1df2f1d6d2941c 100644 (file)
@@ -736,6 +736,12 @@ impl NADecoder for SiproDecoder {
     }
 }
 
+impl NAOptionHandler for SiproDecoder {
+    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(SiproDecoder::new())
 }
index 4f270cc56ad1323df0f31d45f92baabd8d7f56a3..25f342b5a7d85ca6f6a96272893d40049d0b6aac 100644 (file)
@@ -1240,6 +1240,12 @@ impl NADecoder for AudioDecoder {
     }
 }
 
+impl NAOptionHandler for AudioDecoder {
+    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(AudioDecoder::new())
 }
index 86441e6031ef20dfe118cff8069e98ca8159b11f..516d9ace408bbc60eabc127b1e5eca6502e08749 100644 (file)
@@ -77,7 +77,7 @@ impl Default for NADecoderSupport {
 }
 
 /// Decoder trait.
-pub trait NADecoder {
+pub trait NADecoder: NAOptionHandler {
     /// Initialises the decoder.
     ///
     /// It takes [`NADecoderSupport`] allocated by the caller and `NACodecInfoRef` provided by demuxer.
index 65576e835e28b45059b2f504fe829e2b22653792..be128db06c3c1cbfdcbb5270f10a5b0fec7a227b 100644 (file)
@@ -140,6 +140,12 @@ impl NADecoder for DuckADPCMDecoder {
     }
 }
 
+impl NAOptionHandler for DuckADPCMDecoder {
+    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_dk3() -> Box<dyn NADecoder + Send> {
     Box::new(DuckADPCMDecoder::new(true))
 }
index f3e757d1dbc024dfa267969023b13fa9ed7e79ca..2cd7a8802a190ac7b9a7fe4c65eb7913898767d9 100644 (file)
@@ -1048,6 +1048,12 @@ impl NADecoder for AVCDecoder {
     }
 }
 
+impl NAOptionHandler for AVCDecoder {
+    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_500() -> Box<dyn NADecoder + Send> {
     Box::new(AVCDecoder::new(500))
 }
index 29d85ace3c1194fa822a42d73c097be1e527aa08..b95b410f35b40449842cfc1dc0ffe8d640062192 100644 (file)
@@ -659,6 +659,12 @@ impl NADecoder for TM1Decoder {
     }
 }
 
+impl NAOptionHandler for TM1Decoder {
+    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(TM1Decoder::new())
 }
index 8be4561b952cc4ebb782fd490101e29e29a3b1c1..d0ef79361d7326d04e37fdf12f109cec846628d5 100644 (file)
@@ -581,6 +581,12 @@ impl NADecoder for TM2Decoder {
     }
 }
 
+impl NAOptionHandler for TM2Decoder {
+    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(TM2Decoder::new())
 }
index 586c26e0a6b1fee46492b85c0d00b660e1be3060..e2325ab1880d4e3815033e3ab817da89354c01a3 100644 (file)
@@ -692,6 +692,12 @@ impl NADecoder for TM2XDecoder {
     }
 }
 
+impl NAOptionHandler for TM2XDecoder {
+    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(TM2XDecoder::new())
 }
index 1bbcb0fd4dd8743f62dd9967e74335ff6cc84b76..554715fbd6529bf76836652919e44a5c6533128e 100644 (file)
@@ -84,6 +84,12 @@ impl NADecoder for TMRTDecoder {
     }
 }
 
+impl NAOptionHandler for TMRTDecoder {
+    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(TMRTDecoder::new())
 }
index c33f97b7aca2c3d99b2ebdf0a7b6efa846beef9f..e456cfa9fb55f656c4504a11f17633ad5230475d 100644 (file)
@@ -1864,6 +1864,12 @@ impl NADecoder for VP34Decoder {
     }
 }
 
+impl NAOptionHandler for VP34Decoder {
+    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_vp3() -> Box<NADecoder + Send> {
     Box::new(VP34Decoder::new(3))
 }
index eb394687fcb5978589426b4a2670372b87b46512..179227adb4d64464176e537e106ac9f52bd01c6a 100644 (file)
@@ -278,6 +278,12 @@ impl NADecoder for VP5Decoder {
     }
 }
 
+impl NAOptionHandler for VP5Decoder {
+    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<NADecoder + Send> {
     Box::new(VP5Decoder::new())
 }
index 241a13a72ef947b3e76874de7bdb647f92026ad3..4f014faf13cbad7f53498cb527ddb9a9ac6edff3 100644 (file)
@@ -715,6 +715,12 @@ impl NADecoder for VP6Decoder {
     }
 }
 
+impl NAOptionHandler for VP6Decoder {
+    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_vp6() -> Box<NADecoder + Send> {
     Box::new(VP6Decoder::new(false))
 }
index 9e34150210d6dce26e103fa68fd51005cb227188..4d300cc6d1e2fbe5468abeccc8d3aef23ba2db8d 100644 (file)
@@ -1423,6 +1423,12 @@ impl NADecoder for VP7Decoder {
     }
 }
 
+impl NAOptionHandler for VP7Decoder {
+    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<NADecoder + Send> {
     Box::new(VP7Decoder::new())
 }
index e94fbaff2a28160dd8018e34c5dbf5781cf5e8e2..2e423906262cb8f6cb4219b7fd6ca483a1429ab4 100644 (file)
@@ -220,6 +220,12 @@ impl NADecoder for BMVVideoDecoder {
     }
 }
 
+impl NAOptionHandler for BMVVideoDecoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(BMVVideoDecoder::new())
@@ -299,6 +305,12 @@ impl NADecoder for BMVAudioDecoder {
     }
 }
 
+impl NAOptionHandler for BMVAudioDecoder {
+    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_audio() -> Box<dyn NADecoder + Send> {
     Box::new(BMVAudioDecoder::new())
 }
index 5921205498e962ea8f75493de57388373090b447..a9d7f71e9222f00cdf292babda4f6a4b0e0d262b 100644 (file)
@@ -503,6 +503,12 @@ impl NADecoder for BMV3VideoDecoder {
     }
 }
 
+impl NAOptionHandler for BMV3VideoDecoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(BMV3VideoDecoder::new())
@@ -595,6 +601,12 @@ impl NADecoder for BMV3AudioDecoder {
     }
 }
 
+impl NAOptionHandler for BMV3AudioDecoder {
+    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_audio() -> Box<dyn NADecoder + Send> {
     Box::new(BMV3AudioDecoder::new())
 }
index c8059fa6995db416eaf23f86858ce1308ef6ccd9..73f42255d549ef612f38cfb739aa96dbe3bb995a 100644 (file)
@@ -460,6 +460,12 @@ impl NADecoder for GremlinVideoDecoder {
     }
 }
 
+impl NAOptionHandler for GremlinVideoDecoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(GremlinVideoDecoder::new())
 }
@@ -554,6 +560,12 @@ impl NADecoder for GremlinAudioDecoder {
     }
 }
 
+impl NAOptionHandler for GremlinAudioDecoder {
+    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_audio() -> Box<dyn NADecoder + Send> {
     Box::new(GremlinAudioDecoder::new())
 }
index eea2c9f483624fe1f216f8a1cfd08182d82668c3..e3535f57359a7282dfbbd8398122c79230351c8a 100644 (file)
@@ -418,6 +418,12 @@ impl NADecoder for LHDecoder {
     }
 }
 
+impl NAOptionHandler for LHDecoder {
+    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(LHDecoder::new())
 }
index 1234426e4921312b38f57bcfdd992ef9351d6234..74ec75f6b33f689abf7d891d0b48f8584738bf13 100644 (file)
@@ -175,6 +175,12 @@ impl NADecoder for MidividDecoder {
     }
 }
 
+impl NAOptionHandler for MidividDecoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(MidividDecoder::new())
index d65e448c170ceea0d49cb5bbf76f0ffa05aa9da7..7ffb04548b31f3c28d17ab1d5c9dd04035fc0c49 100644 (file)
@@ -509,6 +509,12 @@ impl NADecoder for Midivid3Decoder {
     }
 }
 
+impl NAOptionHandler for Midivid3Decoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(Midivid3Decoder::new())
index 65d5de318bfac07c5b859ce2eb793b9dd53bbbda..939dcd6d25891b719160d9375628cbd930afcfd3 100644 (file)
@@ -335,6 +335,12 @@ impl NADecoder for VMDVideoDecoder {
     }
 }
 
+impl NAOptionHandler for VMDVideoDecoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(VMDVideoDecoder::new())
@@ -667,6 +673,12 @@ impl NADecoder for VMDAudioDecoder {
     }
 }
 
+impl NAOptionHandler for VMDAudioDecoder {
+    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_audio() -> Box<dyn NADecoder + Send> {
     Box::new(VMDAudioDecoder::new())
 }
index 8d8f1037ee8bc070751217afabfae702b63ba0fa..c766861bad6d36ad560bcc0223c3306f01489763 100644 (file)
@@ -926,6 +926,12 @@ impl NADecoder for IMCDecoder {
     }
 }
 
+impl NAOptionHandler for IMCDecoder {
+    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_imc() -> Box<dyn NADecoder + Send> {
     Box::new(IMCDecoder::new(true))
 }
index 14d3c0ae8a45329e299f6a32c7294bc80446b73a..38079cec0e6ddb7c3557de02fff01660b5941540 100644 (file)
@@ -365,6 +365,12 @@ impl NADecoder for Indeo2Decoder {
     }
 }
 
+impl NAOptionHandler for Indeo2Decoder {
+    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(Indeo2Decoder::new())
 }
index 2f9b16c991d5ec8c3179c41e6f1a0c4b35e374bf..224c3ecd62c9658c5912a3293970ac07f82083ee 100644 (file)
@@ -792,6 +792,12 @@ impl NADecoder for Indeo3Decoder {
     }
 }
 
+impl NAOptionHandler for Indeo3Decoder {
+    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(Indeo3Decoder::new())
 }
index c035eec487806dc42d83e5d6eb2c5a65ad91fbcf..879f850f27eed70df639992242a073eb0765a63d 100644 (file)
@@ -461,6 +461,12 @@ impl NADecoder for Indeo4Decoder {
     }
 }
 
+impl NAOptionHandler for Indeo4Decoder {
+    fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
+    fn set_options(&mut self, _options: &[NAOption]) { }
+    fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
+}
+
 const INDEO4_PICTURE_SIZE_TAB: [[usize; 2]; 7] = [
     [640, 480], [320, 240], [160, 120], [704, 480], [352, 240], [352, 288], [176, 144]
 ];
index 2ae529555339d932987a753ff317e203a72df890..c1c7cb5da044b633a16637b45060d5abd8132c1b 100644 (file)
@@ -536,6 +536,12 @@ impl NADecoder for Indeo5Decoder {
     }
 }
 
+impl NAOptionHandler for Indeo5Decoder {
+    fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
+    fn set_options(&mut self, _options: &[NAOption]) { }
+    fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
+}
+
 const INDEO5_PICTURE_SIZE_TAB: [[usize; 2]; 15] = [
     [640, 480], [320, 240], [160, 120], [704, 480], [352, 240], [352, 288], [176, 144],
     [240, 180], [640, 240], [704, 240], [80, 60], [88, 72], [0, 0], [0, 0], [0, 0]
index a1a0ace6c1c5f94f7f22e395eca6d68973aa303e..e74f684c0a4506b4eeb5f055bb9b5a69f45f4cc7 100644 (file)
@@ -732,6 +732,12 @@ impl NADecoder for Intel263Decoder {
     }
 }
 
+impl NAOptionHandler for Intel263Decoder {
+    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(Intel263Decoder::new())
index 42730ee607feeb38b353754d2bffcb727a8ea2a7..2ee538de13799c797a8fda0daf0d42117b6585ef 100644 (file)
@@ -82,6 +82,12 @@ impl NADecoder for IMAADPCMDecoder {
     }
 }
 
+impl NAOptionHandler for IMAADPCMDecoder {
+    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(IMAADPCMDecoder::new())
 }
index d906e4ca89e98bd2cce7c83906565c59391503e5..de6f447068c99f81e60843182facf612c90ca993 100644 (file)
@@ -161,6 +161,12 @@ impl NADecoder for MSADPCMDecoder {
     }
 }
 
+impl NAOptionHandler for MSADPCMDecoder {
+    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(MSADPCMDecoder::new())
 }
index 42a9a2ee66eb5cba47382960bd46aec910948838..938dc0f8ff2eae1c9a2b2c766e38357078aab47b 100644 (file)
@@ -277,6 +277,12 @@ if !found_pal {
     }
 }
 
+impl NAOptionHandler for Video1Decoder {
+    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(Video1Decoder::new())
 }
index 7532c028b1e7bfbbf67e9cb4a9ed04a87ccac0f9..1305878bed5b36a5c2590bc2e586d4667f7fcf26 100644 (file)
@@ -1943,6 +1943,12 @@ impl NADecoder for Bink2Decoder {
     }
 }
 
+impl NAOptionHandler for Bink2Decoder {
+    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(Bink2Decoder::new())
 }
index 479ee35d1b2fac7fc8f54c270d334acae5cfcd6b..aee9bbc8058b48834c60591c46e035d94560c446 100644 (file)
@@ -278,6 +278,12 @@ impl NADecoder for BinkAudioDecoder {
     }
 }
 
+impl NAOptionHandler for BinkAudioDecoder {
+    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_dct() -> Box<dyn NADecoder + Send> {
     Box::new(BinkAudioDecoder::new(true))
 }
index 509b115bbaaa94f99b54ab19f10894bc185b3fe2..4de23e79af74047c369c76384f706ada82052e9f 100644 (file)
@@ -1249,6 +1249,12 @@ impl NADecoder for BinkDecoder {
     }
 }
 
+impl NAOptionHandler for BinkDecoder {
+    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(BinkDecoder::new())
 }
index b29e1868fdc9f24cf8f30ef8f7e9270e573efd59..8b24c6da714aa4b1c407fc1b35fee7110b74e797 100644 (file)
@@ -469,6 +469,12 @@ impl NADecoder for SmackerVideoDecoder {
     }
 }
 
+impl NAOptionHandler for SmackerVideoDecoder {
+    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_video() -> Box<dyn NADecoder + Send> {
     Box::new(SmackerVideoDecoder::new())
 }
@@ -594,6 +600,12 @@ impl NADecoder for SmackerAudioDecoder {
     }
 }
 
+impl NAOptionHandler for SmackerAudioDecoder {
+    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_audio() -> Box<dyn NADecoder + Send> {
     Box::new(SmackerAudioDecoder::new())
 }
index 448ccae1e569ab7347792d2be581d4d3486e027b..b4e2ea90747fac5b814ce3ba094b79067bcf7eed 100644 (file)
@@ -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())
 }
index abb7f38844ca523e50caeace605cfc19562f0ba4..31f2c01b9e9dec7c58952867bf8cd029b230adbe 100644 (file)
@@ -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())
 }
index dc4add366cf56b6163569786cc979d978d1142f8..1d983313b6b56520eb42abe849872d304485a1e7 100644 (file)
@@ -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())
 }
index dd8b698d3f1bf154ee3ac9406b79bce45125cee9..56af9671fed5c4eb9a456cec36166bec3b236fe7 100644 (file)
@@ -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())
 }
index f5e0c8d4ce58a3e16f1458df7f8387d6aa2b274b..e729b0def25fec5f4622f772c9d1b8ad5c02d3ac 100644 (file)
@@ -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())
index 3b8e441e80c5abd76b1707a08e66c1f6fc339cdd..39254db6a206a5f586aef1b56b27d6c103858362 100644 (file)
@@ -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 },
index 81021d497a2965937b97a143d618056ee66c5110..1827980c101991042df65a48bfe34b3bd97e8ff0 100644 (file)
@@ -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())
 }
index 91f6e78a97490fa61de1bf75613d00582b86f865..95e232541d6fb652624f10eef1f723ddf7933cc5 100644 (file)
@@ -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())
 }
index 45322b55910b4d53007fa0607f87110e98b14df9..a32bba1bdce4059f053080042265f83fe85d9d86 100644 (file)
@@ -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())
 }
index 840bb942ebd560b2256feed8694fe5febfde8318..5824501afac16f652ecae99a2dffe8b9787230d5 100644 (file)
@@ -960,6 +960,12 @@ impl NADecoder for G7231Decoder {
     }
 }
 
+impl NAOptionHandler for G7231Decoder {
+    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(G7231Decoder::new())
 }
index d36e798058036df37528e4d966ac00c5c383a875..3dd130c88066d90c6844c9fa6ed78b5b8a2b6b40 100644 (file)
@@ -382,6 +382,12 @@ impl NADecoder for SirenDecoder {
     }
 }
 
+impl NAOptionHandler for SirenDecoder {
+    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(SirenDecoder::new())
 }
index 807814d1f1517430afd2587b6010bcebc39075ac..9c5b5d1ed1d9f0600ff8adbda6c0fc3fe6c65cfd 100644 (file)
@@ -475,6 +475,12 @@ impl NADecoder for VivoDecoder {
     }
 }
 
+impl NAOptionHandler for VivoDecoder {
+    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(VivoDecoder::new())