1 extern crate nihav_core;
2 extern crate nihav_commonfmt;
3 extern crate nihav_duck;
4 extern crate nihav_game;
5 extern crate nihav_indeo;
6 extern crate nihav_rad;
7 extern crate nihav_realmedia;
9 use nihav_core::codecs::RegisteredDecoders;
10 use nihav_core::demuxers::RegisteredDemuxers;
12 use nihav_commonfmt::codecs::generic_register_all_codecs;
13 use nihav_commonfmt::demuxers::generic_register_all_demuxers;
15 use nihav_duck::codecs::duck_register_all_codecs;
17 use nihav_game::codecs::game_register_all_codecs;
18 use nihav_game::demuxers::game_register_all_demuxers;
20 use nihav_indeo::codecs::indeo_register_all_codecs;
22 use nihav_rad::codecs::rad_register_all_codecs;
23 use nihav_rad::demuxers::rad_register_all_demuxers;
25 use nihav_realmedia::codecs::realmedia_register_all_codecs;
26 use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
28 pub fn nihav_register_all_codecs(rd: &mut RegisteredDecoders) {
29 generic_register_all_codecs(rd);
30 duck_register_all_codecs(rd);
31 game_register_all_codecs(rd);
32 indeo_register_all_codecs(rd);
33 rad_register_all_codecs(rd);
34 realmedia_register_all_codecs(rd);
37 pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
38 generic_register_all_demuxers(rd);
39 game_register_all_demuxers(rd);
40 rad_register_all_demuxers(rd);
41 realmedia_register_all_demuxers(rd);
47 use nihav_core::register::get_codec_description;
50 fn test_descriptions() {
51 let mut rd = RegisteredDecoders::new();
52 nihav_register_all_codecs(&mut rd);
53 let mut has_missing = false;
54 for dec in rd.iter() {
55 print!("decoder {} - ", dec.name);
56 let ret = get_codec_description(dec.name);
57 if let Some(desc) = ret {
64 assert!(!has_missing);