aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-acorn/src/demuxers/mod.rs
blob: 2acc820dc0c6d1e976178d17d6760ca8a4a57354 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use nihav_core::demuxers::*;


#[allow(unused_macros)]
#[cfg(debug_assertions)]
macro_rules! validate {
    ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
}
#[cfg(not(debug_assertions))]
macro_rules! validate {
    ($a:expr) => { if !$a { return Err(DemuxerError::InvalidData); } };
}

#[cfg(feature="demuxer_armovie")]
mod armovie;

const RAW_DEMUXERS: &[&dyn RawDemuxerCreator] = &[
#[cfg(feature="demuxer_armovie")]
    &armovie::ARMovieDemuxerCreator {},
];

/// Registers all available demuxers provided by this crate.
pub fn acorn_register_all_raw_demuxers(rd: &mut RegisteredRawDemuxers) {
    for demuxer in RAW_DEMUXERS.iter() {
        rd.add_demuxer(*demuxer);
    }
}