aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-realmedia/src/muxers/mod.rs
blob: e0594c9baf45f8ba5fafb2ed65ced4e7ea2eed65 (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::muxers::*;

#[cfg(debug_assertions)]
macro_rules! validate {
    ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(MuxerError::InvalidData); } };
}
#[cfg(not(debug_assertions))]
macro_rules! validate {
    ($a:expr) => { if !$a { return Err(MuxerError::InvalidData); } };
}

#[cfg(feature="muxer_real")]
mod rmvb;

const MUXERS: &[&dyn MuxerCreator] = &[
#[cfg(feature="muxer_real")]
    &rmvb::RealMediaMuxerCreator {},
#[cfg(feature="muxer_real")]
    &rmvb::RealAudioMuxerCreator {},
];

pub fn realmedia_register_all_muxers(rm: &mut RegisteredMuxers) {
    for muxer in MUXERS.iter() {
        rm.add_muxer(*muxer);
    }
}