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;
26 use nihav_duck::duck_register_all_demuxers;
27 use nihav_duck::duck_register_all_encoders;
29 use nihav_game::game_register_all_decoders;
30 use nihav_game::game_register_all_demuxers;
32 use nihav_indeo::indeo_register_all_decoders;
34 use nihav_itu::itu_register_all_decoders;
36 use nihav_llaudio::llaudio_register_all_decoders;
37 use nihav_llaudio::llaudio_register_all_demuxers;
39 use nihav_ms::ms_register_all_decoders;
40 use nihav_ms::ms_register_all_encoders;
42 use nihav_qt::qt_register_all_decoders;
44 use nihav_rad::rad_register_all_decoders;
45 use nihav_rad::rad_register_all_demuxers;
47 use nihav_realmedia::realmedia_register_all_decoders;
48 use nihav_realmedia::realmedia_register_all_demuxers;
50 use nihav_vivo::vivo_register_all_decoders;
51 use nihav_vivo::vivo_register_all_demuxers;
53 /// Registers all known decoders.
54 pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
55 generic_register_all_decoders(rd);
56 duck_register_all_decoders(rd);
57 game_register_all_decoders(rd);
58 indeo_register_all_decoders(rd);
59 itu_register_all_decoders(rd);
60 llaudio_register_all_decoders(rd);
61 ms_register_all_decoders(rd);
62 qt_register_all_decoders(rd);
63 rad_register_all_decoders(rd);
64 realmedia_register_all_decoders(rd);
65 vivo_register_all_decoders(rd);
68 /// Registers all known demuxers.
69 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
70 duck_register_all_demuxers(rd);
71 generic_register_all_demuxers(rd);
72 game_register_all_demuxers(rd);
73 llaudio_register_all_demuxers(rd);
74 rad_register_all_demuxers(rd);
75 realmedia_register_all_demuxers(rd);
76 vivo_register_all_demuxers(rd);
79 /// Registers all known encoders.
80 pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
81 generic_register_all_encoders(re);
82 duck_register_all_encoders(re);
83 ms_register_all_encoders(re);
86 /// Registers all known demuxers.
87 pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
88 generic_register_all_muxers(rm);
92 extern crate nihav_registry;
97 use nihav_registry::register::get_codec_description;
100 fn test_descriptions() {
101 let mut rd = RegisteredDecoders::new();
102 nihav_register_all_decoders(&mut rd);
103 let mut has_missing = false;
104 for dec in rd.iter() {
105 print!("decoder {} - ", dec.name);
106 let ret = get_codec_description(dec.name);
107 if let Some(desc) = ret {
108 println!("{}", desc);
110 println!("missing!");
114 assert!(!has_missing);