]> git.nihav.org Git - nihav.git/blob - nihav-realmedia/src/demuxers/mod.rs
avi: fix handling of palette change chunk with 256 colours
[nihav.git] / nihav-realmedia / src / demuxers / mod.rs
1 use nihav_core::demuxers::*;
2
3 #[cfg(debug_assertions)]
4 macro_rules! validate {
5 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
6 }
7 #[cfg(not(debug_assertions))]
8 macro_rules! validate {
9 ($a:expr) => { if !$a { return Err(DemuxerError::InvalidData); } };
10 }
11
12 #[cfg(feature="demuxer_real")]
13 #[allow(clippy::identity_op)]
14 #[allow(clippy::needless_range_loop)]
15 mod realmedia;
16
17 const RM_DEMUXERS: &[&dyn DemuxerCreator] = &[
18 #[cfg(feature="demuxer_real")]
19 &realmedia::RealMediaDemuxerCreator {},
20 #[cfg(feature="demuxer_real")]
21 &realmedia::RealAudioDemuxerCreator {},
22 #[cfg(feature="demuxer_real")]
23 &realmedia::RealIVRDemuxerCreator {},
24 ];
25
26 /// Registers all available demuxers provided by this crate.
27 pub fn realmedia_register_all_demuxers(rd: &mut RegisteredDemuxers) {
28 for demuxer in RM_DEMUXERS.iter() {
29 rd.add_demuxer(*demuxer);
30 }
31 }