1 use nihav_core::demuxers::*;
3 #[allow(unused_macros)]
4 macro_rules! validate {
5 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
8 #[cfg(feature="demuxer_ape")]
10 #[cfg(feature="demuxer_flac")]
12 #[cfg(feature="demuxer_tta")]
14 #[cfg(feature="demuxer_wavpack")]
17 const LL_AUDIO_DEMUXERS: &[&DemuxerCreator] = &[
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 {},
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);