]> git.nihav.org Git - nihav.git/blame - nihav-game/src/demuxers/mod.rs
bink2: decode KB2i flags
[nihav.git] / nihav-game / src / demuxers / mod.rs
CommitLineData
5641dccf
KS
1use nihav_core::demuxers::*;
2
674ebc33 3#[allow(unused_macros)]
5641dccf
KS
4macro_rules! validate {
5 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
6}
7
9067c1f8
KS
8#[cfg(feature="demuxer_bmv")]
9mod bmv;
5641dccf
KS
10#[cfg(feature="demuxer_gdv")]
11mod gdv;
9895bd7b
KS
12#[cfg(feature="demuxer_vmd")]
13mod vmd;
5641dccf
KS
14
15const GAME_DEMUXERS: &[&'static DemuxerCreator] = &[
9067c1f8
KS
16#[cfg(feature="demuxer_bmv")]
17 &bmv::BMVDemuxerCreator {},
5641dccf
KS
18#[cfg(feature="demuxer_gdv")]
19 &gdv::GDVDemuxerCreator {},
9895bd7b
KS
20#[cfg(feature="demuxer_vmd")]
21 &vmd::VMDDemuxerCreator {},
5641dccf
KS
22];
23
24pub fn game_register_all_demuxers(rd: &mut RegisteredDemuxers) {
25 for demuxer in GAME_DEMUXERS.into_iter() {
26 rd.add_demuxer(*demuxer);
27 }
28}