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