]>
Commit | Line | Data |
---|---|---|
5641dccf KS |
1 | use nihav_core::demuxers::*; |
2 | ||
674ebc33 | 3 | #[allow(unused_macros)] |
5641dccf KS |
4 | macro_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")] |
9 | mod bmv; | |
5641dccf KS |
10 | #[cfg(feature="demuxer_gdv")] |
11 | mod gdv; | |
9895bd7b KS |
12 | #[cfg(feature="demuxer_vmd")] |
13 | mod vmd; | |
5641dccf KS |
14 | |
15 | const 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 | ||
24 | pub fn game_register_all_demuxers(rd: &mut RegisteredDemuxers) { | |
25 | for demuxer in GAME_DEMUXERS.into_iter() { | |
26 | rd.add_demuxer(*demuxer); | |
27 | } | |
28 | } |