Commit | Line | Data |
---|---|---|
696e4e20 KS |
1 | use nihav_core::codecs::*; |
2 | ||
3 | macro_rules! validate { | |
4 | ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } }; | |
5 | } | |
6 | ||
42005e25 | 7 | #[allow(clippy::collapsible_else_if)] |
4a1ca15c | 8 | #[allow(clippy::too_many_arguments)] |
42005e25 | 9 | #[allow(clippy::upper_case_acronyms)] |
696e4e20 KS |
10 | #[cfg(feature="decoder_h264")] |
11 | mod h264; | |
12 | ||
13 | const ITU_CODECS: &[DecoderInfo] = &[ | |
14 | #[cfg(feature="decoder_h264")] | |
15 | DecoderInfo { name: "h264", get_decoder: h264::get_decoder }, | |
16 | ]; | |
17 | ||
18 | /// Registers all available codecs provided by this crate. | |
19 | pub fn itu_register_all_decoders(rd: &mut RegisteredDecoders) { | |
20 | for decoder in ITU_CODECS.iter() { | |
b7c882c1 | 21 | rd.add_decoder(*decoder); |
696e4e20 KS |
22 | } |
23 | } |