]> git.nihav.org Git - nihav.git/blob - nihav-commonfmt/src/demuxers/mod.rs
avi: do not ignore guessed format
[nihav.git] / nihav-commonfmt / src / demuxers / mod.rs
1 use nihav_core::demuxers::*;
2
3
4 #[allow(unused_macros)]
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")]
10 #[allow(clippy::cast_lossless)]
11 mod avi;
12 #[cfg(feature="demuxer_mov")]
13 mod mov;
14
15 const DEMUXERS: &[&DemuxerCreator] = &[
16 #[cfg(feature="demuxer_avi")]
17 &avi::AVIDemuxerCreator {},
18 #[cfg(feature="demuxer_mov")]
19 &mov::MOVDemuxerCreator {},
20 ];
21
22 /// Registers all available demuxers provided by this crate.
23 pub fn generic_register_all_demuxers(rd: &mut RegisteredDemuxers) {
24 for demuxer in DEMUXERS.iter() {
25 rd.add_demuxer(*demuxer);
26 }
27 }