]> git.nihav.org Git - nihav.git/commitdiff
make all codec crates export just register_all functions and document them
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 17 Feb 2020 13:01:21 +0000 (14:01 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 17 Feb 2020 13:01:21 +0000 (14:01 +0100)
56 files changed:
nihav-allstuff/src/lib.rs
nihav-commonfmt/src/codecs/aac.rs
nihav-commonfmt/src/codecs/atrac3.rs
nihav-commonfmt/src/codecs/clearvideo.rs
nihav-commonfmt/src/codecs/mod.rs
nihav-commonfmt/src/codecs/sipro.rs
nihav-commonfmt/src/codecs/ts102366.rs
nihav-commonfmt/src/demuxers/mod.rs
nihav-commonfmt/src/lib.rs
nihav-duck/src/codecs/dkadpcm.rs
nihav-duck/src/codecs/mod.rs
nihav-duck/src/codecs/on2avc.rs
nihav-duck/src/codecs/truemotion1.rs
nihav-duck/src/codecs/truemotion2.rs
nihav-duck/src/codecs/truemotion2x.rs
nihav-duck/src/codecs/truemotionrt.rs
nihav-duck/src/codecs/vp3.rs
nihav-duck/src/codecs/vp5.rs
nihav-duck/src/codecs/vp6.rs
nihav-duck/src/codecs/vp7.rs
nihav-duck/src/lib.rs
nihav-game/src/codecs/bmv.rs
nihav-game/src/codecs/bmv3.rs
nihav-game/src/codecs/gremlinvideo.rs
nihav-game/src/codecs/midivid.rs
nihav-game/src/codecs/mod.rs
nihav-game/src/codecs/vmd.rs
nihav-game/src/demuxers/mod.rs
nihav-game/src/lib.rs
nihav-indeo/src/codecs/imc.rs
nihav-indeo/src/codecs/indeo2.rs
nihav-indeo/src/codecs/indeo3.rs
nihav-indeo/src/codecs/indeo4.rs
nihav-indeo/src/codecs/indeo5.rs
nihav-indeo/src/codecs/intel263.rs
nihav-indeo/src/codecs/mod.rs
nihav-indeo/src/lib.rs
nihav-rad/src/codecs/bink2.rs
nihav-rad/src/codecs/binkaud.rs
nihav-rad/src/codecs/binkvid.rs
nihav-rad/src/codecs/mod.rs
nihav-rad/src/codecs/smacker.rs
nihav-rad/src/demuxers/mod.rs
nihav-rad/src/lib.rs
nihav-realmedia/src/codecs/cook.rs
nihav-realmedia/src/codecs/mod.rs
nihav-realmedia/src/codecs/ra144.rs
nihav-realmedia/src/codecs/ra288.rs
nihav-realmedia/src/codecs/ralf.rs
nihav-realmedia/src/codecs/rv10.rs
nihav-realmedia/src/codecs/rv20.rs
nihav-realmedia/src/codecs/rv30.rs
nihav-realmedia/src/codecs/rv40.rs
nihav-realmedia/src/codecs/rv60.rs
nihav-realmedia/src/demuxers/mod.rs
nihav-realmedia/src/lib.rs

index 4f712f3cd704ee178c21eb74d68fdfeba2fb9f5a..eb8e9a3a007728df2c77ce2f54e4d5465c6e6715 100644 (file)
@@ -9,21 +9,21 @@ extern crate nihav_realmedia;
 use nihav_core::codecs::RegisteredDecoders;
 use nihav_core::demuxers::RegisteredDemuxers;
 
-use nihav_commonfmt::codecs::generic_register_all_codecs;
-use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+use nihav_commonfmt::generic_register_all_codecs;
+use nihav_commonfmt::generic_register_all_demuxers;
 
-use nihav_duck::codecs::duck_register_all_codecs;
+use nihav_duck::duck_register_all_codecs;
 
-use nihav_game::codecs::game_register_all_codecs;
-use nihav_game::demuxers::game_register_all_demuxers;
+use nihav_game::game_register_all_codecs;
+use nihav_game::game_register_all_demuxers;
 
-use nihav_indeo::codecs::indeo_register_all_codecs;
+use nihav_indeo::indeo_register_all_codecs;
 
-use nihav_rad::codecs::rad_register_all_codecs;
-use nihav_rad::demuxers::rad_register_all_demuxers;
+use nihav_rad::rad_register_all_codecs;
+use nihav_rad::rad_register_all_demuxers;
 
-use nihav_realmedia::codecs::realmedia_register_all_codecs;
-use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
+use nihav_realmedia::realmedia_register_all_codecs;
+use nihav_realmedia::realmedia_register_all_demuxers;
 
 pub fn nihav_register_all_codecs(rd: &mut RegisteredDecoders) {
     generic_register_all_codecs(rd);
index c46366c04df4d1c5ba5c164c60ed1c0652b65405..290868a193de4102aac9da4abf3463f896377492 100644 (file)
@@ -1267,8 +1267,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::test_decode_audio;
-    use crate::codecs::generic_register_all_codecs;
-    use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
+    use crate::generic_register_all_codecs;
+    use nihav_realmedia::realmedia_register_all_demuxers;
     #[test]
     fn test_aac() {
         let mut dmx_reg = RegisteredDemuxers::new();
index efd608c2916c143b5a7d9bddc3cb2caa29a27cdd..044fea69685d1d02863beb42eaa28bba2d3a8098 100644 (file)
@@ -704,8 +704,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::test_decode_audio;
-    use crate::codecs::generic_register_all_codecs;
-    use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
+    use crate::generic_register_all_codecs;
+    use nihav_realmedia::realmedia_register_all_demuxers;
     #[test]
     fn test_atrac3() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 03aa36d2f7f2a54e1448714ced1ae6aad4d0cfa6..47357311668dcfb1d7a59efe4ebaffddd626be36 100644 (file)
@@ -718,8 +718,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::generic_register_all_codecs;
-    use crate::demuxers::generic_register_all_demuxers;
+    use crate::generic_register_all_codecs;
+    use crate::generic_register_all_demuxers;
     #[test]
     fn test_clv() {
         let mut dmx_reg = RegisteredDemuxers::new();
index fa7b2f1cffb795edc181977f159a9158308a4de6..1421613ca40f432b1d353d2fd6b6ef99d52dcd42 100644 (file)
@@ -36,6 +36,7 @@ const DECODERS: &[DecoderInfo] = &[
     DecoderInfo { name: "aac", get_decoder: aac::get_decoder },
 ];
 
+/// Registers all available codecs provided by this crate.
 pub fn generic_register_all_codecs(rd: &mut RegisteredDecoders) {
     for decoder in DECODERS.iter() {
         rd.add_decoder(decoder.clone());
index 22181cb844501b358efcb9af31be92e320f282bd..bd72643b663103a6585d9cafe50f4b340d826364 100644 (file)
@@ -745,8 +745,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::test_decode_audio;
-    use crate::codecs::generic_register_all_codecs;
-    use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
+    use crate::generic_register_all_codecs;
+    use nihav_realmedia::realmedia_register_all_demuxers;
     #[test]
     fn test_sipro() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 55460497a651cb875f899ef2cc68400ce3a9857a..cdad8900f2aebfe92b0393cdbc399cfd1290ad6a 100644 (file)
@@ -1249,8 +1249,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::test_decode_audio;
-    use crate::codecs::generic_register_all_codecs;
-    use nihav_realmedia::demuxers::realmedia_register_all_demuxers;
+    use crate::generic_register_all_codecs;
+    use nihav_realmedia::realmedia_register_all_demuxers;
     #[test]
     fn test_ts102366() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 9c05c1859b051a1a947e44815b426d53d93e6ef7..05518e16e6961396522e8abb69c2920ab76176b8 100644 (file)
@@ -15,6 +15,7 @@ const DEMUXERS: &[&DemuxerCreator] = &[
     &avi::AVIDemuxerCreator {},
 ];
 
+/// Registers all available demuxers provided by this crate.
 pub fn generic_register_all_demuxers(rd: &mut RegisteredDemuxers) {
     for demuxer in DEMUXERS.iter() {
         rd.add_demuxer(*demuxer);
index bcb20ed71b24160bac4252d2b0557be6d5a503b7..ce931feb321cb81f43d13819a874a0ee069802d7 100644 (file)
@@ -4,10 +4,15 @@ extern crate nihav_core;
 #[allow(clippy::unreadable_literal)]
 #[allow(clippy::too_many_arguments)]
 #[allow(clippy::excessive_precision)]
-pub mod codecs;
+mod codecs;
 
+#[cfg(feature="decoders")]
+pub use codecs::generic_register_all_codecs;
+
+#[cfg(feature="demuxers")]
+mod demuxers;
 #[cfg(feature="demuxers")]
-pub mod demuxers;
+pub use demuxers::generic_register_all_demuxers;
 
 #[cfg(test)]
 extern crate nihav_realmedia;
index 92e243537b5830d112ef3b7918562491332be814..b662a747ab329fe4180bfc423a299a643087c3c4 100644 (file)
@@ -180,8 +180,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_dk3() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 40e7a5f2cc999ff7c9034e504164915f312d139f..a094f2d345404a7baa92d04ffe22e349df930e12 100644 (file)
@@ -69,6 +69,7 @@ const DUCK_CODECS: &[DecoderInfo] = &[
     DecoderInfo { name: "on2avc-501", get_decoder: on2avc::get_decoder_501 },
 ];
 
+/// Registers all available codecs provided by this crate.
 pub fn duck_register_all_codecs(rd: &mut RegisteredDecoders) {
     for decoder in DUCK_CODECS.iter() {
         rd.add_decoder(decoder.clone());
index dc229b042514988940bee149b811e607bada779f..b0605017555861be3ecef6fc9dd024dc782fd81c 100644 (file)
@@ -1061,8 +1061,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_avc() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 4af75d1f664770de70ec7b843c0d7a2878035406..7fc74ff5a21c676ba068d0ce83a0824ae7777875 100644 (file)
@@ -668,8 +668,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_tm1() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 32fb73280a0d8d785c050efa4f29062319f5ac24..2ee8b24f593bde977ddcfefea708b32cc6943074 100644 (file)
@@ -590,8 +590,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_tm2() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 8efd66fb9d64bd8dd793920e0fa046a83cdbd19c..165642a080f3a0fb91d9ce8bd4874e66c63f50a4 100644 (file)
@@ -701,8 +701,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_tm2x() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 2ea7a1b3459ccf7fbe1bcd3841cfdfb4aacfb0ac..8fd2a8e41dd4c3eef3597b8b1dd9c14aa202ea7a 100644 (file)
@@ -93,8 +93,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_tmrt() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 8c72f7ff0677e540b397a9abd228aa2891b531f2..3b8560ee0a1bd09d2c24f1ba906853323ff4dbc3 100644 (file)
@@ -1876,8 +1876,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
 
     #[test]
     fn test_vp30() {
index f6a649ec11e398660bae13ce6f5e8305a1a3cf2f..35244df9da80286e70df20ccc2dbf963f5ea6443 100644 (file)
@@ -286,8 +286,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
 
     #[test]
     fn test_vp5() {
index fdf62527eacf66a22732a812bd6e81fff1c55765..da0fe400d1e93f31d003ccf6388dd9cbb10e87ce 100644 (file)
@@ -727,8 +727,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
 
     #[test]
     fn test_vp6() {
index 543d09374c2f3754a5212d002944c5a8d3d8ff16..9b3eef31d34ce62bcbbe40d340febe10922675a7 100644 (file)
@@ -1431,8 +1431,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::duck_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::duck_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
 
     #[test]
     fn test_vp7() {
index 40b5f2b198e71d009328867deb7120456e18002f..1760338a58897655352f2b859c42635b61bd8cf6 100644 (file)
@@ -1,6 +1,8 @@
 extern crate nihav_core;
 
-pub mod codecs;
+mod codecs;
+
+pub use codecs::duck_register_all_codecs;
 
 #[cfg(test)]
 extern crate nihav_commonfmt;
index 1f4a660569ddda415ceb1fa93b836b2dbb5c19e8..bdd18e49661eea472eefdc470c20abee30a6ba1f 100644 (file)
@@ -308,8 +308,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::game_register_all_codecs;
-    use crate::demuxers::game_register_all_demuxers;
+    use crate::game_register_all_codecs;
+    use crate::game_register_all_demuxers;
     #[test]
     fn test_bmv_video() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 8e71b8b9c35a49a4d5cab729fdd04c2c5c0f8ee8..3fafb6d38dcb088a374bc5323d7e6ddfe3e9cd36 100644 (file)
@@ -604,8 +604,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::game_register_all_codecs;
-    use crate::demuxers::game_register_all_demuxers;
+    use crate::game_register_all_codecs;
+    use crate::game_register_all_demuxers;
     #[test]
     fn test_bmv_video() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 0ec38619f01aec0af0f09364a6e0740b42999fa9..096c7b614438323a23ec07fa43503b8a187d8594 100644 (file)
@@ -563,8 +563,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::test_file_decoding;
-    use crate::codecs::game_register_all_codecs;
-    use crate::demuxers::game_register_all_demuxers;
+    use crate::game_register_all_codecs;
+    use crate::game_register_all_demuxers;
     #[test]
     fn test_gdv() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 13c954a1505270fd7685d8cdc7f4a26cebca3162..df788f6e009cc3ceee911dd02d588da73c86276b 100644 (file)
@@ -184,8 +184,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::game_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::game_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_midivid_video() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 6f707e98bd1578046bbca36640f827ef28af1617..a3d5555276d73f8eb79f66a2e11de01dc88e527a 100644 (file)
@@ -36,6 +36,7 @@ const GAME_CODECS: &[DecoderInfo] = &[
     DecoderInfo { name: "midivid", get_decoder: midivid::get_decoder_video },
 ];
 
+/// Registers all available codecs provided by this crate.
 pub fn game_register_all_codecs(rd: &mut RegisteredDecoders) {
     for decoder in GAME_CODECS.iter() {
         rd.add_decoder(decoder.clone());
index a228707bb0fce5d36b39bd66a93c37dd46eb9156..1f4964e7d2d9f487ce2faf514fbec8f51ad2a5c3 100644 (file)
@@ -452,8 +452,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::game_register_all_codecs;
-    use crate::demuxers::game_register_all_demuxers;
+    use crate::game_register_all_codecs;
+    use crate::game_register_all_demuxers;
     #[test]
     fn test_vmd_video() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 7dca6d236e0ece6c186074b18acbc79007d45678..236b3cf8d229f9a16e45d44f4e7757eeed6651a5 100644 (file)
@@ -23,6 +23,7 @@ const GAME_DEMUXERS: &[&DemuxerCreator] = &[
     &vmd::VMDDemuxerCreator {},
 ];
 
+/// Registers all available demuxers provided by this crate.
 pub fn game_register_all_demuxers(rd: &mut RegisteredDemuxers) {
     for demuxer in GAME_DEMUXERS.iter() {
         rd.add_demuxer(*demuxer);
index d7a15d0e109a5c1bda8a448fb620b62a6de72cee..20207be61cfb848f1fd3e7abab86c52bdf4e5f9e 100644 (file)
@@ -1,4 +1,6 @@
 extern crate nihav_core;
 
-pub mod codecs;
-pub mod demuxers;
\ No newline at end of file
+mod codecs;
+pub use codecs::game_register_all_codecs;
+mod demuxers;
+pub use demuxers::game_register_all_demuxers;
\ No newline at end of file
index b969a14ecccad5516dd32342efe8f4dbc930ddb3..e49da707b21fdcf8079889125d112b0aec8871d3 100644 (file)
@@ -1112,8 +1112,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::indeo_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::indeo_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_imc() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 8126be0eaa2fb22e00e76090051d51e2cfc611a3..2e1d7c65c77d04c71ca3a40791e61d5021b144ea 100644 (file)
@@ -373,8 +373,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::indeo_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::indeo_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_indeo2() {
         let mut dmx_reg = RegisteredDemuxers::new();
index fe9333be1c397b43710e1138db1a9290010a38ef..ea302abd3dc82f2e0296369c09f6e348f4af2565 100644 (file)
@@ -801,8 +801,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::indeo_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::indeo_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_indeo3() {
         let mut dmx_reg = RegisteredDemuxers::new();
index d6bb283ca9e04773c6343a27c0371abc4d8b0190..9ae4158970fa5b7a4e2646bb414dec866880b2eb 100644 (file)
@@ -770,8 +770,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::indeo_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::indeo_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_indeo4() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 47f24379bfa61681b00f1f7444dbc7708370ffb4..933958d787b32cb3832142cdf557421d1d0700a1 100644 (file)
@@ -723,8 +723,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::indeo_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::indeo_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_indeo5() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 3d767f9349a6c23edd3623cae6826f84f8048407..18c759dcc76a189be9e53023c02f77db287adec0 100644 (file)
@@ -419,8 +419,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::indeo_register_all_codecs;
-    use nihav_commonfmt::demuxers::generic_register_all_demuxers;
+    use crate::indeo_register_all_codecs;
+    use nihav_commonfmt::generic_register_all_demuxers;
     #[test]
     fn test_intel263() {
         let mut dmx_reg = RegisteredDemuxers::new();
index bc343fe388d998c76c152922253c7655efb3ce56..4ab5e8fec4a712e037cc28d10860293479a51614 100644 (file)
@@ -46,6 +46,7 @@ const INDEO_CODECS: &[DecoderInfo] = &[
     DecoderInfo { name: "iac", get_decoder: imc::get_decoder_iac },
 ];
 
+/// Registers all available codecs provided by this crate.
 pub fn indeo_register_all_codecs(rd: &mut RegisteredDecoders) {
     for decoder in INDEO_CODECS.iter() {
         rd.add_decoder(decoder.clone());
index 78bb0608390e96ee3c713ce0ca25f9ce57e76c17..1ceba4e5e2b11820adcf43ad239fd4ebcf1f2ae0 100644 (file)
@@ -6,7 +6,9 @@ extern crate nihav_core;
 #[allow(clippy::too_many_arguments)]
 #[allow(clippy::useless_let_if_seq)]
 #[allow(clippy::verbose_bit_mask)]
-pub mod codecs;
+mod codecs;
+
+pub use codecs::indeo_register_all_codecs;
 
 #[cfg(test)]
 extern crate nihav_commonfmt;
\ No newline at end of file
index e1d5b5979b85628253c7f5eba78652c6bfdde452..5f1fefdad043096743b7de4bf399d2e0f6bfefee 100644 (file)
@@ -1951,8 +1951,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::rad_register_all_codecs;
-    use crate::demuxers::rad_register_all_demuxers;
+    use crate::rad_register_all_codecs;
+    use crate::rad_register_all_demuxers;
     #[test]
     fn test_bink2() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 48bc50857405aecd49afc056dd69ca51c7159938..7e34739f07a2f6dbb8992ead35b3aed168e96e5a 100644 (file)
@@ -291,8 +291,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::rad_register_all_codecs;
-    use crate::demuxers::rad_register_all_demuxers;
+    use crate::rad_register_all_codecs;
+    use crate::rad_register_all_demuxers;
 
     #[test]
     fn test_bink_audio() {
index ac434adea52248ffef70fb5b271c18a66f24610f..920d8d560eb74339913fbfc665047a43064c1d2d 100644 (file)
@@ -1272,8 +1272,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::rad_register_all_codecs;
-    use crate::demuxers::rad_register_all_demuxers;
+    use crate::rad_register_all_codecs;
+    use crate::rad_register_all_demuxers;
     #[test]
     fn test_binkvid() {
         let mut dmx_reg = RegisteredDemuxers::new();
index eec8c4c4084e21d48a3b2b636f22695fd52ef3c8..2e279b619d757bcd516571fc9d5eab80f03251dc 100644 (file)
@@ -28,6 +28,7 @@ const RAD_CODECS: &[DecoderInfo] = &[
     DecoderInfo { name: "bink2-video", get_decoder: bink2::get_decoder },
 ];
 
+/// Registers all available codecs provided by this crate.
 pub fn rad_register_all_codecs(rd: &mut RegisteredDecoders) {
     for decoder in RAD_CODECS.iter() {
         rd.add_decoder(decoder.clone());
index 86b022c67d2cd85ec58a3296baf2331e651b4658..b8fe85a018ef26d670c9cdd71656519987e3a2e4 100644 (file)
@@ -604,8 +604,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::rad_register_all_codecs;
-    use crate::demuxers::rad_register_all_demuxers;
+    use crate::rad_register_all_codecs;
+    use crate::rad_register_all_demuxers;
     #[test]
     fn test_smkvid() {
         let mut dmx_reg = RegisteredDemuxers::new();
index c88fdd69ad723c91c06161954a94a178e239fdfa..1bdf74dfeef79a447a77dedf30ed3b12f257f121 100644 (file)
@@ -17,6 +17,7 @@ const RAD_DEMUXERS: &[&DemuxerCreator] = &[
     &bink::BinkDemuxerCreator {},
 ];
 
+/// Registers all available demuxers provided by this crate.
 pub fn rad_register_all_demuxers(rd: &mut RegisteredDemuxers) {
     for demuxer in RAD_DEMUXERS.iter() {
         rd.add_demuxer(*demuxer);
index 1b566da815a3b83eb1a9981ea50ad9ea106b170f..604d0ca590356a621f3e0165b158ee0d2162d6e1 100644 (file)
@@ -9,7 +9,12 @@ extern crate nihav_core;
 #[allow(clippy::too_many_arguments)]
 #[allow(clippy::unreadable_literal)]
 #[allow(clippy::useless_let_if_seq)]
-pub mod codecs;
+mod codecs;
+#[cfg(feature="decoders")]
+pub use codecs::rad_register_all_codecs;
+
 #[cfg(feature="demuxers")]
 #[allow(clippy::cast_lossless)]
-pub mod demuxers;
\ No newline at end of file
+mod demuxers;
+#[cfg(feature="demuxers")]
+pub use demuxers::rad_register_all_demuxers;
index fe5ae71995dd936b2e05c47d73d2bb05c6202653..85c8853ff3f9c291564d0eedc940d7c4226c0099 100644 (file)
@@ -685,8 +685,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_cook() {
         let mut dmx_reg = RegisteredDemuxers::new();
index c5ff9bcc232dc5ff9bef8c7eeed38d696222d638..cbcdb838c16a45fcc38183a644b71a740a2cfce3 100644 (file)
@@ -71,6 +71,7 @@ const RM_CODECS: &[DecoderInfo] = &[
     DecoderInfo { name: "ralf", get_decoder: ralf::get_decoder },
 ];
 
+/// Registers all available codecs provided by this crate.
 pub fn realmedia_register_all_codecs(rd: &mut RegisteredDecoders) {
     for decoder in RM_CODECS.iter() {
         rd.add_decoder(decoder.clone());
index 35090a657dc398829aa25e4dd30bdfcab0ddbd2b..842c4d1964f3221d3436882504991b63bacd1502 100644 (file)
@@ -320,8 +320,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_ra144() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 416c64cc8858a076a0b0c1a84f8cef9e8205d765..a041d057c1a866a680c6c19401cc5b8c24363f4d 100644 (file)
@@ -210,8 +210,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_ra288() {
         let mut dmx_reg = RegisteredDemuxers::new();
index c16075bcb1df316c69a9e98d5eee5d0830b34f4e..fde7648053cdfbc4efd642087bd3cd8ef254bee7 100644 (file)
@@ -480,8 +480,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_ralf() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 6a7325fc7f4f542a1a64a2306d816a47c0d53930..320968ad689e9bf11c05d920996229ed3621e3d3 100644 (file)
@@ -464,8 +464,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_rv10() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 3b7911089c6c6a609ab6f7ca18ad53de0821fde2..b3f1e560e0e2e1ee64ccc6c3f4239dfcea264b1d 100644 (file)
@@ -528,8 +528,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_rv20() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 6da3fe2011cbece534e3c3c510cfcf68330343d0..e38c89cc2580f6685ca873350cf0b41eccce723d 100644 (file)
@@ -173,8 +173,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_rv30() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 82f75f25c5dabf362dca243ef27eb8cf7bbe9e7a..5f95f0a966fe88ab6c411923d1d7aeef5c00f5e5 100644 (file)
@@ -366,8 +366,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_rv40() {
         let mut dmx_reg = RegisteredDemuxers::new();
index 14b487dcec4f0643c57efd6eceb9e889a2b4135c..801f8c212706df7733f8039686251412851afb36 100644 (file)
@@ -1529,8 +1529,8 @@ mod test {
     use nihav_core::codecs::RegisteredDecoders;
     use nihav_core::demuxers::RegisteredDemuxers;
     use nihav_core::test::dec_video::*;
-    use crate::codecs::realmedia_register_all_codecs;
-    use crate::demuxers::realmedia_register_all_demuxers;
+    use crate::realmedia_register_all_codecs;
+    use crate::realmedia_register_all_demuxers;
     #[test]
     fn test_rv60() {
         let mut dmx_reg = RegisteredDemuxers::new();
index c5825b3ffc553d2aac21e1ea90187453e4871384..e6f8a2ced33e2a5a732f8ef7dda406af6c00a6c6 100644 (file)
@@ -16,6 +16,7 @@ const RM_DEMUXERS: &[&DemuxerCreator] = &[
     &realmedia::RealIVRDemuxerCreator {},
 ];
 
+/// Registers all available demuxers provided by this crate.
 pub fn realmedia_register_all_demuxers(rd: &mut RegisteredDemuxers) {
     for demuxer in RM_DEMUXERS.iter() {
         rd.add_demuxer(*demuxer);
index 412982e9925a94fea292390aff08643a3a2aab01..66e001acbc1982118c4b48b15bac99c69491ffb3 100644 (file)
@@ -9,10 +9,15 @@ extern crate nihav_core;
 #[allow(clippy::too_many_arguments)]
 #[allow(clippy::unreadable_literal)]
 #[allow(clippy::useless_let_if_seq)]
-pub mod codecs;
+mod codecs;
+#[cfg(feature="decoders")]
+pub use codecs::realmedia_register_all_codecs;
+
 #[cfg(feature="demuxers")]
 #[allow(clippy::cast_lossless)]
 #[allow(clippy::too_many_arguments)]
 #[allow(clippy::unreadable_literal)]
 #[allow(clippy::useless_let_if_seq)]
-pub mod demuxers;
\ No newline at end of file
+mod demuxers;
+#[cfg(feature="demuxers")]
+pub use demuxers::realmedia_register_all_demuxers;
\ No newline at end of file