]> git.nihav.org Git - nihav.git/blame - nihav-duck/src/demuxers/mod.rs
add MPEG-4 ASP decoder
[nihav.git] / nihav-duck / src / demuxers / mod.rs
CommitLineData
fd7e6906
KS
1use nihav_core::demuxers::*;
2
3
4#[allow(unused_macros)]
71d7f397 5#[cfg(debug_assertions)]
fd7e6906
KS
6macro_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))]
10macro_rules! validate {
11 ($a:expr) => { if !$a { return Err(DemuxerError::InvalidData); } };
12}
fd7e6906
KS
13
14#[cfg(feature="demuxer_ivf")]
15mod ivf;
16
17const DEMUXERS: &[&dyn DemuxerCreator] = &[
18#[cfg(feature="demuxer_ivf")]
19 &ivf::IVFDemuxerCreator {},
20];
21
22/// Registers all available demuxers provided by this crate.
23pub fn duck_register_all_demuxers(rd: &mut RegisteredDemuxers) {
24 for demuxer in DEMUXERS.iter() {
25 rd.add_demuxer(*demuxer);
26 }
27}