]> git.nihav.org Git - nihav.git/blame_incremental - nihav-game/src/demuxers/mod.rs
nihav-duck: require blockdsp feature from core
[nihav.git] / nihav-game / src / demuxers / mod.rs
... / ...
CommitLineData
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(any(feature="demuxer_bmv",feature="demuxer_bmv3"))]
9mod bmv;
10#[cfg(feature="demuxer_gdv")]
11mod gdv;
12#[cfg(feature="demuxer_vmd")]
13mod vmd;
14
15const GAME_DEMUXERS: &[&DemuxerCreator] = &[
16#[cfg(feature="demuxer_bmv")]
17 &bmv::BMVDemuxerCreator {},
18#[cfg(feature="demuxer_bmv3")]
19 &bmv::BMV3DemuxerCreator {},
20#[cfg(feature="demuxer_gdv")]
21 &gdv::GDVDemuxerCreator {},
22#[cfg(feature="demuxer_vmd")]
23 &vmd::VMDDemuxerCreator {},
24];
25
26pub fn game_register_all_demuxers(rd: &mut RegisteredDemuxers) {
27 for demuxer in GAME_DEMUXERS.iter() {
28 rd.add_demuxer(*demuxer);
29 }
30}