1 //! Umbrella crate to register decoders and demuxers from all known NihAV crates.
2 extern crate nihav_core;
3 extern crate nihav_commonfmt;
4 extern crate nihav_duck;
5 extern crate nihav_game;
6 extern crate nihav_indeo;
7 extern crate nihav_itu;
8 extern crate nihav_llaudio;
10 extern crate nihav_qt;
11 extern crate nihav_rad;
12 extern crate nihav_realmedia;
13 extern crate nihav_vivo;
15 use nihav_core::codecs::RegisteredDecoders;
16 use nihav_core::codecs::RegisteredEncoders;
17 use nihav_core::demuxers::RegisteredDemuxers;
18 use nihav_core::muxers::RegisteredMuxers;
20 use nihav_commonfmt::generic_register_all_decoders;
21 use nihav_commonfmt::generic_register_all_demuxers;
22 use nihav_commonfmt::generic_register_all_encoders;
23 use nihav_commonfmt::generic_register_all_muxers;
25 use nihav_duck::duck_register_all_decoders;
27 use nihav_game::game_register_all_decoders;
28 use nihav_game::game_register_all_demuxers;
30 use nihav_indeo::indeo_register_all_decoders;
32 use nihav_itu::itu_register_all_decoders;
34 use nihav_llaudio::llaudio_register_all_decoders;
35 use nihav_llaudio::llaudio_register_all_demuxers;
37 use nihav_ms::ms_register_all_decoders;
38 use nihav_ms::ms_register_all_encoders;
40 use nihav_qt::qt_register_all_decoders;
42 use nihav_rad::rad_register_all_decoders;
43 use nihav_rad::rad_register_all_demuxers;
45 use nihav_realmedia::realmedia_register_all_decoders;
46 use nihav_realmedia::realmedia_register_all_demuxers;
48 use nihav_vivo::vivo_register_all_decoders;
49 use nihav_vivo::vivo_register_all_demuxers;
51 /// Registers all known decoders.
52 pub 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);
57 itu_register_all_decoders(rd);
58 llaudio_register_all_decoders(rd);
59 ms_register_all_decoders(rd);
60 qt_register_all_decoders(rd);
61 rad_register_all_decoders(rd);
62 realmedia_register_all_decoders(rd);
63 vivo_register_all_decoders(rd);
66 /// Registers all known demuxers.
67 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
68 generic_register_all_demuxers(rd);
69 game_register_all_demuxers(rd);
70 llaudio_register_all_demuxers(rd);
71 rad_register_all_demuxers(rd);
72 realmedia_register_all_demuxers(rd);
73 vivo_register_all_demuxers(rd);
76 /// Registers all known encoders.
77 pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
78 generic_register_all_encoders(re);
79 ms_register_all_encoders(re);
82 /// Registers all known demuxers.
83 pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
84 generic_register_all_muxers(rm);
88 extern crate nihav_registry;
93 use nihav_registry::register::get_codec_description;
96 fn test_descriptions() {
97 let mut rd = RegisteredDecoders::new();
98 nihav_register_all_decoders(&mut rd);
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);
106 println!("missing!");
110 assert!(!has_missing);