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