impl NADecoder for Video1Decoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
-println!("fmt {}", vinfo.get_format());
self.is_16bit = !vinfo.get_format().palette;
let fmt = if !self.is_16bit { PAL8_FORMAT } else { RGB555_FORMAT };
self.width = vinfo.get_width();
}
}
+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())
}