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