1 use nihav_core::demuxers::*;
3 #[cfg(debug_assertions)]
4 macro_rules! validate {
5 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
7 #[cfg(not(debug_assertions))]
8 macro_rules! validate {
9 ($a:expr) => { if !$a { return Err(DemuxerError::InvalidData); } };
12 #[cfg(feature="demuxer_real")]
13 #[allow(clippy::identity_op)]
14 #[allow(clippy::needless_range_loop)]
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 {},
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);