]>
Commit | Line | Data |
---|---|---|
87927c57 KS |
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(feature="demuxer_ape")] | |
9 | mod ape; | |
10 | #[cfg(feature="demuxer_flac")] | |
11 | mod flac; | |
12 | #[cfg(feature="demuxer_tta")] | |
13 | mod tta; | |
14 | #[cfg(feature="demuxer_wavpack")] | |
15 | mod wavpack; | |
16 | ||
ac818eac | 17 | const LL_AUDIO_DEMUXERS: &[&dyn DemuxerCreator] = &[ |
87927c57 KS |
18 | #[cfg(feature="demuxer_ape")] |
19 | &ape::APEDemuxerCreator {}, | |
20 | #[cfg(feature="demuxer_flac")] | |
21 | &flac::FLACDemuxerCreator {}, | |
22 | #[cfg(feature="demuxer_tta")] | |
23 | &tta::TTADemuxerCreator {}, | |
24 | #[cfg(feature="demuxer_wavpack")] | |
25 | &wavpack::WavPackDemuxerCreator {}, | |
26 | ]; | |
27 | ||
28 | /// Registers all available demuxers provided by this crate. | |
29 | pub fn llaudio_register_all_demuxers(rd: &mut RegisteredDemuxers) { | |
30 | for demuxer in LL_AUDIO_DEMUXERS.iter() { | |
31 | rd.add_demuxer(*demuxer); | |
32 | } | |
33 | } |