use nihav_core::codecs::*;
+#[cfg(debug_assertions)]
macro_rules! validate {
($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } };
}
+#[cfg(not(debug_assertions))]
+macro_rules! validate {
+ ($a:expr) => { if !$a { return Err(DecoderError::InvalidData); } };
+}
#[allow(clippy::collapsible_else_if)]
#[allow(clippy::too_many_arguments)]
rd.add_decoder(*decoder);
}
}
+
+const ITU_MT_CODECS: &[MTDecoderInfo] = &[
+#[cfg(feature="decoder_h264")]
+ MTDecoderInfo { name: "h264", get_decoder: h264::get_decoder_mt },
+];
+
+/// Registers all available multi-threaded decoders provided by this crate.
+pub fn itu_register_all_mt_decoders(rd: &mut RegisteredMTDecoders) {
+ for decoder in ITU_MT_CODECS.iter() {
+ rd.add_decoder(*decoder);
+ }
+}