]> git.nihav.org Git - nihav.git/blame - nihav-rad/src/demuxers/mod.rs
introduce option handling for demuxers
[nihav.git] / nihav-rad / src / demuxers / mod.rs
CommitLineData
606c448e
KS
1use nihav_core::demuxers::*;
2
3#[allow(unused_macros)]
4macro_rules! validate {
5 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
6}
7
8#[cfg(feature="demuxer_smk")]
9mod smacker;
10#[cfg(feature="demuxer_bink")]
11mod bink;
12
7e6086e5 13const RAD_DEMUXERS: &[&DemuxerCreator] = &[
606c448e
KS
14#[cfg(feature="demuxer_smk")]
15 &smacker::SMKDemuxerCreator {},
16#[cfg(feature="demuxer_bink")]
17 &bink::BinkDemuxerCreator {},
18];
19
e64739f8 20/// Registers all available demuxers provided by this crate.
606c448e 21pub fn rad_register_all_demuxers(rd: &mut RegisteredDemuxers) {
7e6086e5 22 for demuxer in RAD_DEMUXERS.iter() {
606c448e
KS
23 rd.add_demuxer(*demuxer);
24 }
25}