aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-realmedia/src/demuxers/mod.rs
blob: 1b044a642f0a1643c051cf10efb5ce45d8d00cfd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use nihav_core::demuxers::*;

macro_rules! validate {
    ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } };
}

#[cfg(feature="demuxer_real")]
#[allow(clippy::identity_op)]
#[allow(clippy::needless_range_loop)]
mod realmedia;

const RM_DEMUXERS: &[&dyn DemuxerCreator] = &[
#[cfg(feature="demuxer_real")]
    &realmedia::RealMediaDemuxerCreator {},
#[cfg(feature="demuxer_real")]
    &realmedia::RealAudioDemuxerCreator {},
#[cfg(feature="demuxer_real")]
    &realmedia::RealIVRDemuxerCreator {},
];

/// Registers all available demuxers provided by this crate.
pub fn realmedia_register_all_demuxers(rd: &mut RegisteredDemuxers) {
    for demuxer in RM_DEMUXERS.iter() {
        rd.add_demuxer(*demuxer);
    }
}