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_rad;
11 extern crate nihav_realmedia;
13 use nihav_core::codecs::RegisteredDecoders;
14 use nihav_core::codecs::RegisteredEncoders;
15 use nihav_core::demuxers::RegisteredDemuxers;
16 use nihav_core::muxers::RegisteredMuxers;
18 use nihav_commonfmt::generic_register_all_decoders;
19 use nihav_commonfmt::generic_register_all_demuxers;
20 use nihav_commonfmt::generic_register_all_encoders;
21 use nihav_commonfmt::generic_register_all_muxers;
23 use nihav_duck::duck_register_all_decoders;
25 use nihav_game::game_register_all_decoders;
26 use nihav_game::game_register_all_demuxers;
28 use nihav_indeo::indeo_register_all_decoders;
30 use nihav_itu::itu_register_all_decoders;
32 use nihav_llaudio::llaudio_register_all_decoders;
33 use nihav_llaudio::llaudio_register_all_demuxers;
35 use nihav_ms::ms_register_all_decoders;
36 use nihav_ms::ms_register_all_encoders;
38 use nihav_qt::qt_register_all_decoders;
40 use nihav_rad::rad_register_all_decoders;
41 use nihav_rad::rad_register_all_demuxers;
43 use nihav_realmedia::realmedia_register_all_decoders;
44 use nihav_realmedia::realmedia_register_all_demuxers;
46 /// Registers all known decoders.
47 pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
48 generic_register_all_decoders(rd);
49 duck_register_all_decoders(rd);
50 game_register_all_decoders(rd);
51 indeo_register_all_decoders(rd);
52 itu_register_all_decoders(rd);
53 llaudio_register_all_decoders(rd);
54 ms_register_all_decoders(rd);
55 qt_register_all_decoders(rd);
56 rad_register_all_decoders(rd);
57 realmedia_register_all_decoders(rd);
60 /// Registers all known demuxers.
61 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
62 generic_register_all_demuxers(rd);
63 game_register_all_demuxers(rd);
64 llaudio_register_all_demuxers(rd);
65 rad_register_all_demuxers(rd);
66 realmedia_register_all_demuxers(rd);
69 /// Registers all known encoders.
70 pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
71 generic_register_all_encoders(re);
72 ms_register_all_encoders(re);
75 /// Registers all known demuxers.
76 pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
77 generic_register_all_muxers(rm);
81 extern crate nihav_registry;
86 use nihav_registry::register::get_codec_description;
89 fn test_descriptions() {
90 let mut rd = RegisteredDecoders::new();
91 nihav_register_all_decoders(&mut rd);
92 let mut has_missing = false;
93 for dec in rd.iter() {
94 print!("decoder {} - ", dec.name);
95 let ret = get_codec_description(dec.name);
96 if let Some(desc) = ret {
103 assert!(!has_missing);