]>
Commit | Line | Data |
---|---|---|
38953fb5 KS |
1 | use nihav_core::demuxers::*; |
2 | ||
3 | ||
674ebc33 | 4 | #[allow(unused_macros)] |
38953fb5 KS |
5 | macro_rules! validate { |
6 | ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } }; | |
7 | } | |
8 | ||
9 | #[cfg(feature="demuxer_avi")] | |
c83013a1 | 10 | #[allow(clippy::cast_lossless)] |
38953fb5 | 11 | mod avi; |
58309c73 | 12 | #[cfg(feature="demuxer_mov")] |
61cab15b | 13 | #[allow(clippy::cast_lossless)] |
58309c73 | 14 | mod mov; |
283abfa6 KS |
15 | #[cfg(feature="demuxer_wav")] |
16 | mod wav; | |
dbb2cbc9 KS |
17 | #[cfg(feature="demuxer_y4m")] |
18 | mod y4m; | |
38953fb5 | 19 | |
ac818eac | 20 | const DEMUXERS: &[&dyn DemuxerCreator] = &[ |
38953fb5 KS |
21 | #[cfg(feature="demuxer_avi")] |
22 | &avi::AVIDemuxerCreator {}, | |
58309c73 KS |
23 | #[cfg(feature="demuxer_mov")] |
24 | &mov::MOVDemuxerCreator {}, | |
283abfa6 KS |
25 | #[cfg(feature="demuxer_wav")] |
26 | &wav::WAVDemuxerCreator {}, | |
dbb2cbc9 KS |
27 | #[cfg(feature="demuxer_y4m")] |
28 | &y4m::Y4MDemuxerCreator {}, | |
38953fb5 KS |
29 | ]; |
30 | ||
e64739f8 | 31 | /// Registers all available demuxers provided by this crate. |
38953fb5 | 32 | pub fn generic_register_all_demuxers(rd: &mut RegisteredDemuxers) { |
c83013a1 | 33 | for demuxer in DEMUXERS.iter() { |
38953fb5 KS |
34 | rd.add_demuxer(*demuxer); |
35 | } | |
36 | } |