blob: 99c8ad64ca134a9c44df5ce87c64d14909a816b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
//! Umbrella crate to register decoders and demuxers from all known NihAV crates.
extern crate nihav_core;
extern crate nihav_commonfmt;
extern crate nihav_duck;
extern crate nihav_game;
extern crate nihav_indeo;
extern crate nihav_itu;
extern crate nihav_llaudio;
extern crate nihav_ms;
extern crate nihav_qt;
extern crate nihav_rad;
extern crate nihav_realmedia;
extern crate nihav_vivo;
use nihav_core::codecs::RegisteredDecoders;
use nihav_core::codecs::RegisteredEncoders;
use nihav_core::demuxers::RegisteredDemuxers;
use nihav_core::muxers::RegisteredMuxers;
use nihav_commonfmt::generic_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
use nihav_commonfmt::generic_register_all_encoders;
use nihav_commonfmt::generic_register_all_muxers;
use nihav_duck::duck_register_all_decoders;
use nihav_duck::duck_register_all_demuxers;
use nihav_duck::duck_register_all_encoders;
use nihav_game::game_register_all_decoders;
use nihav_game::game_register_all_demuxers;
use nihav_indeo::indeo_register_all_decoders;
use nihav_itu::itu_register_all_decoders;
use nihav_llaudio::llaudio_register_all_decoders;
use nihav_llaudio::llaudio_register_all_demuxers;
use nihav_llaudio::llaudio_register_all_encoders;
use nihav_llaudio::llaudio_register_all_muxers;
use nihav_ms::ms_register_all_decoders;
use nihav_ms::ms_register_all_encoders;
use nihav_qt::qt_register_all_decoders;
use nihav_rad::rad_register_all_decoders;
use nihav_rad::rad_register_all_demuxers;
use nihav_realmedia::realmedia_register_all_decoders;
use nihav_realmedia::realmedia_register_all_demuxers;
use nihav_vivo::vivo_register_all_decoders;
use nihav_vivo::vivo_register_all_demuxers;
/// Registers all known decoders.
pub fn nihav_register_all_decoders(rd: &mut RegisteredDecoders) {
generic_register_all_decoders(rd);
duck_register_all_decoders(rd);
game_register_all_decoders(rd);
indeo_register_all_decoders(rd);
itu_register_all_decoders(rd);
llaudio_register_all_decoders(rd);
ms_register_all_decoders(rd);
qt_register_all_decoders(rd);
rad_register_all_decoders(rd);
realmedia_register_all_decoders(rd);
vivo_register_all_decoders(rd);
}
/// Registers all known demuxers.
pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
duck_register_all_demuxers(rd);
generic_register_all_demuxers(rd);
game_register_all_demuxers(rd);
llaudio_register_all_demuxers(rd);
rad_register_all_demuxers(rd);
realmedia_register_all_demuxers(rd);
vivo_register_all_demuxers(rd);
}
/// Registers all known encoders.
pub fn nihav_register_all_encoders(re: &mut RegisteredEncoders) {
generic_register_all_encoders(re);
duck_register_all_encoders(re);
llaudio_register_all_encoders(re);
ms_register_all_encoders(re);
}
/// Registers all known demuxers.
pub fn nihav_register_all_muxers(rm: &mut RegisteredMuxers) {
generic_register_all_muxers(rm);
llaudio_register_all_muxers(rm);
}
#[cfg(test)]
extern crate nihav_registry;
#[cfg(test)]
mod test {
use super::*;
use nihav_registry::register::get_codec_description;
#[test]
fn test_descriptions() {
let mut rd = RegisteredDecoders::new();
nihav_register_all_decoders(&mut rd);
let mut has_missing = false;
for dec in rd.iter() {
print!("decoder {} - ", dec.name);
let ret = get_codec_description(dec.name);
if let Some(desc) = ret {
println!("{}", desc);
} else {
println!("missing!");
has_missing = true;
}
}
assert!(!has_missing);
}
}
|