1 use nihav_core::codecs::*;
3 macro_rules! validate {
4 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } };
7 #[cfg(feature="decoder_clearvideo")]
10 #[cfg(feature="decoder_aac")]
12 #[cfg(feature="decoder_atrac3")]
14 #[cfg(feature="decoder_pcm")]
16 #[cfg(feature="decoder_sipro")]
18 #[cfg(feature="decoder_ts102366")]
21 const DECODERS: &[DecoderInfo] = &[
22 #[cfg(feature="decoder_clearvideo")]
23 DecoderInfo { name: "clearvideo", get_decoder: clearvideo::get_decoder },
24 #[cfg(feature="decoder_clearvideo")]
25 DecoderInfo { name: "clearvideo_rm", get_decoder: clearvideo::get_decoder_rm },
27 #[cfg(feature="decoder_pcm")]
28 DecoderInfo { name: "pcm", get_decoder: pcm::get_decoder },
29 #[cfg(feature="decoder_sipro")]
30 DecoderInfo { name: "sipro", get_decoder: sipro::get_decoder },
31 #[cfg(feature="decoder_ts102366")]
32 DecoderInfo { name: "ac3", get_decoder: ts102366::get_decoder },
33 #[cfg(feature="decoder_atrac3")]
34 DecoderInfo { name: "atrac3", get_decoder: atrac3::get_decoder },
35 #[cfg(feature="decoder_aac")]
36 DecoderInfo { name: "aac", get_decoder: aac::get_decoder },
39 /// Registers all available codecs provided by this crate.
40 pub fn generic_register_all_codecs(rd: &mut RegisteredDecoders) {
41 for decoder in DECODERS.iter() {
42 rd.add_decoder(decoder.clone());