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_rle")]
10 #[cfg(feature="decoder_rpza")]
13 #[cfg(feature="decoder_smc")]
16 #[cfg(feature="decoder_svq1")]
18 #[cfg(feature="decoder_svq1")]
21 #[cfg(feature="decoder_svq3")]
22 #[allow(clippy::collapsible_if)]
23 #[allow(clippy::identity_op)]
24 #[allow(clippy::needless_range_loop)]
25 #[allow(clippy::too_many_arguments)]
26 #[allow(clippy::verbose_bit_mask)]
28 #[cfg(feature="decoder_svq3")]
29 #[allow(clippy::collapsible_if)]
30 #[allow(clippy::erasing_op)]
31 #[allow(clippy::identity_op)]
32 #[allow(clippy::many_single_char_names)]
33 #[allow(clippy::needless_range_loop)]
34 #[allow(clippy::unreadable_literal)]
37 #[cfg(feature="decoder_alac")]
40 #[cfg(feature="decoder_ima_adpcm_qt")]
43 #[cfg(feature="decoder_mace")]
46 #[cfg(any(feature="decoder_qdm",feature="decoder_qdm2"))]
47 #[allow(clippy::unreadable_literal)]
49 #[cfg(feature="decoder_qdm")]
50 #[allow(clippy::needless_range_loop)]
51 #[allow(clippy::unreadable_literal)]
53 #[cfg(feature="decoder_qdm2")]
54 #[allow(clippy::needless_range_loop)]
55 #[allow(clippy::excessive_precision)]
56 #[allow(clippy::unreadable_literal)]
58 #[cfg(feature="decoder_qdm2")]
59 #[allow(clippy::needless_range_loop)]
60 #[allow(clippy::excessive_precision)]
61 #[allow(clippy::unreadable_literal)]
63 #[cfg(feature="decoder_qdm2")]
64 #[allow(clippy::excessive_precision)]
65 #[allow(clippy::unreadable_literal)]
68 const QT_CODECS: &[DecoderInfo] = &[
69 #[cfg(feature="decoder_rle")]
70 DecoderInfo { name: "qt-rle", get_decoder: rle::get_decoder },
71 #[cfg(feature="decoder_rpza")]
72 DecoderInfo { name: "apple-video", get_decoder: rpza::get_decoder },
73 #[cfg(feature="decoder_smc")]
74 DecoderInfo { name: "qt-smc", get_decoder: smc::get_decoder },
75 #[cfg(feature="decoder_svq1")]
76 DecoderInfo { name: "sorenson-video", get_decoder: svq1::get_decoder },
77 #[cfg(feature="decoder_svq3")]
78 DecoderInfo { name: "sorenson-video3", get_decoder: svq3::get_decoder },
79 #[cfg(feature="decoder_alac")]
80 DecoderInfo { name: "alac", get_decoder: alac::get_decoder },
81 #[cfg(feature="decoder_ima_adpcm_qt")]
82 DecoderInfo { name: "ima-adpcm-qt", get_decoder: imaadpcm::get_decoder },
83 #[cfg(feature="decoder_mace")]
84 DecoderInfo { name: "mace-3", get_decoder: mace::get_decoder_3 },
85 #[cfg(feature="decoder_mace")]
86 DecoderInfo { name: "mace-6", get_decoder: mace::get_decoder_6 },
87 #[cfg(feature="decoder_qdm")]
88 DecoderInfo { name: "qdesign-music", get_decoder: qdmc::get_decoder },
89 #[cfg(feature="decoder_qdm2")]
90 DecoderInfo { name: "qdesign-music2", get_decoder: qdm2::get_decoder },
93 /// Registers all available codecs provided by this crate.
94 pub fn qt_register_all_decoders(rd: &mut RegisteredDecoders) {
95 for decoder in QT_CODECS.iter() {
96 rd.add_decoder(*decoder);