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")]
45 #[cfg(feature="decoder_realaudio288")]
47 #[cfg(feature="decoder_cook")]
49 #[cfg(feature="decoder_ralf")]
52 const RM_CODECS: &[DecoderInfo] = &[
53 #[cfg(feature="decoder_realvideo1")]
54 DecoderInfo { name: "realvideo1", get_decoder: rv10::get_decoder },
55 #[cfg(feature="decoder_realvideo2")]
56 DecoderInfo { name: "realvideo2", get_decoder: rv20::get_decoder },
57 #[cfg(feature="decoder_realvideo3")]
58 DecoderInfo { name: "realvideo3", get_decoder: rv30::get_decoder },
59 #[cfg(feature="decoder_realvideo4")]
60 DecoderInfo { name: "realvideo4", get_decoder: rv40::get_decoder },
61 #[cfg(feature="decoder_realvideo6")]
62 DecoderInfo { name: "realvideo6", get_decoder: rv60::get_decoder },
64 #[cfg(feature="decoder_realaudio144")]
65 DecoderInfo { name: "ra14.4", get_decoder: ra144::get_decoder },
66 #[cfg(feature="decoder_realaudio288")]
67 DecoderInfo { name: "ra28.8", get_decoder: ra288::get_decoder },
68 #[cfg(feature="decoder_cook")]
69 DecoderInfo { name: "cook", get_decoder: cook::get_decoder },
70 #[cfg(feature="decoder_ralf")]
71 DecoderInfo { name: "ralf", get_decoder: ralf::get_decoder },
74 pub fn realmedia_register_all_codecs(rd: &mut RegisteredDecoders) {
75 for decoder in RM_CODECS.iter() {
76 rd.add_decoder(decoder.clone());