}
}
+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())
let edata = info.get_extradata();
let flags = if let Some(ref buf) = edata {
validate!(buf.len() >= 2);
- (buf[0] as u16) | ((buf[1] as u16) << 8)
+ u16::from(buf[0]) | (u16::from(buf[1]) << 8)
} else {
0
};
}
};
self.ainfo = NAAudioInfo::new(ainfo.get_sample_rate(), ainfo.get_channels(), fmt, ainfo.get_block_len());
- self.info = info.replace_info(NACodecTypeInfo::Audio(self.ainfo.clone()));
+ self.info = info.replace_info(NACodecTypeInfo::Audio(self.ainfo));
self.chmap = NAChannelMap::from_str(if channels == 1 { "C" } else { "L,R" }).unwrap();
Ok(())
} else {
Err(DecoderError::InvalidData)
}
}
+ #[allow(clippy::identity_op)]
+ #[allow(clippy::cyclomatic_complexity)]
fn decode(&mut self, _supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
let info = pkt.get_stream().get_info();
if let NACodecTypeInfo::Audio(_) = info.get_properties() {
}
}
+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())
}