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_llaudio;
9 extern crate nihav_rad;
10 extern crate nihav_realmedia;
12 use nihav_core::codecs::RegisteredDecoders;
13 use nihav_core::codecs::RegisteredEncoders;
14 use nihav_core::demuxers::RegisteredDemuxers;
15 use nihav_core::muxers::RegisteredMuxers;
17 use nihav_commonfmt::generic_register_all_decoders;
18 use nihav_commonfmt::generic_register_all_demuxers;
19 use nihav_commonfmt::generic_register_all_encoders;
20 use nihav_commonfmt::generic_register_all_muxers;
22 use nihav_duck::duck_register_all_decoders;
24 use nihav_game::game_register_all_decoders;
25 use nihav_game::game_register_all_demuxers;
27 use nihav_indeo::indeo_register_all_decoders;
29 use nihav_llaudio::llaudio_register_all_decoders;
30 use nihav_llaudio::llaudio_register_all_demuxers;
32 use nihav_ms::ms_register_all_decoders;
33 use nihav_ms::ms_register_all_encoders;
35 use nihav_qt::qt_register_all_decoders;
37 use nihav_rad::rad_register_all_decoders;
38 use nihav_rad::rad_register_all_demuxers;
40 use nihav_realmedia::realmedia_register_all_decoders;
41 use nihav_realmedia::realmedia_register_all_demuxers;
43 /// Registers all known decoders.
44 pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
45 generic_register_all_decoders(rd);
46 duck_register_all_decoders(rd);
47 game_register_all_decoders(rd);
48 indeo_register_all_decoders(rd);
49 llaudio_register_all_decoders(rd);
50 ms_register_all_decoders(rd);
51 qt_register_all_decoders(rd);
52 rad_register_all_decoders(rd);
53 realmedia_register_all_decoders(rd);
56 /// Registers all known demuxers.
57 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
58 generic_register_all_demuxers(rd);
59 game_register_all_demuxers(rd);
60 llaudio_register_all_demuxers(rd);
61 rad_register_all_demuxers(rd);
62 realmedia_register_all_demuxers(rd);
65 /// Registers all known encoders.
66 pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
67 generic_register_all_encoders(re);
68 ms_register_all_encoders(re);
71 /// Registers all known demuxers.
72 pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
73 generic_register_all_muxers(rm);
77 extern crate nihav_registry;
82 use nihav_registry::register::get_codec_description;
85 fn test_descriptions() {
86 let mut rd = RegisteredDecoders::new();
87 nihav_register_all_decoders(&mut rd);
88 let mut has_missing = false;
89 for dec in rd.iter() {
90 print!("decoder {} - ", dec.name);
91 let ret = get_codec_description(dec.name);
92 if let Some(desc) = ret {
99 assert!(!has_missing);