]>
Commit | Line | Data |
---|---|---|
1 | use nihav_core::demuxers::*; | |
2 | ||
3 | macro_rules! validate { | |
4 | ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } }; | |
5 | } | |
6 | ||
7 | #[cfg(feature="demuxer_real")] | |
8 | #[allow(clippy::identity_op)] | |
9 | #[allow(clippy::needless_range_loop)] | |
10 | mod realmedia; | |
11 | ||
12 | const RM_DEMUXERS: &[&dyn DemuxerCreator] = &[ | |
13 | #[cfg(feature="demuxer_real")] | |
14 | &realmedia::RealMediaDemuxerCreator {}, | |
15 | #[cfg(feature="demuxer_real")] | |
16 | &realmedia::RealAudioDemuxerCreator {}, | |
17 | #[cfg(feature="demuxer_real")] | |
18 | &realmedia::RealIVRDemuxerCreator {}, | |
19 | ]; | |
20 | ||
21 | /// Registers all available demuxers provided by this crate. | |
22 | pub fn realmedia_register_all_demuxers(rd: &mut RegisteredDemuxers) { | |
23 | for demuxer in RM_DEMUXERS.iter() { | |
24 | rd.add_demuxer(*demuxer); | |
25 | } | |
26 | } |