#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_gdv() {
- test_file_decoding("gdv", "assets/intro1.gdv", Some(10), true, false, None);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ game_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ game_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("gdv", "assets/intro1.gdv", Some(10), true, false, None, &dmx_reg, &dec_reg);
}
}
path = "../nihav-core"
features = ["h263", "fft", "dsp_window"]
+[dev-dependencies]
+nihav_commonfmt = { path = "../nihav-commonfmt" }
+
[features]
default = ["all_decoders"]
#[cfg(test)]
mod test {
- use crate::test::dec_video::*;
+ 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;
#[test]
fn test_imc() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ generic_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ indeo_register_all_codecs(&mut dec_reg);
+
// let file = "assets/neal73_saber.avi";
// let file = "assets/IMC/hvalen.avi";
let file = "assets/IMC/8khz.avi";
// let file = "assets/STsKlassFist-1a.avi";
// let file = "assets/IMC/Angel Bday.avi";
- test_decode_audio("avi", file, None, "imc");
+ test_decode_audio("avi", file, None, "imc", &dmx_reg, &dec_reg);
//test_file_decoding("avi", file, None, false, true, None);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_indeo2() {
- test_file_decoding("avi", "assets/laser05.avi", Some(10), true, false, None);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ generic_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ indeo_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("avi", "assets/laser05.avi", Some(10), true, false, None, &dmx_reg, &dec_reg);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_indeo3() {
- test_file_decoding("avi", "assets/iv32_example.avi", Some(10), true, false, None);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ generic_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ indeo_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("avi", "assets/iv32_example.avi", Some(10), true, false, None, &dmx_reg, &dec_reg);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_indeo4() {
- test_file_decoding("avi", "assets/IV4/volcano.avi", /*None*/Some(16), true, false, None/*Some("iv4")*/);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ generic_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ indeo_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("avi", "assets/IV4/volcano.avi", /*None*/Some(16), true, false, None/*Some("iv4")*/, &dmx_reg, &dec_reg);
//panic!("the end");
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_indeo5() {
- test_file_decoding("avi", "assets/IV5/sample.avi", /*None*/Some(2), true, false, None);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ generic_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ indeo_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("avi", "assets/IV5/sample.avi", /*None*/Some(2), true, false, None, &dmx_reg, &dec_reg);
// test_file_decoding("avi", "assets/IV5/W32mdl_1.avi", None/*Some(2)*/, true, false, Some("iv5"));
//panic!("the end");
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_intel263() {
- test_file_decoding("avi", "assets/neal73_saber.avi", Some(16), true, false, None/*Some("i263")*/);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ generic_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ indeo_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("avi", "assets/neal73_saber.avi", Some(16), true, false, None/*Some("i263")*/, &dmx_reg, &dec_reg);
}
}
extern crate nihav_core;
pub mod codecs;
+
+#[cfg(test)]
+extern crate nihav_commonfmt;
\ No newline at end of file
#[cfg(test)]
mod test {
- use crate::test::dec_video::*;
+ 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;
#[test]
fn test_cook() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
// let file = "assets/RV/rv30_weighted_mc.rm";
let file = "assets/RV/multichannel.rma";
- test_decode_audio("realmedia", file, Some(2000), "cook");
+ test_decode_audio("realmedia", file, Some(2000), "cook", &dmx_reg, &dec_reg);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::*;
+ 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;
#[test]
fn test_ra144() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
let file = "assets/RV/ra3_in_rm_file.rm";
- test_decode_audio("realmedia", file, Some(5000), "ra14.4");
+ test_decode_audio("realmedia", file, Some(5000), "ra14.4", &dmx_reg, &dec_reg);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::*;
+ 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;
#[test]
fn test_ra288() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
let file = "assets/RV/A0000044.rm";
- test_decode_audio("realmedia", file, Some(5000), "ra28.8");
+ test_decode_audio("realmedia", file, Some(5000), "ra28.8", &dmx_reg, &dec_reg);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::*;
+ 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;
#[test]
fn test_ralf() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
let file = "assets/RV/rv40_ralf.rmvb";
- test_decode_audio("realmedia", file, Some(2000), "ralf");
+ test_decode_audio("realmedia", file, Some(2000), "ralf", &dmx_reg, &dec_reg);
//panic!("end");
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_rv10() {
- test_file_decoding("realmedia", "assets/RV/rv10_dnet_640x352_realvideo_encoder_4.0.rm", Some(1000), true, false, None/*Some("rv10")*/);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("realmedia", "assets/RV/rv10_dnet_640x352_realvideo_encoder_4.0.rm", Some(1000), true, false, None/*Some("rv10")*/, &dmx_reg, &dec_reg);
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_rv20() {
- test_file_decoding("realmedia", "assets/RV/rv20_svt_atrc_640x352_realproducer_plus_8.51.rm", /*None*/Some(3000), true, false, None/*Some("rv20")*/);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("realmedia", "assets/RV/rv20_svt_atrc_640x352_realproducer_plus_8.51.rm", /*None*/Some(3000), true, false, None/*Some("rv20")*/, &dmx_reg, &dec_reg);
// test_file_decoding("realmedia", "assets/RV/rv20_cook_640x352_realproducer_plus_8.51.rm", /*None*/Some(1000), true, false, Some("rv20"));
}
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_rv30() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
// test_file_decoding("realmedia", "assets/RV/rv30_chroma_drift.rm", Some(1000), true, false, /*None*/Some("rv30"));
- test_file_decoding("realmedia", "assets/RV/rv30_weighted_mc.rm", Some(400), true, false, None/*Some("rv30")*/);
+ test_file_decoding("realmedia", "assets/RV/rv30_weighted_mc.rm", Some(400), true, false, None/*Some("rv30")*/, &dmx_reg, &dec_reg);
// test_file_decoding("realmedia", "assets/RV/simpsons-clip.rm", Some(1337)/*Some(6666)*/, true, false, /*None*/Some("rv30"));
//panic!("end");
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_rv40() {
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
// test_file_decoding("realmedia", "assets/RV/rv40_ralf.rmvb", Some(1000), true, false, /*None*/Some("rv40"));
- test_file_decoding("realmedia", "assets/RV/rv40_weighted_mc.rmvb", Some(400), true, false, None/*Some("rv40")*/);
+ test_file_decoding("realmedia", "assets/RV/rv40_weighted_mc.rmvb", Some(400), true, false, None/*Some("rv40")*/, &dmx_reg, &dec_reg);
// test_file_decoding("realmedia", "assets/RV/rv40_weighted_mc_2.rmvb", Some(1000), true, false, /*None*/Some("rv40"));
//panic!("end");
}
#[cfg(test)]
mod test {
- use crate::test::dec_video::test_file_decoding;
+ 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;
#[test]
fn test_rv60() {
- test_file_decoding("realmedia", "assets/RV/RV60.rmhd", Some(4000), true, false, None/*Some("rv60")*/);
+ let mut dmx_reg = RegisteredDemuxers::new();
+ realmedia_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ realmedia_register_all_codecs(&mut dec_reg);
+
+ test_file_decoding("realmedia", "assets/RV/RV60.rmhd", Some(4000), true, false, None/*Some("rv60")*/, &dmx_reg, &dec_reg);
//panic!("end");
}
}