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::RegisteredPacketisers;
17 use nihav_core::codecs::RegisteredEncoders;
18 use nihav_core::demuxers::RegisteredDemuxers;
19 use nihav_core::muxers::RegisteredMuxers;
21 use nihav_commonfmt::*;
25 use nihav_indeo::indeo_register_all_decoders;
26 use nihav_itu::itu_register_all_decoders;
30 use nihav_qt::qt_register_all_decoders;
32 use nihav_realmedia::*;
35 /// Registers all known decoders.
36 pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
37 generic_register_all_decoders(rd);
38 duck_register_all_decoders(rd);
39 flash_register_all_decoders(rd);
40 game_register_all_decoders(rd);
41 indeo_register_all_decoders(rd);
42 itu_register_all_decoders(rd);
43 llaudio_register_all_decoders(rd);
44 mpeg_register_all_decoders(rd);
45 ms_register_all_decoders(rd);
46 qt_register_all_decoders(rd);
47 rad_register_all_decoders(rd);
48 realmedia_register_all_decoders(rd);
49 vivo_register_all_decoders(rd);
52 /// Registers all known packetisers.
53 pub fn nihav_register_all_packetisers(rp: &mut RegisteredPacketisers) {
54 mpeg_register_all_packetisers(rp);
57 /// Registers all known demuxers.
58 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
59 duck_register_all_demuxers(rd);
60 generic_register_all_demuxers(rd);
61 flash_register_all_demuxers(rd);
62 game_register_all_demuxers(rd);
63 llaudio_register_all_demuxers(rd);
64 rad_register_all_demuxers(rd);
65 realmedia_register_all_demuxers(rd);
66 vivo_register_all_demuxers(rd);
69 /// Registers all known encoders.
70 pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
71 flash_register_all_encoders(re);
72 generic_register_all_encoders(re);
73 duck_register_all_encoders(re);
74 llaudio_register_all_encoders(re);
75 ms_register_all_encoders(re);
78 /// Registers all known demuxers.
79 pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
80 flash_register_all_muxers(rm);
81 generic_register_all_muxers(rm);
82 llaudio_register_all_muxers(rm);
86 extern crate nihav_registry;
91 use nihav_registry::register::get_codec_description;
94 fn test_descriptions() {
95 let mut rd = RegisteredDecoders::new();
96 nihav_register_all_decoders(&mut rd);
97 let mut has_missing = false;
98 for dec in rd.iter() {
99 print!("decoder {} - ", dec.name);
100 let ret = get_codec_description(dec.name);
101 if let Some(desc) = ret {
102 println!("{}", desc);
104 println!("missing!");
108 assert!(!has_missing);