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::*;
24 use nihav_indeo::indeo_register_all_decoders;
25 use nihav_itu::itu_register_all_decoders;
29 use nihav_qt::qt_register_all_decoders;
31 use nihav_realmedia::*;
34 /// Registers all known decoders.
35 pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
36 generic_register_all_decoders(rd);
37 duck_register_all_decoders(rd);
38 flash_register_all_decoders(rd);
39 game_register_all_decoders(rd);
40 indeo_register_all_decoders(rd);
41 itu_register_all_decoders(rd);
42 llaudio_register_all_decoders(rd);
43 mpeg_register_all_decoders(rd);
44 ms_register_all_decoders(rd);
45 qt_register_all_decoders(rd);
46 rad_register_all_decoders(rd);
47 realmedia_register_all_decoders(rd);
48 vivo_register_all_decoders(rd);
51 /// Registers all known demuxers.
52 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
53 duck_register_all_demuxers(rd);
54 generic_register_all_demuxers(rd);
55 flash_register_all_demuxers(rd);
56 game_register_all_demuxers(rd);
57 llaudio_register_all_demuxers(rd);
58 rad_register_all_demuxers(rd);
59 realmedia_register_all_demuxers(rd);
60 vivo_register_all_demuxers(rd);
63 /// Registers all known encoders.
64 pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
65 flash_register_all_encoders(re);
66 generic_register_all_encoders(re);
67 duck_register_all_encoders(re);
68 llaudio_register_all_encoders(re);
69 ms_register_all_encoders(re);
72 /// Registers all known demuxers.
73 pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
74 flash_register_all_muxers(rm);
75 generic_register_all_muxers(rm);
76 llaudio_register_all_muxers(rm);
80 extern crate nihav_registry;
85 use nihav_registry::register::get_codec_description;
88 fn test_descriptions() {
89 let mut rd = RegisteredDecoders::new();
90 nihav_register_all_decoders(&mut rd);
91 let mut has_missing = false;
92 for dec in rd.iter() {
93 print!("decoder {} - ", dec.name);
94 let ret = get_codec_description(dec.name);
95 if let Some(desc) = ret {
102 assert!(!has_missing);