]> git.nihav.org Git - nihav.git/blob - nihav-allstuff/src/lib.rs
duck/vpcommon: vp_tree! does not need to be exported
[nihav.git] / nihav-allstuff / src / lib.rs
1 extern crate nihav_core;
2 extern crate nihav_commonfmt;
3 extern crate nihav_duck;
4 extern crate nihav_game;
5 extern crate nihav_indeo;
6 extern crate nihav_rad;
7 extern crate nihav_realmedia;
8
9 use nihav_core::codecs::RegisteredDecoders;
10 use nihav_core::demuxers::RegisteredDemuxers;
11
12 use nihav_commonfmt::codecs::generic_register_all_codecs;
13 use nihav_commonfmt::demuxers::generic_register_all_demuxers;
14
15 use nihav_duck::codecs::duck_register_all_codecs;
16
17 use nihav_game::codecs::game_register_all_codecs;
18 use nihav_game::demuxers::game_register_all_demuxers;
19
20 use nihav_indeo::codecs::indeo_register_all_codecs;
21
22 use nihav_rad::codecs::rad_register_all_codecs;
23 use nihav_rad::demuxers::rad_register_all_demuxers;
24
25 use nihav_realmedia::codecs::realmedia_register_all_codecs;
26 use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
27
28 pub fn nihav_register_all_codecs(rd: &mut RegisteredDecoders) {
29 generic_register_all_codecs(rd);
30 duck_register_all_codecs(rd);
31 game_register_all_codecs(rd);
32 indeo_register_all_codecs(rd);
33 rad_register_all_codecs(rd);
34 realmedia_register_all_codecs(rd);
35 }
36
37 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
38 generic_register_all_demuxers(rd);
39 game_register_all_demuxers(rd);
40 rad_register_all_demuxers(rd);
41 realmedia_register_all_demuxers(rd);
42 }
43
44 #[cfg(test)]
45 mod test {
46 use super::*;
47 use nihav_core::register::get_codec_description;
48
49 #[test]
50 fn test_descriptions() {
51 let mut rd = RegisteredDecoders::new();
52 nihav_register_all_codecs(&mut rd);
53 let mut has_missing = false;
54 for dec in rd.iter() {
55 print!("decoder {} - ", dec.name);
56 let ret = get_codec_description(dec.name);
57 if let Some(desc) = ret {
58 println!("{}", desc);
59 } else {
60 println!("missing!");
61 has_missing = true;
62 }
63 }
64 assert!(!has_missing);
65 }
66 }