]>
Commit | Line | Data |
---|---|---|
1 | use nihav_core::codecs::*; | |
2 | ||
3 | macro_rules! validate { | |
4 | ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } }; | |
5 | } | |
6 | ||
7 | #[cfg(feature="decoder_bmv")] | |
8 | pub mod bmv; | |
9 | #[cfg(feature="decoder_bmv3")] | |
10 | pub mod bmv3; | |
11 | #[cfg(feature="decoder_gdvvid")] | |
12 | pub mod gremlinvideo; | |
13 | #[cfg(feature="decoder_vmd")] | |
14 | pub mod vmd; | |
15 | ||
16 | const GAME_CODECS: &[DecoderInfo] = &[ | |
17 | #[cfg(feature="decoder_gdvvid")] | |
18 | DecoderInfo { name: "gdv-audio", get_decoder: gremlinvideo::get_decoder_audio }, | |
19 | #[cfg(feature="decoder_gdvvid")] | |
20 | DecoderInfo { name: "gdv-video", get_decoder: gremlinvideo::get_decoder_video }, | |
21 | #[cfg(feature="decoder_bmv")] | |
22 | DecoderInfo { name: "bmv-audio", get_decoder: bmv::get_decoder_audio }, | |
23 | #[cfg(feature="decoder_bmv")] | |
24 | DecoderInfo { name: "bmv-video", get_decoder: bmv::get_decoder_video }, | |
25 | #[cfg(feature="decoder_bmv3")] | |
26 | DecoderInfo { name: "bmv3-audio", get_decoder: bmv3::get_decoder_audio }, | |
27 | #[cfg(feature="decoder_bmv3")] | |
28 | DecoderInfo { name: "bmv3-video", get_decoder: bmv3::get_decoder_video }, | |
29 | #[cfg(feature="decoder_vmd")] | |
30 | DecoderInfo { name: "vmd-audio", get_decoder: vmd::get_decoder_audio }, | |
31 | #[cfg(feature="decoder_vmd")] | |
32 | DecoderInfo { name: "vmd-video", get_decoder: vmd::get_decoder_video }, | |
33 | ]; | |
34 | ||
35 | pub fn game_register_all_codecs(rd: &mut RegisteredDecoders) { | |
36 | for decoder in GAME_CODECS.iter() { | |
37 | rd.add_decoder(decoder.clone()); | |
38 | } | |
39 | } |