]> git.nihav.org Git - nihav.git/blame - nihav-allstuff/src/lib.rs
avimux: always write positive height in stream properties
[nihav.git] / nihav-allstuff / src / lib.rs
CommitLineData
5ed804ae 1//! Umbrella crate to register decoders and demuxers from all known NihAV crates.
5641dccf 2extern crate nihav_core;
38953fb5 3extern crate nihav_commonfmt;
8e4fa38a 4extern crate nihav_duck;
5641dccf
KS
5extern crate nihav_game;
6extern crate nihav_indeo;
696e4e20 7extern crate nihav_itu;
87927c57 8extern crate nihav_llaudio;
4abcd842 9extern crate nihav_ms;
06480aad 10extern crate nihav_qt;
606c448e 11extern crate nihav_rad;
5641dccf 12extern crate nihav_realmedia;
06480aad 13extern crate nihav_vivo;
5641dccf 14
38953fb5 15use nihav_core::codecs::RegisteredDecoders;
f52b598b 16use nihav_core::codecs::RegisteredEncoders;
38953fb5 17use nihav_core::demuxers::RegisteredDemuxers;
f52b598b 18use nihav_core::muxers::RegisteredMuxers;
38953fb5 19
78fb6560 20use nihav_commonfmt::generic_register_all_decoders;
e64739f8 21use nihav_commonfmt::generic_register_all_demuxers;
f52b598b
KS
22use nihav_commonfmt::generic_register_all_encoders;
23use nihav_commonfmt::generic_register_all_muxers;
5641dccf 24
78fb6560 25use nihav_duck::duck_register_all_decoders;
8e4fa38a 26
78fb6560 27use nihav_game::game_register_all_decoders;
e64739f8 28use nihav_game::game_register_all_demuxers;
5641dccf 29
78fb6560 30use nihav_indeo::indeo_register_all_decoders;
5641dccf 31
696e4e20
KS
32use nihav_itu::itu_register_all_decoders;
33
87927c57
KS
34use nihav_llaudio::llaudio_register_all_decoders;
35use nihav_llaudio::llaudio_register_all_demuxers;
36
78fb6560 37use nihav_ms::ms_register_all_decoders;
f52b598b 38use nihav_ms::ms_register_all_encoders;
4abcd842 39
78fb6560 40use nihav_qt::qt_register_all_decoders;
4c1582cf 41
78fb6560 42use nihav_rad::rad_register_all_decoders;
e64739f8 43use nihav_rad::rad_register_all_demuxers;
606c448e 44
78fb6560 45use nihav_realmedia::realmedia_register_all_decoders;
e64739f8 46use nihav_realmedia::realmedia_register_all_demuxers;
5641dccf 47
06480aad
KS
48use nihav_vivo::vivo_register_all_decoders;
49use nihav_vivo::vivo_register_all_demuxers;
50
5ed804ae 51/// Registers all known decoders.
78fb6560
KS
52pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
53 generic_register_all_decoders(rd);
54 duck_register_all_decoders(rd);
55 game_register_all_decoders(rd);
56 indeo_register_all_decoders(rd);
696e4e20 57 itu_register_all_decoders(rd);
87927c57 58 llaudio_register_all_decoders(rd);
78fb6560
KS
59 ms_register_all_decoders(rd);
60 qt_register_all_decoders(rd);
61 rad_register_all_decoders(rd);
62 realmedia_register_all_decoders(rd);
06480aad 63 vivo_register_all_decoders(rd);
5641dccf
KS
64}
65
5ed804ae 66/// Registers all known demuxers.
5641dccf 67pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
38953fb5 68 generic_register_all_demuxers(rd);
5641dccf 69 game_register_all_demuxers(rd);
87927c57 70 llaudio_register_all_demuxers(rd);
606c448e 71 rad_register_all_demuxers(rd);
5641dccf 72 realmedia_register_all_demuxers(rd);
06480aad 73 vivo_register_all_demuxers(rd);
5641dccf 74}
d10c9311 75
f52b598b
KS
76/// Registers all known encoders.
77pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
78 generic_register_all_encoders(re);
79 ms_register_all_encoders(re);
80}
81
82/// Registers all known demuxers.
83pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
84 generic_register_all_muxers(rm);
85}
86
32f7cbe5
KS
87#[cfg(test)]
88extern crate nihav_registry;
89
d10c9311
KS
90#[cfg(test)]
91mod test {
92 use super::*;
32f7cbe5 93 use nihav_registry::register::get_codec_description;
d10c9311
KS
94
95 #[test]
96 fn test_descriptions() {
97 let mut rd = RegisteredDecoders::new();
78fb6560 98 nihav_register_all_decoders(&mut rd);
d10c9311
KS
99 let mut has_missing = false;
100 for dec in rd.iter() {
101 print!("decoder {} - ", dec.name);
102 let ret = get_codec_description(dec.name);
103 if let Some(desc) = ret {
104 println!("{}", desc);
105 } else {
106 println!("missing!");
107 has_missing = true;
108 }
109 }
110 assert!(!has_missing);
111 }
112}