let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // samples from private collection
let file = "assets/RV/rv30_atrc_384x208_realproducer_plus_8.51.rm";
// let file = "assets/RV/rv20_svt_atrc_640x352_realproducer_plus_8.51.rm";
test_decode_audio("realmedia", file, Some(12000), None/*Some("atrac3")*/, &dmx_reg, &dec_reg);
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/CVID/ot171.avi
test_decoding("avi", "cinepak", "assets/Misc/ot171.avi", Some(10), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xd58326b0, 0xdbfc1dcc, 0x6d66a04c, 0x08a21bbb],
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/CVID/grayscale/dday.mov
test_decoding("mov", "cinepak", "assets/Misc/dday.mov", Some(10), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x2ab229bc, 0xb71308aa, 0x979511c6, 0xcef3ea92],
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/CVID/palette/catfight%20Tag%20team%20DT.mov
test_decoding("mov", "cinepak", "assets/Misc/catfight Tag team DT.mov", Some(10), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x3f7ec8ea, 0x873a2bc6, 0xcc58336e, 0xe88c4ffd],
let mut enc_reg = RegisteredEncoders::new();
generic_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/UCOD/TalkingHead_352x288.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Misc/TalkingHead_352x288.avi",
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/UCOD/TalkingHead_352x288.avi
test_decoding("avi", "clearvideo", "assets/Misc/TalkingHead_352x288.avi", Some(10), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xb432376c, 0xf1dce57b, 0x8e79c7ee, 0xdd51850d],
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/UCOD/Nick%20Pope.avi
test_decoding("avi", "clearvideo", "assets/Misc/Nick Pope.avi", Some(20), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xca265763, 0xd7d40e35, 0x1c27d4fb, 0xbb76b9c6],
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: self-created with avconv
test_decoding("avi", "jpeg", "assets/Misc/mjpeg.avi", Some(1), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xe07f7128, 0x8c55eb5d, 0x03bfdee5, 0x358b24a4],
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: self-created with avconv
test_decoding("yuv4mpeg", "rawvideo", "assets/Misc/test.y4m", None, &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xd58326b0, 0xdbfc1dcc, 0x6d66a04c, 0x08a21bbb],
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/Uncompressed/8bpp.avi
test_decoding("avi", "rawvideo-ms", "assets/Misc/8bpp.avi", Some(0), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5([0xb6629439, 0x6ea482e9, 0x42c84d7c, 0x46c94431]));
}
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/Uncompressed/16bpp.avi
test_decoding("avi", "rawvideo-ms", "assets/Misc/16bpp.avi", Some(0), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5([0xe80e16a1, 0x2d50659e, 0x413d24af, 0xea3bee05]));
}
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample:https://samples.mplayerhq.hu/V-codecs/Uncompressed/keve.avi
test_decoding("avi", "rawvideo-ms", "assets/Misc/keve.avi", Some(0), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5([0x9514ac1f, 0x4512cc62, 0x069485ba, 0x084a1e63]));
}
generic_register_all_demuxers(&mut dmx_reg);
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/Uncompressed/Logo-Uncompressed.zip
test_decoding("avi", "rawvideo-ms", "assets/Misc/VRMLuncompressed.avi", Some(0), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5([0xf4c9d468, 0x8f42c576, 0xc8eb522a, 0x75f654b1]));
}
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/real/AC-sipr/autahi-vox.rm
let file = "assets/RV/autahi-vox.rm";
test_decode_audio("realmedia", file, Some(5000), None/*Some("sipro")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
generic_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/real/VC-RV10/sp_sample1.rm
let file = "assets/RV/sp_sample1.rm";
test_decode_audio("realmedia", file, Some(12000), None/*Some("ac3")*/, &dmx_reg, &dec_reg);
}
use nihav_codec_support::test::dec_video::*;
use crate::generic_register_all_decoders;
use crate::generic_register_all_demuxers;
+ // samples are from https://samples.mplayerhq.hu/V-codecs/ZMBV/
#[test]
fn test_zmbv_8() {
let mut dmx_reg = RegisteredDemuxers::new();
use nihav_codec_support::test::enc_video::*;
use super::{RGB555_FORMAT, RGB24_0_FORMAT};
+ // samples are from https://samples.mplayerhq.hu/V-codecs/ZMBV/
#[test]
fn test_zmbv_encoder_8bit() {
let mut dmx_reg = RegisteredDemuxers::new();
#[test]
fn test_avi_demux() {
+ //test sample: https://samples.mplayerhq.hu/V-codecs/RT21/320x240/laser05.avi
let mut file = File::open("assets/Indeo/laser05.avi").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_mov_demux() {
+ // sample: https://samples.mplayerhq.hu/V-codecs/IV32/cubes.mov
let mut file = File::open("assets/Indeo/cubes.mov").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_dash_demux() {
+ // sample: a stream downloaded with youtube-dl
let mut file = File::open("assets/ITU/dash.m4a").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_wav_demux() {
+ // sample: https://samples.mplayerhq.hu/A-codecs/msadpcm-stereo/scatter.wav
let mut file = File::open("assets/MS/scatter.wav").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_y4m_demux() {
+ // sample: self-created with avconv
let mut file = File::open("assets/Misc/test.y4m").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
fn test_avi_muxer() {
let mut dmx_reg = RegisteredDemuxers::new();
generic_register_all_demuxers(&mut dmx_reg);
+ //test sample: https://samples.mplayerhq.hu/V-codecs/RT21/320x240/laser05.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Indeo/laser05.avi",
fn test_wav_muxer() {
let mut dmx_reg = RegisteredDemuxers::new();
generic_register_all_demuxers(&mut dmx_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/RT21/320x240/laser05.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Indeo/laser05.avi",
//let file = "assets/Duck/AVI-DUCK-dk3.duk";
//test_decode_audio("avi", file, Some(100), None/*Some("dk3")*/, &dmx_reg, &dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/DUCK/AVI-DUCK-dk3.duk
test_decoding("avi", "adpcm-dk3", "assets/Duck/AVI-DUCK-dk3.duk", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0xa48fae0a, 0xa536b27f, 0x169ecc19, 0x8436fade]));
}
// let file = "assets/Duck/virtuafighter2-opening1.avi";
// test_decode_audio("avi", file, Some(100), None/*Some("dk4")*/, &dmx_reg, &dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/DUCK/virtuafighter2-opening1.avi
test_decoding("avi", "adpcm-dk4", "assets/Duck/virtuafighter2-opening1.avi", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x04e40d15, 0xf65b3427, 0x1dd5181f, 0xf321b56f]));
}
//let file = "assets/Duck/Cell-140.vp5";
//let file = "assets/Duck/Chocolat-500.vp5";
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP7/potter-500.vp7
let file = "assets/Duck/potter-500.vp7";
test_decode_audio("avi", file, Some(1500), None/*Some("avc")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/DUCK/phant2-940.duk
test_decoding("avi", "truemotion1", "assets/Duck/phant2-940.duk", Some(12), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x989e62b8, 0x5d85c23c, 0x1cffba6d, 0xe599f1c4],
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/TM20/tm20.avi
test_decoding("avi", "truemotion2", "assets/Duck/tm20.avi", Some(16),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x8c336eb4, 0x10d0d934, 0x52392306, 0xc0bc6dd3],
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/TM2x.avi
test_decoding("avi", "truemotion2x", "assets/Duck/TM2x.avi", None,
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x2854e7f3, 0x41e54fd3, 0xd9a16302, 0x580321b2],
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("avi", "truemotionrt", "assets/Duck/tr20_low.avi", Some(10),
&dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x24c3d26c, 0x1e8bbdc4, 0xfb0fba5d, 0xaa04be81]));
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP3/vp30-logo.avi
test_decoding("avi", "vp3", "assets/Duck/vp30-logo.avi", Some(23), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x51aba7df, 0x6e42534d, 0xef6c5b13, 0x26c38d1f]));
}
// let file = "assets/Duck/01-vp31-0500.avi";
// test_file_decoding("avi", file, Some(3), true, false, None/*Some("vp31")*/, &dmx_reg, &dec_reg);
//panic!("end");
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP3/01-vp31-0500.avi
test_decoding("avi", "vp3", "assets/Duck/01-vp31-0500.avi", Some(16), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x65112f7e, 0x2914f29b, 0x2908ed2f, 0xce5fc8c5]));
}
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP4/ot171_vp40.avi
test_decoding("avi", "vp3", "assets/Duck/ot171_vp40.avi", Some(86), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0xd41d8cd9, 0x8f00b204, 0xe9800998, 0xecf8427e]));
}
let file = "assets/Duck/Cell-140.vp5";
//let file = "assets/Duck/Chocolat-500.vp5";
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP5/Cell-140.vp5
test_decoding("avi", "vp5", file, Some(96), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x9ad78b0f, 0xed988ead, 0x88ed2ea9, 0xcdb75cdf]));
}
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("avi", "vp6", "assets/Duck/selection_720x576_300kBit_vp60i.avi", Some(16),
&dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x042c3e96, 0x8a9b26a2, 0x4dcbaf66, 0x1b788d03]));
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP6/vp6_crash.avi
test_decoding("avi", "vp6", "assets/Duck/vp6_crash.avi", Some(4),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xdcd70fa0, 0x0d075ce2, 0xc9e65077, 0xb003a92e],
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample created by remuxing some VP6A in FLV
test_decoding("avi", "vp6a", "assets/Duck/vp6a.avi", Some(25),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xaf903d79, 0x17ddb3c7, 0xf0a381e8, 0x26b36a7d],
let mut enc_reg = RegisteredEncoders::new();
duck_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP4/ot171_vp40.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Duck/ot171_vp40.avi",
let mut dec_reg = RegisteredDecoders::new();
duck_register_all_decoders(&mut dec_reg);
+ // sample from https://trac.ffmpeg.org/ticket/5580
test_decoding("avi", "vp7", "assets/Duck/interlaced_blit_pitch.avi", Some(12), &dmx_reg,
&dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xb79fb6f8, 0xed51ac9e, 0x9e423456, 0xc0918e7f],
use crate::duck_register_all_decoders;
use crate::duck_register_all_demuxers;
+ // all samples are from the official VP8 test bitstreams set
fn test_vp8_core(name: &str, hash: [u32; 4]) {
let mut dmx_reg = RegisteredDemuxers::new();
duck_register_all_demuxers(&mut dmx_reg);
#[test]
fn test_ivf_demux() {
+ // sample is from the official VP8 test bitstream set
let mut file = File::open("assets/Duck/VP8/vp80-00-comprehensive-001.ivf").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
let mut dec_reg = RegisteredDecoders::new();
flash_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/flash_flv_adpcm_testfiles/mono_11k.flv
test_decoding("flv", "flv-adpcm", "assets/Flash/mono_11k.flv", Some(3000), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x4cf30e71, 0x4360c85b, 0x21c52863, 0x1782160e]));
}
let mut dec_reg = RegisteredDecoders::new();
flash_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/flash_flv_adpcm_testfiles/stereo_44k.flv
test_decoding("flv", "flv-adpcm", "assets/Flash/stereo_44k.flv", Some(3000), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0xae108d38, 0xb36236f8, 0x2bc18d31, 0xac600424]));
}
let mut enc_reg = RegisteredEncoders::new();
flash_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/flash_flv_adpcm_testfiles/mono_11k.flv
let dec_config = DecoderTestParams {
demuxer: "flv",
in_name: "assets/Flash/mono_11k.flv",
let mut dec_reg = RegisteredDecoders::new();
flash_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/Nelly_Moser/nellymoser-in-flv.flv
test_decode_audio("flv", "assets/Flash/nellymoser-in-flv.flv", Some(3000), None/*Some("asao")*/, &dmx_reg, &dec_reg);
}
}
let mut dec_reg = RegisteredDecoders::new();
flash_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/flash_screen/screen.flv
test_decoding("flv", "flashsv", "assets/Flash/screen.flv",
Some(3000), &dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xb45b899e, 0x417b17d5, 0x7bfe898b, 0x026b289f],
let mut dec_reg = RegisteredDecoders::new();
flash_register_all_decoders(&mut dec_reg);
+ // sample created from https://samples.mplayerhq.hu/FLV/flash_screen/screen.flv by recoding
test_decoding("flv", "flashsv2", "assets/Flash/screen2.flv",
Some(4700), &dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x55522afa, 0x9c7dd794, 0xdd67aa2e, 0x8b8c525e],
let mut dec_reg = RegisteredDecoders::new();
flash_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/Nelly_Moser/input.flv
test_decoding("flv", "flv263", "assets/Flash/input.flv",
Some(1000), &dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x9110718e, 0x794e22ad, 0x3324e552, 0xf58a0449],
use super::*;
use std::fs::File;
+ // sample: https://samples.mplayerhq.hu/A-codecs/Nelly_Moser/input.flv
#[test]
fn test_flv_demux() {
let mut file = File::open("assets/Flash/input.flv").unwrap();
fn test_flv_muxer() {
let mut dmx_reg = RegisteredDemuxers::new();
flash_register_all_demuxers(&mut dmx_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/Nelly_Moser/input.flv
let dec_config = DecoderTestParams {
demuxer: "flv",
in_name: "assets/Flash/input.flv",
use nihav_codec_support::test::dec_video::*;
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // samples from: https://samples.mplayerhq.hu/game-formats/bmv/
#[test]
fn test_bmv_video() {
let mut dmx_reg = RegisteredDemuxers::new();
use nihav_codec_support::test::dec_video::*;
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // sample: https://samples.mplayerhq.hu/game-formats/bmv/DW3-Loffnote.bmv
#[test]
fn test_bmv_video() {
let mut dmx_reg = RegisteredDemuxers::new();
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // samples come from the Harvester game
#[test]
fn test_fst_video() {
let mut dmx_reg = RegisteredDemuxers::new();
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // samples: intro1.gdv from Normality, SHELI_S.GDV from Jungle Strike
#[test]
fn test_gdv_video() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
game_register_all_decoders(&mut dec_reg);
+ // sample from Fable game
test_decoding("fable-imax", "fable-imax", "assets/Game/present.imx",
Some(64), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x775e1326, 0x7aa63674, 0x9b8aec54, 0x5caee2e3]));
use nihav_codec_support::test::dec_video::*;
use crate::game_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
+ // samples from https://misc.daniel-marschall.de/spiele/blown_away/ipma_codec/
#[test]
fn test_ipma_video() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
game_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/MVDV.avi
test_decoding("avi", "midivid", "assets/Game/MVDV.avi", Some(16), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x383e1995, 0x32bf000d, 0x2067aa2e, 0x54425bd4],
let mut dec_reg = RegisteredDecoders::new();
game_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/mv30.avi
test_decoding("avi", "midivid3", "assets/Game/mv30.avi", Some(16), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x0f4f2377, 0xe017458f, 0xebf6d59d, 0x238a3e64],
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // samples from Deathgate, Mission Critical and Shannara games
#[test]
fn test_q_video3() {
let mut dmx_reg = RegisteredDemuxers::new();
use nihav_codec_support::test::dec_video::*;
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // samples from https://samples.mplayerhq.hu/game-formats/sierra-vmd/ and various games
#[test]
fn test_vmd_video() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
game_register_all_decoders(&mut dec_reg);
+ // sample from some game
test_decoding("vx", "vxvideo", "assets/Game/bioware.vx", Some(31), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x33de14fa, 0x00948eb7, 0x028141d7, 0x1d07abd6],
use super::*;
use std::fs::File;
+ // samples from https://samples.mplayerhq.hu/game-formats/bmv
#[test]
fn test_bmv_demux() {
let mut file = File::open("assets/Game/DW2-MOUSE.BMV").unwrap();
use super::*;
use std::fs::File;
+ // samples from the Harvester game
#[test]
fn test_fst_demux() {
let mut file = File::open("assets/Game/c007.fst").unwrap();
#[test]
fn test_gdv_demux() {
+ // sample from Normality game
let mut file = File::open("assets/Game/intro1.gdv").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_imax_demux() {
+ // sample from Fable game
let mut file = File::open("assets/Game/present.imx").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
use super::*;
use std::fs::File;
+ // samples from Death Gate, Mission Critical and Shannara games
#[test]
fn test_q_demux_v3() {
let mut file = File::open("assets/Game/dgate101.q").unwrap();
#[test]
fn test_vmd_demux() {
+ // sample: https://samples.mplayerhq.hu/game-formats/sierra-vmd/Lighthouse/128.vmd
let mut file = File::open("assets/Game/128.vmd").unwrap();
//let mut file = File::open("assets/Game/1491.VMD").unwrap();
let mut fr = FileReader::new_read(&mut file);
#[test]
fn test_vx_demux() {
+ // sample from some game
let mut file = File::open("assets/Game/bioware.vx").unwrap();
//let mut file = File::open("assets/Game/BS_01_Intro.vx").unwrap();
//let mut file = File::open("assets/Game/sega.vx").unwrap();
// let file = "assets/Indeo/neal73_saber.avi";
// let file = "assets/Indeo/IMC/hvalen.avi";
+ // sample from a private collection
let file = "assets/Indeo/IMC/8khz.avi";
// let file = "assets/Indeo/STsKlassFist-1a.avi";
// let file = "assets/Indeo/IMC/Angel Bday.avi";
let mut dec_reg = RegisteredDecoders::new();
indeo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/RT21/320x240/laser05.avi
test_decoding("avi", "indeo2", "assets/Indeo/laser05.avi", Some(10),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x55f509ad, 0x62fb52d5, 0x6e9a86b2, 0x3910ce74],
let mut dec_reg = RegisteredDecoders::new();
indeo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/IV32/iv32_example.avi
test_decoding("avi", "indeo3", "assets/Indeo/iv32_example.avi", Some(10),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x90be698e, 0x326db071, 0x08e8c6a5, 0x39349acc],
let mut dec_reg = RegisteredDecoders::new();
indeo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/IV41/indeo4-avi/volcano.avi
test_decoding("avi", "indeo4", "assets/Indeo/IV4/volcano.avi", Some(16),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x194f626b, 0x023fdfd0, 0x9809665a, 0xd68f6f47],
[0x4b04dc0e, 0x684533a7, 0x6a4e4b16, 0x0b8a5e68],
[0xa3eb64fc, 0x5e02a31b, 0x6b484eae, 0xbb6e6c49],
[0x7d4ef46e, 0x6761c447, 0x02e002f5, 0x02d0231c]]));
+ // a sample from Civilization II
test_decoding("avi", "indeo4", "assets/Indeo/IV4/HRLDVIK.AVI", Some(8),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x239b8b87, 0x6dbec08c, 0x82bae1f0, 0x868e00c2],
let mut dec_reg = RegisteredDecoders::new();
indeo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/IV50/sample.avi
test_decoding("avi", "indeo5", "assets/Indeo/IV5/sample.avi", Some(100),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0xd73ef6e2, 0x099dc18f, 0x46450af9, 0x1b390a48],
let mut dec_reg = RegisteredDecoders::new();
indeo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/IMC/neal73_saber.avi
test_decoding("avi", "intel263", "assets/Indeo/neal73_saber.avi", Some(16),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x698c4f70, 0xf727bfc1, 0x96e687e9, 0xc9e37073],
use crate::itu_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
+ // samples if not specified otherwise come from H.264 conformance suite
mod raw_demux;
mod conformance;
use self::raw_demux::RawH264DemuxerCreator;
[0xa90454f5, 0x7875d5db, 0xbab234bd, 0xe6ce1193]]));
}
+ // mostly static music video downloaded with youtube-dl
#[test]
fn test_h264_real1() {
let mut dmx_reg = RegisteredDemuxers::new();
[0x94fee093, 0x78ad89b3, 0xf20e882b, 0x941425db],
[0xc3eb1a78, 0x4b4e098a, 0xcbcf9bb4, 0xfd5b5426]]));
}
+ // a sample downloaded from gfycat.com
#[test]
fn test_h264_real2() {
let mut dmx_reg = RegisteredDemuxers::new();
use nihav_codec_support::test::dec_video::*;
use crate::llaudio_register_all_decoders;
use crate::llaudio_register_all_demuxers;
+ // samples from Libav test suite
#[test]
fn test_ape_3990() {
let mut dmx_reg = RegisteredDemuxers::new();
use nihav_codec_support::test::dec_video::*;
use crate::llaudio_register_all_decoders;
use crate::llaudio_register_all_demuxers;
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac
#[test]
fn test_flac() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut enc_reg = RegisteredEncoders::new();
llaudio_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac
let dec_config = DecoderTestParams {
demuxer: "flac",
in_name: "assets/LLaudio/luckynight.flac",
let mut dec_reg = RegisteredDecoders::new();
llaudio_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.tta
test_decoding("tta", "tta", "assets/LLaudio/luckynight.tta", Some(3), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0xce0fe9c4, 0xa69eefda, 0xe182008c, 0xe941db3f]));
}
use nihav_codec_support::test::dec_video::*;
use crate::llaudio_register_all_decoders;
use crate::llaudio_register_all_demuxers;
+ // samples come from the official WavPack test samples set
#[test]
fn test_wavpack_8bit() {
let mut dmx_reg = RegisteredDemuxers::new();
#[test]
fn test_ape_demux() {
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.ape
let mut file = File::open("assets/LLaudio/ape/luckynight.ape").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_flac_demux() {
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac
let mut file = File::open("assets/LLaudio/luckynight.flac").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_flac_raw_demux() {
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac
let mut file = File::open("assets/LLaudio/luckynight.flac").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_tta_demux() {
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.tta
let mut file = File::open("assets/LLaudio/luckynight.tta").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
#[test]
fn test_wavpack_demux() {
+ // sample from the official WavPack test samples set
let mut file = File::open("assets/LLaudio/wv/false_stereo.wv").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
fn test_flac_muxer() {
let mut dmx_reg = RegisteredDemuxers::new();
llaudio_register_all_demuxers(&mut dmx_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac
let dec_config = DecoderTestParams {
demuxer: "flac",
in_name: "assets/LLaudio/luckynight.flac",
let mut dec_reg = RegisteredDecoders::new();
mpeg_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/flash_video_5/i_004.flv
let file = "assets/Flash/i_004.flv";
test_decode_audio("flv", file, Some(6000), None/*Some("mp3_1")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
mpeg_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/venture_030_ivcp_001_8bit.flv
let file = "assets/Flash/venture_030_ivcp_001_8bit.flv";
test_decode_audio("flv", file, Some(7200), None/*Some("mp3_2")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
mpeg_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/FLV/flash_with_alpha/lection2-2.flv
let file = "assets/Flash/lection2-2.flv";
test_decode_audio("flv", file, Some(6000), None/*Some("mp3_3")*/, &dmx_reg, &dec_reg);
}
#[test]
fn test_mpa_packetiser() {
let mut buf = [0; 16384];
+ // sample from a private collection
let mut file = std::fs::File::open("assets/MPEG/1.mp3").unwrap();
let mut pkts = super::MPAPacketiser::new();
let mut dec_reg = RegisteredDecoders::new();
ms_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/ima-adpcm/ima-adpcm-stutter/IMAG0006.AVI
test_decoding("avi", "ima-adpcm-ms", "assets/MS/IMAG0006.AVI", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x0cdc640f, 0xb00df235, 0x1ec4a280, 0x065b5e9e]));
}
let mut enc_reg = RegisteredEncoders::new();
ms_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/VP4/ot171_vp40.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Duck/ot171_vp40.avi",
let mut enc_reg = RegisteredEncoders::new();
ms_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/RT21/320x240/laser05.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Indeo/laser05.avi",
use nihav_codec_support::test::dec_video::*;
use crate::ms_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
+ // samples from https://samples.mplayerhq.hu/V-codecs/RLE
#[test]
fn test_ms_rle_8bit() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
ms_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/avi/palette_change/toon.avi
test_decoding("avi", "msvideo1", "assets/MS/toon.avi", Some(66), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x0c26ec42, 0xb75bfea7, 0x1e6342ae, 0xb14dcfa3]));
}
let mut dec_reg = RegisteredDecoders::new();
ms_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/CRAM/clock-cram16.avi
test_decoding("avi", "msvideo1", "assets/MS/clock-cram16.avi", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x03381fa4, 0x5b294fec, 0xb97a7575, 0xa1a3ffe9]));
}
let mut enc_reg = RegisteredEncoders::new();
ms_register_all_encoders(&mut enc_reg);
+ // sample: https://samples.mplayerhq.hu/V-codecs/UCOD/TalkingHead_352x288.avi
let dec_config = DecoderTestParams {
demuxer: "avi",
in_name: "assets/Misc/TalkingHead_352x288.avi",
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.m4a
test_decoding("mov", "alac", "assets/LLaudio/alac/luckynight.m4a", Some(48000 * 16), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x8b6562ac, 0x95981733, 0x47e14709, 0x45d4f05a]));
}
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/ALAC/ALAC_6ch.mov
test_decoding("mov", "alac", "assets/LLaudio/alac/ALAC_6ch.mov", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x0356ff3d, 0x1ddd3684, 0xb4da8b00, 0x8e8671a7]));
}
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/ALAC/ALAC_24bits2.mov
test_decoding("mov", "alac", "assets/LLaudio/alac/ALAC_24bits2.mov", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x15d58ed9, 0x9ee74f5e, 0x0fb82c0b, 0x27da35f9]));
}
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/ima-adpcm/shuffle-ima41.mov
test_decoding("mov", "ima-adpcm-qt", "assets/QT/shuffle-ima41.mov", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0xba2ad472, 0xd6aee026, 0xb915dd7d, 0xac51314c]));
}
use nihav_codec_support::test::dec_video::*;
use crate::qt_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
+ // samples from https://samples.mplayerhq.hu/A-codecs/MACE/surge-samples/
#[test]
fn test_mace3() {
let mut dmx_reg = RegisteredDemuxers::new();
qt_register_all_decoders(&mut dec_reg);
//test_decode_audio("mov", "assets/QT/0-22050HzSweep8kb.mov", None, Some("qdm2"), &dmx_reg, &dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/QDM2/sweep/0-22050HzSweep10kb.mov
test_decoding("mov", "qdesign-music2", "assets/QT/0-22050HzSweep10kb.mov", None, &dmx_reg, &dec_reg,
ExpectedTestResult::Decodes);
}
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/QDMC/rumcoke.mov
test_decoding("mov", "qdesign-music", "assets/QT/rumcoke.mov", Some(32), &dmx_reg, &dec_reg,
ExpectedTestResult::Decodes);
}
use nihav_codec_support::test::dec_video::*;
use crate::qt_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
+ // samples from https://samples.mplayerhq.hu/V-codecs/QTRLE
#[test]
fn test_qt_rle_1bit() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
- test_decoding("mov", "apple-video", "assets/QT/aletrek-rpza.mov", Some(6), &dmx_reg, &dec_reg,
+ // sample: https://samples.mplayerhq.hu/V-codecs/RPZA/aletrek-rpza.mov
+ test_decoding("mov", "apple-video", "assets/QT/aletrek-rpza.mov", Some(6), &dmx_reg &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0xe7cfc941, 0xa448841b, 0x75afc888, 0x94aa064b],
[0xadaaec50, 0xff7319ff, 0xa1f3f64a, 0xc40c2985],
use nihav_codec_support::test::dec_video::*;
use crate::qt_register_all_decoders;
use nihav_commonfmt::generic_register_all_demuxers;
+ // samples from https://samples.mplayerhq.hu/V-codecs/SMC
#[test]
fn test_smc() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
qt_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/A-codecs/ima-adpcm/adpcm-bug.mov
test_decoding("mov", "sorenson-video", "assets/QT/adpcm-bug.mov", Some(6), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x90c5eb74, 0xcb942d7d, 0x84c5e444, 0x7f1ba2c2],
//let file = "assets/QT/broken_sword_Large.mov";
//test_file_decoding("mov", file, Some(264), true, false, Some("svq3"), &dmx_reg, &dec_reg);
//panic!("end");
+ // sample: https://samples.mplayerhq.hu/V-codecs/SVQ3/broken_sword_Large.mov
test_decoding("mov", "sorenson-video3", "assets/QT/broken_sword_Large.mov", Some(40), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x16924d18, 0xccc5a0b4, 0xc2bb9412, 0x93d41f10],
//let file = "assets/RAD/Open_Logos_partial.bik";
//let file = "assets/RAD/sc13_01_partial.bk2";
+ // sample from a private collection
let file = "assets/RAD/ge_video_86l.bk2";
//let file = "assets/RAD/eg_club_0.bk2";
test_file_decoding("bink", file, Some(8), true, false, None/*Some("bink2")*/, &dmx_reg, &dec_reg);
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/game-formats/bink/ActivisionLogo.bik
let file = "assets/RAD/ActivisionLogo.bik";
test_decode_audio("bink", file, None, None/*Some("bink")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample from Heroes of Might and Magic 3
let file = "assets/RAD/NWCLOGO.BIK";
test_decode_audio("bink", file, None, None/*Some("bink")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/game-formats/bink/bikb/NEW.BIK
test_decoding("bink", "bink-video", "assets/RAD/NEW.BIK", Some(16), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x00edef7e, 0x7efad3b1, 0x7e8bdd74, 0x3f6b00ba],
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/game-formats/bink/ActivisionLogo.bik
test_decoding("bink", "bink-video", "assets/RAD/ActivisionLogo.bik", Some(42),
&dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x41128884, 0x73a8c710, 0x5072ea4a, 0x8caca428]));
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample from Heroes of Might and Magic 2
test_decoding("smacker", "smacker-video", "assets/RAD/credits.smk", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x0983944a, 0xa23503f8, 0x2602b589, 0x13b53480],
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/game-formats/smacker/wetlands/wetlogo.smk
test_decoding("smacker", "smacker-audio", "assets/RAD/wetlogo.smk", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0xc686b833, 0x0a203038, 0x012f6d9b, 0xa4186d44]));
}
let mut dec_reg = RegisteredDecoders::new();
rad_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/game-formats/smacker/20130507_audio-distortion.smk
test_decoding("smacker", "smacker-audio", "assets/RAD/20130507_audio-distortion.smk", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x942a0922, 0x182bb5fd, 0x94ab7a59, 0x2028d810]));
}
#[test]
fn test_bink_demux() {
+ // sample: https://samples.mplayerhq.hu/game-formats/bink/ActivisionLogo.bik
let mut file = File::open("assets/RAD/ActivisionLogo.bik").unwrap();
// let mut file = File::open("assets/RAD/original.bik").unwrap();
// let mut file = File::open("assets/RAD/Snd0a110c51.dee").unwrap();
#[test]
fn test_smk_demux() {
+ // sample: https://samples.mplayerhq.hu/game-formats/smacker/20130507_audio-distortion.smk
let mut file = File::open("assets/RAD/20130507_audio-distortion.smk").unwrap();
// let mut file = File::open("assets/RAD/ajfstr1.smk").unwrap();
// let mut file = File::open("assets/RAD/credits.smk").unwrap();
realmedia_register_all_decoders(&mut dec_reg);
// let file = "assets/RV/rv30_weighted_mc.rm";
+ // sample: https://samples.mplayerhq.hu/real/AC-cook/cook_5.1/multichannel.rma
let file = "assets/RV/multichannel.rma";
test_decode_audio("realmedia", file, Some(2000), None/*Some("cook")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/real/AC-14_4/ra3_in_rm_file.rm
let file = "assets/RV/ra3_in_rm_file.rm";
test_decode_audio("realmedia", file, Some(5000), None/*Some("ra14.4")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/real/AC-28_8/A0000044.rm
let file = "assets/RV/A0000044.rm";
test_decode_audio("realmedia", file, Some(5000), None/*Some("ra28.8")*/, &dmx_reg, &dec_reg);
}
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("realmedia", "ralf", "assets/RV/rv40_ralf.rmvb", None, &dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x6cf18361, 0x9548b5ce, 0x5dfc0b5c, 0x2bd6f392]));
}
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/real/VC-RV10/thankyou.rm
test_decoding("realmedia", "realvideo1", "assets/RV/thankyou.rm",
Some(1000), &dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x8bba459c, 0xe6e8e01c, 0x36f90595, 0xb268adee],
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("realmedia", "realvideo1",
"assets/RV/rv10_dnet_640x352_realvideo_encoder_4.0.rm",
Some(1000), &dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("realmedia", "realvideo2",
"assets/RV/rv20_svt_atrc_640x352_realproducer_plus_8.51.rm",
Some(1000), &dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("realmedia", "realvideo3", "assets/RV/rv30_weighted_mc.rm", Some(700),
&dmx_reg, &dec_reg, ExpectedTestResult::MD5Frames(vec![
[0x2a4d13bf, 0x2f21f3c9, 0xcbd601be, 0x61a6405c],
[0x7b38660e, 0xa46f4080, 0xa493f422, 0x36eaaa3b],
[0x6375934a, 0xf2a23087, 0x367f9738, 0xf2251e09],
[0x54bcefe7, 0xbbc91dc7, 0x0acec7d7, 0x95cf6d02]]));
+ // sample: https://samples.mplayerhq.hu/real/VC-RV30/simpsons-clip.rm
test_decoding("realmedia", "realvideo3", "assets/RV/simpsons-clip.rm", Some(1337),
&dmx_reg, &dec_reg,
ExpectedTestResult::MD5([0x36604117, 0x415f95cc, 0xec38e776, 0x9818d3be]));
use nihav_codec_support::test::dec_video::*;
use crate::realmedia_register_all_decoders;
use crate::realmedia_register_all_demuxers;
+ // samples from a private collection
#[test]
fn test_rv40() {
let mut dmx_reg = RegisteredDemuxers::new();
let mut dec_reg = RegisteredDecoders::new();
realmedia_register_all_decoders(&mut dec_reg);
+ // sample from a private collection
test_decoding("realmedia", "realvideo6", "assets/RV/RV60.rmhd", Some(1000), &dmx_reg, &dec_reg,
ExpectedTestResult::MD5Frames(vec![
[0x2b1f1807, 0x09edef33, 0x0e6c78c1, 0x3b3c8179],
#[test]
fn test_rm_demux() {
+ // sample from a private collection
let mut file =
File::open("assets/RV/rv10_dnet_640x352_realvideo_encoder_4.0.rm").unwrap();
// File::open("assets/RV/rv20_cook_640x352_realproducer_plus_8.51.rm").unwrap();
}
#[test]
fn test_ra_demux() {
+ // sample: https://samples.mplayerhq.hu/real//RA/ra_with_comment_field/diemusik.ra
let mut file =
// File::open("assets/RV/welcome288.ra").unwrap();
File::open("assets/RV/diemusik.ra").unwrap();
}
#[test]
fn test_ivr_demux() {
+ // sample: https://samples.mplayerhq.hu/real/ivr/Opener_rm_hi.ivr
let mut file =
File::open("assets/RV/Opener_rm_hi.ivr").unwrap();
// File::open("assets/RV/SherwinWilliamsCommercial.ivr").unwrap();
let mut dec_reg = RegisteredDecoders::new();
vivo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/vivo/viv1/adalogo.viv
let file = "assets/Misc/adalogo.viv";
//let file = "assets/Misc/gr_al.viv";
//test_decode_audio("vivo", file, Some(1500), None/*Some("g7231")*/, &dmx_reg, &dec_reg);
let mut dec_reg = RegisteredDecoders::new();
vivo_register_all_decoders(&mut dec_reg);
+ // sample: https://samples.mplayerhq.hu/vivo/vivo2/favmovie.viv
let file = "assets/Misc/favmovie.viv";
//let file = "assets/Misc/gr_al.viv";
test_decode_audio("vivo", file, None, None/*Some("siren")*/, &dmx_reg, &dec_reg);
use nihav_codec_support::test::dec_video::*;
use crate::vivo_register_all_decoders;
use crate::vivo_register_all_demuxers;
+ // samples from https://samples.mplayerhq.hu/vivo/
#[test]
fn test_vivo1() {
let mut dmx_reg = RegisteredDemuxers::new();
#[test]
fn test_vivo_demux() {
// let mut file = File::open("assets/Misc/greetings.viv").unwrap();
+ // sample: https://samples.mplayerhq.hu/vivo/vivo2/favmovie.viv
let mut file = File::open("assets/Misc/favmovie.viv").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);