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(any(feature="decoder_realvideo3", feature="decoder_realvideo4"))]
9 #[cfg(any(feature="decoder_realvideo3", feature="decoder_realvideo4"))]
10 #[allow(clippy::erasing_op)]
12 #[cfg(any(feature="decoder_realvideo3", feature="decoder_realvideo4"))]
13 #[allow(clippy::erasing_op)]
14 #[allow(clippy::many_single_char_names)]
17 #[cfg(feature="decoder_realvideo1")]
19 #[cfg(feature="decoder_realvideo2")]
21 #[cfg(feature="decoder_realvideo3")]
23 #[cfg(feature="decoder_realvideo3")]
24 #[allow(clippy::erasing_op)]
25 #[allow(clippy::many_single_char_names)]
26 #[allow(clippy::neg_multiply)]
28 #[cfg(feature="decoder_realvideo4")]
30 #[cfg(feature="decoder_realvideo4")]
31 #[allow(clippy::erasing_op)]
32 #[allow(clippy::many_single_char_names)]
34 #[cfg(feature="decoder_realvideo6")]
36 #[cfg(feature="decoder_realvideo6")]
38 #[cfg(feature="decoder_realvideo6")]
39 #[allow(clippy::erasing_op)]
40 #[allow(clippy::many_single_char_names)]
43 #[cfg(feature="decoder_realaudio144")]
44 #[allow(clippy::manual_memcpy)]
46 #[cfg(feature="decoder_realaudio288")]
48 #[cfg(feature="decoder_cook")]
50 #[cfg(feature="decoder_ralf")]
53 const RM_CODECS: &[DecoderInfo] = &[
54 #[cfg(feature="decoder_realvideo1")]
55 DecoderInfo { name: "realvideo1", get_decoder: rv10::get_decoder },
56 #[cfg(feature="decoder_realvideo2")]
57 DecoderInfo { name: "realvideo2", get_decoder: rv20::get_decoder },
58 #[cfg(feature="decoder_realvideo3")]
59 DecoderInfo { name: "realvideo3", get_decoder: rv30::get_decoder },
60 #[cfg(feature="decoder_realvideo4")]
61 DecoderInfo { name: "realvideo4", get_decoder: rv40::get_decoder },
62 #[cfg(feature="decoder_realvideo6")]
63 DecoderInfo { name: "realvideo6", get_decoder: rv60::get_decoder },
65 #[cfg(feature="decoder_realaudio144")]
66 DecoderInfo { name: "ra14.4", get_decoder: ra144::get_decoder },
67 #[cfg(feature="decoder_realaudio288")]
68 DecoderInfo { name: "ra28.8", get_decoder: ra288::get_decoder },
69 #[cfg(feature="decoder_cook")]
70 DecoderInfo { name: "cook", get_decoder: cook::get_decoder },
71 #[cfg(feature="decoder_ralf")]
72 DecoderInfo { name: "ralf", get_decoder: ralf::get_decoder },
75 /// Registers all available codecs provided by this crate.
76 pub fn realmedia_register_all_codecs(rd: &mut RegisteredDecoders) {
77 for decoder in RM_CODECS.iter() {
78 rd.add_decoder(decoder.clone());