From f9282fc847591e474aaa3db9c9933ef19a2fd3ac Mon Sep 17 00:00:00 2001 From: Yaroslav Tatarenko Date: Sun, 21 Jun 2020 18:10:46 +0300 Subject: [PATCH] #19 not work on iis Path to mediaInfo.dll is detected more accurately. Checks current process directory, current process directory + /x86 or /64, assembly location and assembly location + /x86 or /64 Add constructor with path to dll --- MediaInfo.Wrapper.Tests/AudioTests.cs | 376 +++++++++--------- MediaInfo.Wrapper.Tests/VideoTests.cs | 122 +++--- .../Builder/AudioStreamBuilder.cs | 32 +- .../MediaInfo.Wrapper.Core.csproj | 6 +- MediaInfo.Wrapper/MediaInfo.Wrapper.csproj | 6 +- MediaInfo.Wrapper/MediaInfoWrapper.cs | 130 +++--- appveyor.yml | 2 +- 7 files changed, 345 insertions(+), 329 deletions(-) diff --git a/MediaInfo.Wrapper.Tests/AudioTests.cs b/MediaInfo.Wrapper.Tests/AudioTests.cs index 8342c0b..b1f9497 100644 --- a/MediaInfo.Wrapper.Tests/AudioTests.cs +++ b/MediaInfo.Wrapper.Tests/AudioTests.cs @@ -37,8 +37,8 @@ public AudioTests(ITestOutputHelper testOutputHelper) } [Theory] - [InlineData(@"./Data/Test_H264_DTS1.m2ts", 9, 1)] - [InlineData(@"./Data/Test_H264_DTS2.m2ts", 6, 0)] + [InlineData("./Data/Test_H264_DTS1.m2ts", 9, 1)] + [InlineData("./Data/Test_H264_DTS2.m2ts", 6, 0)] public void LoadVideoWithDtsMa(string fileName, int audioStreamCount, int dtsIndex) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -62,59 +62,59 @@ public void LoadVideoWithDtsMa(string fileName, int audioStreamCount, int dtsInd #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../HD Audio/2L-125_04_stereo.mqa.flac", 2, 24, 44100.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-125_mch-96k-24b_04.flac", 6, 24, 96000.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-44k-16b_04.flac", 2, 16, 44100.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-88k-24b_04.flac", 2, 24, 88200.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-176k-24b_04.flac", 2, 24, 176400.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-352k-24b_04.flac", 2, 24, 352800.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-125_mch-2822k-1b_04.dsf", 6, 1, 2822400.0, AudioCodec.Dsd)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-2822k-1b_04.dsf", 2, 1, 2822400.0, AudioCodec.Dsd)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-5644k-1b_04.dsf", 2, 1, 5644800.0, AudioCodec.Dsd)] - [InlineData(@"../../../../HD Audio/2L-125_stereo-11289k-1b_04.dsf", 2, 1, 11289600.0, AudioCodec.Dsd)] - [InlineData(@"../../../../HD Audio/2L-145_01_stereo.mqa.flac", 2, 24, 44100.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-145_01_stereo.mqacd.mqa.flac", 2, 16, 44100.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-145_mch_FLAC_96k_24b_01.flac", 6, 24, 96000.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-45_stereo_01_DSF_11289k_1b.dsf", 2, 1, 11289600.0, AudioCodec.Dsd)] - [InlineData(@"../../../../HD Audio/2L-45_stereo_01_FLAC_88k_24b.flac", 2, 24, 88200.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-45_stereo_01_FLAC_176k_24b.flac", 2, 24, 176400.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/2L-45_stereo_01_FLAC_352k_24b.flac", 2, 24, 352800.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/03_NEUE_MUSIK_BERND_THEWESl_kleine_pingpark_wolke_DTS.wav", 6, 24, 44100.0, AudioCodec.Dts)] - [InlineData(@"../../../../HD Audio/3-1.dts", 4, 24, 48000.0, AudioCodec.DtsHdMa)] - [InlineData(@"../../../../HD Audio/5.1 24bit.dts", 6, 24, 48000.0, AudioCodec.Dts)] - [InlineData(@"../../../../HD Audio/06_NEW_JAZZ_SSQ3_ENERGY_DTS.wav", 6, 24, 44100.0, AudioCodec.Dts)] - [InlineData(@"../../../../HD Audio/7.1auditionOutLeader v2.wav", 8, 16, 48000.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../HD Audio/7_pt_1.eac3", 8, 0, 48000.0, AudioCodec.Eac3)] - [InlineData(@"../../../../HD Audio/8_Channel_ID.m4a", 8, 0, 48000.0, AudioCodec.AacMpeg4Lc)] - [InlineData(@"../../../../HD Audio/96-24.dts", 6, 24, 96000.0, AudioCodec.DtsHd)] - [InlineData(@"../../../../HD Audio/Berlioz - Hungarian March.aac", 6, 0, 48000.0, AudioCodec.AacMpeg4LcSbr)] - [InlineData(@"../../../../HD Audio/Berlioz - Hungarian March.wma", 6, 24, 96000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../HD Audio/Broadway-5.1-48khz-448kbit.ac3", 6, 0, 48000.0, AudioCodec.Ac3)] - [InlineData(@"../../../../HD Audio/csi_miami_5.1_256_spx.eac3", 6, 0, 48000.0, AudioCodec.Eac3)] - [InlineData(@"../../../../HD Audio/csi_miami_5.1_256_spx_nero.flac", 6, 24, 48000.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/ct_faac-adts.aac", 2, 0, 44100.0, AudioCodec.AacMpeg4Lc)] - [InlineData(@"../../../../HD Audio/Cybele_SACD_030802_24b96k_8ch_Aurophonie_11.flac", 8, 24, 96000.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/Cybele_SACD_030802_24b96k_Surround_11.flac", 5, 24, 96000.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/Cybele_SACD_030802_DSD_Surround_11.dsf", 5, 1, 2822400.0, AudioCodec.Dsd)] - [InlineData(@"../../../../HD Audio/Cybele_SACD_051501_16b44k_3D-Binaural-Stereo_03.flac", 2, 16, 44100.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/Cybele_SACD_051501_24b96k_3D-Binaural-Stereo_03.flac", 2, 24, 96000.0, AudioCodec.Flac)] - [InlineData(@"../../../../HD Audio/dtswavsample14.wav", 6, 24, 44100.0, AudioCodec.Dts)] - [InlineData(@"../../../../HD Audio/ES 6.1 - 5.1 16bit.dts", 7, 16, 48000.0, AudioCodec.DtsEs)] - [InlineData(@"../../../../HD Audio/ES 6.1 24bit.dts", 7, 24, 48000.0, AudioCodec.DtsEs)] - [InlineData(@"../../../../HD Audio/faad_infinite_long.aacp", 2, 0, 44100.0, AudioCodec.AacMpeg4LcSbrPs)] - [InlineData(@"../../../../HD Audio/Hi-Res 6.1 24bit.dts", 7, 24, 48000.0, AudioCodec.DtsHdHra)] - [InlineData(@"../../../../HD Audio/lotr_5.1_768.dts", 7, 24, 48000.0, AudioCodec.DtsEs)] - [InlineData(@"../../../../HD Audio/Major 06 kwestia 03.mka", 1, 0, 48000.0, AudioCodec.AacMpeg4LcSbrPs)] - [InlineData(@"../../../../HD Audio/Master Audio 2.0 16bit.dts", 2, 16, 48000.0, AudioCodec.DtsHdMa)] - [InlineData(@"../../../../HD Audio/Master Audio 5.0 96khz.dts", 5, 24, 96000.0, AudioCodec.DtsHdMa)] - [InlineData(@"../../../../HD Audio/Master Audio 5.1 24bit.dts", 6, 24, 48000.0, AudioCodec.DtsHdMa)] - [InlineData(@"../../../../HD Audio/Master Audio 7.1.dts", 8, 24, 48000.0, AudioCodec.DtsHdMa)] - [InlineData(@"../../../../HD Audio/Master Audio 7.1 24bit.dts", 8, 24, 48000.0, AudioCodec.DtsHdMa)] - [InlineData(@"../../../../HD Audio/monsters_inc_5.1_448.ac3", 6, 0, 48000.0, AudioCodec.Ac3)] - [InlineData(@"../../../../HD Audio/SBR_LFETest5_1-441-16b.wav", 6, 16, 44100.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../HD Audio/stuttering_dts_truhd.dts", 6, 24, 48000.0, AudioCodec.Dts)] - [InlineData(@"../../../../HD Audio/thx_2_0.ac3", 2, 0, 48000.0, AudioCodec.Ac3)] - [InlineData(@"../../../../HD Audio/working_dts_with_dtscore.dts", 6, 16, 48000.0, AudioCodec.Dts)] + [InlineData("../../../../HD Audio/2L-125_04_stereo.mqa.flac", 2, 24, 44100.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-125_mch-96k-24b_04.flac", 6, 24, 96000.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-125_stereo-44k-16b_04.flac", 2, 16, 44100.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-125_stereo-88k-24b_04.flac", 2, 24, 88200.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-125_stereo-176k-24b_04.flac", 2, 24, 176400.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-125_stereo-352k-24b_04.flac", 2, 24, 352800.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-125_mch-2822k-1b_04.dsf", 6, 1, 2822400.0, AudioCodec.Dsd)] + [InlineData("../../../../HD Audio/2L-125_stereo-2822k-1b_04.dsf", 2, 1, 2822400.0, AudioCodec.Dsd)] + [InlineData("../../../../HD Audio/2L-125_stereo-5644k-1b_04.dsf", 2, 1, 5644800.0, AudioCodec.Dsd)] + [InlineData("../../../../HD Audio/2L-125_stereo-11289k-1b_04.dsf", 2, 1, 11289600.0, AudioCodec.Dsd)] + [InlineData("../../../../HD Audio/2L-145_01_stereo.mqa.flac", 2, 24, 44100.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-145_01_stereo.mqacd.mqa.flac", 2, 16, 44100.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-145_mch_FLAC_96k_24b_01.flac", 6, 24, 96000.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-45_stereo_01_DSF_11289k_1b.dsf", 2, 1, 11289600.0, AudioCodec.Dsd)] + [InlineData("../../../../HD Audio/2L-45_stereo_01_FLAC_88k_24b.flac", 2, 24, 88200.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-45_stereo_01_FLAC_176k_24b.flac", 2, 24, 176400.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/2L-45_stereo_01_FLAC_352k_24b.flac", 2, 24, 352800.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/03_NEUE_MUSIK_BERND_THEWESl_kleine_pingpark_wolke_DTS.wav", 6, 24, 44100.0, AudioCodec.Dts)] + [InlineData("../../../../HD Audio/3-1.dts", 4, 24, 48000.0, AudioCodec.DtsHdMa)] + [InlineData("../../../../HD Audio/5.1 24bit.dts", 6, 24, 48000.0, AudioCodec.Dts)] + [InlineData("../../../../HD Audio/06_NEW_JAZZ_SSQ3_ENERGY_DTS.wav", 6, 24, 44100.0, AudioCodec.Dts)] + [InlineData("../../../../HD Audio/7.1auditionOutLeader v2.wav", 8, 16, 48000.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../HD Audio/7_pt_1.eac3", 8, 0, 48000.0, AudioCodec.Eac3)] + [InlineData("../../../../HD Audio/8_Channel_ID.m4a", 8, 0, 48000.0, AudioCodec.AacMpeg4Lc)] + [InlineData("../../../../HD Audio/96-24.dts", 6, 24, 96000.0, AudioCodec.DtsHd)] + [InlineData("../../../../HD Audio/Berlioz - Hungarian March.aac", 6, 0, 48000.0, AudioCodec.AacMpeg4LcSbr)] + [InlineData("../../../../HD Audio/Berlioz - Hungarian March.wma", 6, 24, 96000.0, AudioCodec.WmaPro)] + [InlineData("../../../../HD Audio/Broadway-5.1-48khz-448kbit.ac3", 6, 0, 48000.0, AudioCodec.Ac3)] + [InlineData("../../../../HD Audio/csi_miami_5.1_256_spx.eac3", 6, 0, 48000.0, AudioCodec.Eac3)] + [InlineData("../../../../HD Audio/csi_miami_5.1_256_spx_nero.flac", 6, 24, 48000.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/ct_faac-adts.aac", 2, 0, 44100.0, AudioCodec.AacMpeg4Lc)] + [InlineData("../../../../HD Audio/Cybele_SACD_030802_24b96k_8ch_Aurophonie_11.flac", 8, 24, 96000.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/Cybele_SACD_030802_24b96k_Surround_11.flac", 5, 24, 96000.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/Cybele_SACD_030802_DSD_Surround_11.dsf", 5, 1, 2822400.0, AudioCodec.Dsd)] + [InlineData("../../../../HD Audio/Cybele_SACD_051501_16b44k_3D-Binaural-Stereo_03.flac", 2, 16, 44100.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/Cybele_SACD_051501_24b96k_3D-Binaural-Stereo_03.flac", 2, 24, 96000.0, AudioCodec.Flac)] + [InlineData("../../../../HD Audio/dtswavsample14.wav", 6, 24, 44100.0, AudioCodec.Dts)] + [InlineData("../../../../HD Audio/ES 6.1 - 5.1 16bit.dts", 7, 16, 48000.0, AudioCodec.DtsEs)] + [InlineData("../../../../HD Audio/ES 6.1 24bit.dts", 7, 24, 48000.0, AudioCodec.DtsEs)] + [InlineData("../../../../HD Audio/faad_infinite_long.aacp", 2, 0, 44100.0, AudioCodec.AacMpeg4LcSbrPs)] + [InlineData("../../../../HD Audio/Hi-Res 6.1 24bit.dts", 7, 24, 48000.0, AudioCodec.DtsHdHra)] + [InlineData("../../../../HD Audio/lotr_5.1_768.dts", 7, 24, 48000.0, AudioCodec.DtsEs)] + [InlineData("../../../../HD Audio/Major 06 kwestia 03.mka", 1, 0, 48000.0, AudioCodec.AacMpeg4LcSbrPs)] + [InlineData("../../../../HD Audio/Master Audio 2.0 16bit.dts", 2, 16, 48000.0, AudioCodec.DtsHdMa)] + [InlineData("../../../../HD Audio/Master Audio 5.0 96khz.dts", 5, 24, 96000.0, AudioCodec.DtsHdMa)] + [InlineData("../../../../HD Audio/Master Audio 5.1 24bit.dts", 6, 24, 48000.0, AudioCodec.DtsHdMa)] + [InlineData("../../../../HD Audio/Master Audio 7.1.dts", 8, 24, 48000.0, AudioCodec.DtsHdMa)] + [InlineData("../../../../HD Audio/Master Audio 7.1 24bit.dts", 8, 24, 48000.0, AudioCodec.DtsHdMa)] + [InlineData("../../../../HD Audio/monsters_inc_5.1_448.ac3", 6, 0, 48000.0, AudioCodec.Ac3)] + [InlineData("../../../../HD Audio/SBR_LFETest5_1-441-16b.wav", 6, 16, 44100.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../HD Audio/stuttering_dts_truhd.dts", 6, 24, 48000.0, AudioCodec.Dts)] + [InlineData("../../../../HD Audio/thx_2_0.ac3", 2, 0, 48000.0, AudioCodec.Ac3)] + [InlineData("../../../../HD Audio/working_dts_with_dtscore.dts", 6, 16, 48000.0, AudioCodec.Dts)] public void LoadHdAudioFile(string fileName, int channels, int bitDepth, double samplingRate, AudioCodec codec) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -137,98 +137,98 @@ public void LoadHdAudioFile(string fileName, int channels, int bitDepth, double #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../Audio/8_Channel_ID.wav", 8, 24, 48000.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/8_Channel_ID.wma", 8, 24, 48000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/16bit.wv", 2, 16, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/24bit.wv", 2, 24, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/24kbps.wvc", 1, 16, 8000.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/27 MC Solaar - Rmi.mp3", 2, 0, 22050.0, AudioCodec.MpegLayer3)] - [InlineData(@"../../../../Audio/32bit_float.wv", 2, 32, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/32bit_int.wv", 2, 32, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/32bit_int_p.wv", 2, 32, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/320kbps.wv", 2, 16, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/320kbps.wvc", 2, 16, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/440hz.mlp", 2, 16, 44100.0, AudioCodec.Mlp)] - [InlineData(@"../../../../Audio/440hz.wv", 2, 16, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/adpcmtst.wav", 2, 4, 11025.0, AudioCodec.Adpcm)] - [InlineData(@"../../../../Audio/ALAC_6ch.mov", 6, 0, 48000.0, AudioCodec.Alac)] - [InlineData(@"../../../../Audio/ALAC_24bits2.mov", 2, 0, 48000.0, AudioCodec.Alac)] - [InlineData(@"../../../../Audio/alac_encoding_failes.wav", 2, 16, 44100.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/ambient4_192_mulitchannel.wma", 6, 24, 48000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/at3p_sample1.oma", 2, 0, 44100.0, AudioCodec.Atrac3)] - [InlineData(@"../../../../Audio/at3p_sample6.oma", 2, 0, 44100.0, AudioCodec.Atrac3)] - [InlineData(@"../../../../Audio/Ayumi Hamasaki - ever free.wv", 2, 16, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/Bach1-1.aiff", 1, 8, 22255.0, AudioCodec.PcmIntBig)] - [InlineData(@"../../../../Audio/basicinstinct.ogm", 2, 0, 44100.0, AudioCodec.Vorbis)] - [InlineData(@"../../../../Audio/Beethovens nionde symfoni (Scherzo)-2.wma", 2, 24, 48000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/Boys3-1.aiff", 1, 8, 22255.0, AudioCodec.Mac3)] - [InlineData(@"../../../../Audio/Boys6-1.aiff", 1, 8, 22255.0, AudioCodec.Mac6)] - [InlineData(@"../../../../Audio/chrisrock-nosex.asf", 1, 16, 16000.0, AudioCodec.Wma1)] - [InlineData(@"../../../../Audio/classical_16_16_1_8000_off_0_off_1_29.wma", 1, 16, 16000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/Classical_96_24_6_256000_1_20.wma", 6, 24, 96000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/cristinreel.mov", 2, 8, 44100.0, AudioCodec.Mac6)] - [InlineData(@"../../../../Audio/DG.wmv", 2, 16, 48000.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/dune2.avi", 2, 0, 48000.0, AudioCodec.MpegLayer3)] - [InlineData(@"../../../../Audio/edward_4.0_24bit.wv", 4, 24, 48000.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/eoa.wma", 2, 16, 44100.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/farm.wav", 1, 8, 11025.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/ffvorbis_crash.ogm", 2, 0, 48000.0, AudioCodec.Vorbis)] - [InlineData(@"../../../../Audio/format-0x42-speechtest-MSG5.3.asf", 1, 0, 8000.0, AudioCodec.G_723_1)] - [InlineData(@"../../../../Audio/God Save The Queen.mlp", 6, 24, 96000.0, AudioCodec.Mlp)] - [InlineData(@"../../../../Audio/H263_ALAC_24bits.mov", 2, 0, 48000.0, AudioCodec.Alac)] - [InlineData(@"../../../../Audio/intro - Creative ADPCM.wav", 1, 4, 44100.0, AudioCodec.Adpcm)] - [InlineData(@"../../../../Audio/jpg_in_mp3.mp3", 2, 0, 44100.0, AudioCodec.MpegLayer3)] - [InlineData(@"../../../../Audio/large_superframe.wma", 2, 16, 44100.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/lbd-ts.wav", 1, 1, 8000.0, AudioCodec.Truespeech)] - [InlineData(@"../../../../Audio/luckynight.ape", 2, 16, 44100.0, AudioCodec.Ape)] - [InlineData(@"../../../../Audio/luckynight.flac", 2, 16, 44100.0, AudioCodec.Flac)] - [InlineData(@"../../../../Audio/luckynight.m4a", 2, 16, 44100.0, AudioCodec.Alac)] - [InlineData(@"../../../../Audio/luckynight.rka", 2, 16, 44100.0, AudioCodec.RkAudio)] - [InlineData(@"../../../../Audio/luckynight.rmvb", 0, 0, 0.0, AudioCodec.Real10)] - [InlineData(@"../../../../Audio/luckynight.tta", 2, 16, 44100.0, AudioCodec.Tta1)] - [InlineData(@"../../../../Audio/luckynight.wma", 2, 16, 44100.0, AudioCodec.WmaLossless)] - [InlineData(@"../../../../Audio/luckynight.wv", 2, 16, 44100.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/luckynight-als.mp4", 2, 0, 44100.0, AudioCodec.Als)] - [InlineData(@"../../../../Audio/Lumme-Badloop.ogg", 2, 0, 44100.0, AudioCodec.Vorbis)] - [InlineData(@"../../../../Audio/mac3audio.mov", 2, 8, 22050.0, AudioCodec.Mac3)] - [InlineData(@"../../../../Audio/mjpega.mov", 1, 8, 8000.0, AudioCodec.Mac6)] - [InlineData(@"../../../../Audio/mp3_with_embedded_albumart.mp3", 2, 0, 44100.0, AudioCodec.MpegLayer3)] - [InlineData(@"../../../../Audio/mpeg-in-ogm.ogm", 2, 0, 48000.0, AudioCodec.Vorbis)] - [InlineData(@"../../../../Audio/mpeg_layer1_audio.mpg", 2, 0, 44100.0, AudioCodec.MpegLayer1)] - [InlineData(@"../../../../Audio/mplayer_sample-audio_0x161.wmv", 2, 16, 44100.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/newedition-coolitnow.24bit-lpcm.vob", 2, 24, 48000.0, AudioCodec.PcmIntBig)] - [InlineData(@"../../../../Audio/newOrleans_192_mulitchannel.wma", 6, 24, 48000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/old_midi_stuff.m4a", 2, 16, 44100.0, AudioCodec.Alac)] - [InlineData(@"../../../../Audio/panslab_sample_5.1_16bit.wv", 6, 16, 48000.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/panslab_sample_5.1_16bit_lossy.wv", 6, 16, 48000.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/panslab_sample_7.1_16bit_lossy.wv", 8, 16, 48000.0, AudioCodec.WavPack)] - [InlineData(@"../../../../Audio/piece.wmv", 6, 24, 48000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/qanda_2008_ep10.wmv", 2, 16, 44100.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/quicktime-newcodec-applelosslessaudiocodec.m4a", 2, 16, 44100.0, AudioCodec.Alac)] - [InlineData(@"../../../../Audio/raam28mb.wmv", 2, 16, 22050.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/rum.wma", 2, 16, 32000.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/saltnpepa-doyouwantme.asf", 2, 16, 32000.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/sonateno14op27-2.aa3", 2, 0, 44100.0, AudioCodec.Atrac3)] - [InlineData(@"../../../../Audio/streaming.wina.com-live.asx", 1, 16, 22050.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/streaming_CBR-19K-timecomp.wma", 1, 16, 16000.0, AudioCodec.WmaVoice)] - [InlineData(@"../../../../Audio/surge-1-8-MAC3.mov", 1, 8, 44100.0, AudioCodec.Mac3)] - [InlineData(@"../../../../Audio/surge-1-8-MAC3.wav", 1, 16, 44100.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/TAXI8BIT.wav", 1, 8, 11111.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/test-96.wav", 2, 24, 96000.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/testvector01.ogg", 2, 0, 44100.0, AudioCodec.Opus)] - [InlineData(@"../../../../Audio/testvector07.ogg", 2, 0, 44100.0, AudioCodec.Opus)] - [InlineData(@"../../../../Audio/tide_8-bit_22KHz.wav", 1, 8, 22050.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/tide_16-bit_44KHz_master.wav", 1, 16, 44100.0, AudioCodec.PcmIntLit)] - [InlineData(@"../../../../Audio/toesidebackroll.AVI", 2, 2, 44100.0, AudioCodec.Iac2)] - [InlineData(@"../../../../Audio/traciespencer-allaboutyou.asf", 2, 16, 22050.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/TrueHD.raw", 6, 0, 48000.0, AudioCodec.Truehd)] - [InlineData(@"../../../../Audio/truespeech_a5.wav", 1, 1, 8000.0, AudioCodec.Truespeech)] - [InlineData(@"../../../../Audio/vc1-with-truehd.m2ts", 6, 0, 48000.0, AudioCodec.Ac3)] - [InlineData(@"../../../../Audio/vorbis3plus_sample.avi", 2, 0, 48000.0, AudioCodec.Vorbis)] - [InlineData(@"../../../../Audio/WMA_protected_napster.wma", 2, 16, 44100.0, AudioCodec.Wma2)] - [InlineData(@"../../../../Audio/wmav_8.wma", 1, 16, 8000.0, AudioCodec.WmaVoice)] - [InlineData(@"../../../../Audio/wmv-surroundtest_720p.wmv", 6, 24, 48000.0, AudioCodec.WmaPro)] - [InlineData(@"../../../../Audio/wmv3-wmaspeeech.wmv", 1, 16, 8000.0, AudioCodec.WmaVoice)] + [InlineData("../../../../Audio/8_Channel_ID.wav", 8, 24, 48000.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/8_Channel_ID.wma", 8, 24, 48000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/16bit.wv", 2, 16, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/24bit.wv", 2, 24, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/24kbps.wvc", 1, 16, 8000.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/27 MC Solaar - Rmi.mp3", 2, 0, 22050.0, AudioCodec.MpegLayer3)] + [InlineData("../../../../Audio/32bit_float.wv", 2, 32, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/32bit_int.wv", 2, 32, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/32bit_int_p.wv", 2, 32, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/320kbps.wv", 2, 16, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/320kbps.wvc", 2, 16, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/440hz.mlp", 2, 16, 44100.0, AudioCodec.Mlp)] + [InlineData("../../../../Audio/440hz.wv", 2, 16, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/adpcmtst.wav", 2, 4, 11025.0, AudioCodec.Adpcm)] + [InlineData("../../../../Audio/ALAC_6ch.mov", 6, 0, 48000.0, AudioCodec.Alac)] + [InlineData("../../../../Audio/ALAC_24bits2.mov", 2, 0, 48000.0, AudioCodec.Alac)] + [InlineData("../../../../Audio/alac_encoding_failes.wav", 2, 16, 44100.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/ambient4_192_mulitchannel.wma", 6, 24, 48000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/at3p_sample1.oma", 2, 0, 44100.0, AudioCodec.Atrac3)] + [InlineData("../../../../Audio/at3p_sample6.oma", 2, 0, 44100.0, AudioCodec.Atrac3)] + [InlineData("../../../../Audio/Ayumi Hamasaki - ever free.wv", 2, 16, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/Bach1-1.aiff", 1, 8, 22255.0, AudioCodec.PcmIntBig)] + [InlineData("../../../../Audio/basicinstinct.ogm", 2, 0, 44100.0, AudioCodec.Vorbis)] + [InlineData("../../../../Audio/Beethovens nionde symfoni (Scherzo)-2.wma", 2, 24, 48000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/Boys3-1.aiff", 1, 8, 22255.0, AudioCodec.Mac3)] + [InlineData("../../../../Audio/Boys6-1.aiff", 1, 8, 22255.0, AudioCodec.Mac6)] + [InlineData("../../../../Audio/chrisrock-nosex.asf", 1, 16, 16000.0, AudioCodec.Wma1)] + [InlineData("../../../../Audio/classical_16_16_1_8000_off_0_off_1_29.wma", 1, 16, 16000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/Classical_96_24_6_256000_1_20.wma", 6, 24, 96000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/cristinreel.mov", 2, 8, 44100.0, AudioCodec.Mac6)] + [InlineData("../../../../Audio/DG.wmv", 2, 16, 48000.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/dune2.avi", 2, 0, 48000.0, AudioCodec.MpegLayer3)] + [InlineData("../../../../Audio/edward_4.0_24bit.wv", 4, 24, 48000.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/eoa.wma", 2, 16, 44100.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/farm.wav", 1, 8, 11025.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/ffvorbis_crash.ogm", 2, 0, 48000.0, AudioCodec.Vorbis)] + [InlineData("../../../../Audio/format-0x42-speechtest-MSG5.3.asf", 1, 0, 8000.0, AudioCodec.G_723_1)] + [InlineData("../../../../Audio/God Save The Queen.mlp", 6, 24, 96000.0, AudioCodec.Mlp)] + [InlineData("../../../../Audio/H263_ALAC_24bits.mov", 2, 0, 48000.0, AudioCodec.Alac)] + [InlineData("../../../../Audio/intro - Creative ADPCM.wav", 1, 4, 44100.0, AudioCodec.Adpcm)] + [InlineData("../../../../Audio/jpg_in_mp3.mp3", 2, 0, 44100.0, AudioCodec.MpegLayer3)] + [InlineData("../../../../Audio/large_superframe.wma", 2, 16, 44100.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/lbd-ts.wav", 1, 1, 8000.0, AudioCodec.Truespeech)] + [InlineData("../../../../Audio/luckynight.ape", 2, 16, 44100.0, AudioCodec.Ape)] + [InlineData("../../../../Audio/luckynight.flac", 2, 16, 44100.0, AudioCodec.Flac)] + [InlineData("../../../../Audio/luckynight.m4a", 2, 16, 44100.0, AudioCodec.Alac)] + [InlineData("../../../../Audio/luckynight.rka", 2, 16, 44100.0, AudioCodec.RkAudio)] + [InlineData("../../../../Audio/luckynight.rmvb", 0, 0, 0.0, AudioCodec.Real10)] + [InlineData("../../../../Audio/luckynight.tta", 2, 16, 44100.0, AudioCodec.Tta1)] + [InlineData("../../../../Audio/luckynight.wma", 2, 16, 44100.0, AudioCodec.WmaLossless)] + [InlineData("../../../../Audio/luckynight.wv", 2, 16, 44100.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/luckynight-als.mp4", 2, 0, 44100.0, AudioCodec.Als)] + [InlineData("../../../../Audio/Lumme-Badloop.ogg", 2, 0, 44100.0, AudioCodec.Vorbis)] + [InlineData("../../../../Audio/mac3audio.mov", 2, 8, 22050.0, AudioCodec.Mac3)] + [InlineData("../../../../Audio/mjpega.mov", 1, 8, 8000.0, AudioCodec.Mac6)] + [InlineData("../../../../Audio/mp3_with_embedded_albumart.mp3", 2, 0, 44100.0, AudioCodec.MpegLayer3)] + [InlineData("../../../../Audio/mpeg-in-ogm.ogm", 2, 0, 48000.0, AudioCodec.Vorbis)] + [InlineData("../../../../Audio/mpeg_layer1_audio.mpg", 2, 0, 44100.0, AudioCodec.MpegLayer1)] + [InlineData("../../../../Audio/mplayer_sample-audio_0x161.wmv", 2, 16, 44100.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/newedition-coolitnow.24bit-lpcm.vob", 2, 24, 48000.0, AudioCodec.PcmIntBig)] + [InlineData("../../../../Audio/newOrleans_192_mulitchannel.wma", 6, 24, 48000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/old_midi_stuff.m4a", 2, 16, 44100.0, AudioCodec.Alac)] + [InlineData("../../../../Audio/panslab_sample_5.1_16bit.wv", 6, 16, 48000.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/panslab_sample_5.1_16bit_lossy.wv", 6, 16, 48000.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/panslab_sample_7.1_16bit_lossy.wv", 8, 16, 48000.0, AudioCodec.WavPack)] + [InlineData("../../../../Audio/piece.wmv", 6, 24, 48000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/qanda_2008_ep10.wmv", 2, 16, 44100.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/quicktime-newcodec-applelosslessaudiocodec.m4a", 2, 16, 44100.0, AudioCodec.Alac)] + [InlineData("../../../../Audio/raam28mb.wmv", 2, 16, 22050.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/rum.wma", 2, 16, 32000.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/saltnpepa-doyouwantme.asf", 2, 16, 32000.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/sonateno14op27-2.aa3", 2, 0, 44100.0, AudioCodec.Atrac3)] + [InlineData("../../../../Audio/streaming.wina.com-live.asx", 1, 16, 22050.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/streaming_CBR-19K-timecomp.wma", 1, 16, 16000.0, AudioCodec.WmaVoice)] + [InlineData("../../../../Audio/surge-1-8-MAC3.mov", 1, 8, 44100.0, AudioCodec.Mac3)] + [InlineData("../../../../Audio/surge-1-8-MAC3.wav", 1, 16, 44100.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/TAXI8BIT.wav", 1, 8, 11111.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/test-96.wav", 2, 24, 96000.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/testvector01.ogg", 2, 0, 44100.0, AudioCodec.Opus)] + [InlineData("../../../../Audio/testvector07.ogg", 2, 0, 44100.0, AudioCodec.Opus)] + [InlineData("../../../../Audio/tide_8-bit_22KHz.wav", 1, 8, 22050.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/tide_16-bit_44KHz_master.wav", 1, 16, 44100.0, AudioCodec.PcmIntLit)] + [InlineData("../../../../Audio/toesidebackroll.AVI", 2, 2, 44100.0, AudioCodec.Iac2)] + [InlineData("../../../../Audio/traciespencer-allaboutyou.asf", 2, 16, 22050.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/TrueHD.raw", 6, 0, 48000.0, AudioCodec.Truehd)] + [InlineData("../../../../Audio/truespeech_a5.wav", 1, 1, 8000.0, AudioCodec.Truespeech)] + [InlineData("../../../../Audio/vc1-with-truehd.m2ts", 6, 0, 48000.0, AudioCodec.Ac3)] + [InlineData("../../../../Audio/vorbis3plus_sample.avi", 2, 0, 48000.0, AudioCodec.Vorbis)] + [InlineData("../../../../Audio/WMA_protected_napster.wma", 2, 16, 44100.0, AudioCodec.Wma2)] + [InlineData("../../../../Audio/wmav_8.wma", 1, 16, 8000.0, AudioCodec.WmaVoice)] + [InlineData("../../../../Audio/wmv-surroundtest_720p.wmv", 6, 24, 48000.0, AudioCodec.WmaPro)] + [InlineData("../../../../Audio/wmv3-wmaspeeech.wmv", 1, 16, 8000.0, AudioCodec.WmaVoice)] public void LoadAudioFile(string fileName, int channels, int bitDepth, double samplingRate, AudioCodec codec) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -245,44 +245,44 @@ public void LoadAudioFile(string fileName, int channels, int bitDepth, double sa #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../HD Audio/7.1auditionOutLeader_v2_rtb.mp4", 8, 0, 48000.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] - [InlineData(@"../../../../HD Audio/7_pt_1_sample.evo", 8, 0, 48000.0, AudioCodec.Eac3, 0, 1)] - [InlineData(@"../../../../HD Audio/12-10_19-18-52_BBC HD_Wild China.ts", 6, 0, 48000.0, AudioCodec.AacMpeg4Lc, 0, 2)] - [InlineData(@"../../../../HD Audio/ac3-sound-sample.vob", 6, 0, 48000.0, AudioCodec.Ac3, 0, 1)] - [InlineData(@"../../../../HD Audio/bond_sample_dtshdma.m2ts", 6, 24, 48000.0, AudioCodec.DtsHdMa, 0, 7)] - [InlineData(@"../../../../HD Audio/ChID-BLITS-EBU.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] - [InlineData(@"../../../../HD Audio/ChID-BLITS-EBU-Narration.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] - [InlineData(@"../../../../HD Audio/danish-1.m2t", 2, 0, 48000.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] - [InlineData(@"../../../../HD Audio/DNCE 29.97 h264 1080i 26mbps DTS-HD MA 2.0 sample.mkv", 2, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] - [InlineData(@"../../../../HD Audio/dolby-audiosphere-lossless-(www.demolandia.net).m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] - [InlineData(@"../../../../HD Audio/dolby-silent-lossless-(www.demolandia.net).m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] - [InlineData(@"../../../../HD Audio/Dolby ATMOS Helicopter.m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] - [InlineData(@"../../../../HD Audio/dolby_amaze_lossless-DWEU.m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] - [InlineData(@"../../../../HD Audio/dolby_digital_plus_channel_check_lossless-DWEU.mkv", 6, 0, 48000.0, AudioCodec.Eac3, 0, 1)] - [InlineData(@"../../../../HD Audio/dolby_truehd_channel_check_lossless-DWEU.mkv", 8, 0, 48000.0, AudioCodec.Truehd, 0, 1)] - [InlineData(@"../../../../HD Audio/Dredd – DTS Sound Check DTS-HD MA 7.1.m2ts", 8, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] - [InlineData(@"../../../../HD Audio/DTS-HRA5.1_VC1-23.976.mkv", 6, 24, 96000.0, AudioCodec.DtsHdHra, 0, 1)] - [InlineData(@"../../../../HD Audio/dts-listen-x-long-lossless-(www.demolandia.net).mkv", 8, 0, 48000.0, AudioCodec.DtsX, 0, 1)] - [InlineData(@"../../../../HD Audio/dts-sound-unbound-callout-11.1-lossless-(www.demolandia.net).mkv", 8, 0, 48000.0, AudioCodec.DtsX, 0, 1)] - [InlineData(@"../../../../HD Audio/DTS-X Gravity.mkv", 8, 24, 48000.0, AudioCodec.DtsX, 0, 1)] - [InlineData(@"../../../../HD Audio/dts_hd_master_audio_sound_check_7_1_lossless-DWEU.mkv", 6, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] - [InlineData(@"../../../../HD Audio/dts_MA_all_around_us_lossless-DWEU.mkv", 8, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] - [InlineData(@"../../../../HD Audio/dts_orchestra_short_lossless-DWEU.mkv", 6, 24, 96000.0, AudioCodec.DtsHdHra, 0, 1)] - [InlineData(@"../../../../HD Audio/dtsac3audiosample.avi", 6, 16, 48000.0, AudioCodec.Dts, 0, 1)] - [InlineData(@"../../../../HD Audio/DTSX_Demo_2016.m2ts", 0, 0, 0.0, AudioCodec.DtsX, 0, 1)] - [InlineData(@"../../../../HD Audio/dvb-aac-latm.m2t", 2, 0, 48000.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] - [InlineData(@"../../../../HD Audio/freetv_aac_latm.ts", 1, 0, 24000.0, AudioCodec.AacMpeg4Lc, 0, 1)] - [InlineData(@"../../../../HD Audio/hd_dts_hd_master_audio_sound_check_5_1_lossless.m2ts", 6, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] - [InlineData(@"../../../../HD Audio/lfe_is_sce.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4Lc, 0, 1)] - [InlineData(@"../../../../HD Audio/opus.ts", 0, 0, 0.0, AudioCodec.Opus, 0, 1)] - [InlineData(@"../../../../HD Audio/POCAWE_Sample.mkv", 6, 24, 48000.0, AudioCodec.PcmIntLit, 0, 1)] - [InlineData(@"../../../../HD Audio/Safari_ Dolby_Digital_Plus.m2ts", 8, 0, 48000.0, AudioCodec.Eac3, 0, 1)] - [InlineData(@"../../../../HD Audio/SBR_LFEtest5_1.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] - [InlineData(@"../../../../HD Audio/small-sample-file.ts", 6, 20, 48000.0, AudioCodec.Dts, 0, 2)] - [InlineData(@"../../../../HD Audio/transf.m2ts", 6, 0, 48000.0, AudioCodec.Ac3, 0, 5)] - [InlineData(@"../../../../HD Audio/VC1-1080p23.976-LPCM7.1.mkv", 8, 16, 48000.0, AudioCodec.PcmIntLit, 0, 1)] - [InlineData(@"../../../../HD Audio/zodiac_audio.mov", 6, 0, 48000.0, AudioCodec.AacMpeg4Lc, 0, 1)] - [InlineData(@"../../../../HD Audio/zx.eva.renewal.01.divx511.mkv", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 2)] + [InlineData("../../../../HD Audio/7.1auditionOutLeader_v2_rtb.mp4", 8, 0, 48000.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] + [InlineData("../../../../HD Audio/7_pt_1_sample.evo", 8, 0, 48000.0, AudioCodec.Eac3, 0, 1)] + [InlineData("../../../../HD Audio/12-10_19-18-52_BBC HD_Wild China.ts", 6, 0, 48000.0, AudioCodec.AacMpeg4Lc, 0, 2)] + [InlineData("../../../../HD Audio/ac3-sound-sample.vob", 6, 0, 48000.0, AudioCodec.Ac3, 0, 1)] + [InlineData("../../../../HD Audio/bond_sample_dtshdma.m2ts", 6, 24, 48000.0, AudioCodec.DtsHdMa, 0, 7)] + [InlineData("../../../../HD Audio/ChID-BLITS-EBU.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] + [InlineData("../../../../HD Audio/ChID-BLITS-EBU-Narration.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] + [InlineData("../../../../HD Audio/danish-1.m2t", 2, 0, 48000.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] + [InlineData("../../../../HD Audio/DNCE 29.97 h264 1080i 26mbps DTS-HD MA 2.0 sample.mkv", 2, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] + [InlineData("../../../../HD Audio/dolby-audiosphere-lossless-(www.demolandia.net).m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] + [InlineData("../../../../HD Audio/dolby-silent-lossless-(www.demolandia.net).m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] + [InlineData("../../../../HD Audio/Dolby ATMOS Helicopter.m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] + [InlineData("../../../../HD Audio/dolby_amaze_lossless-DWEU.m2ts", 8, 0, 48000.0, AudioCodec.TruehdAtmos, 0, 2)] + [InlineData("../../../../HD Audio/dolby_digital_plus_channel_check_lossless-DWEU.mkv", 6, 0, 48000.0, AudioCodec.Eac3, 0, 1)] + [InlineData("../../../../HD Audio/dolby_truehd_channel_check_lossless-DWEU.mkv", 8, 0, 48000.0, AudioCodec.Truehd, 0, 1)] + [InlineData("../../../../HD Audio/Dredd – DTS Sound Check DTS-HD MA 7.1.m2ts", 8, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] + [InlineData("../../../../HD Audio/DTS-HRA5.1_VC1-23.976.mkv", 6, 24, 96000.0, AudioCodec.DtsHdHra, 0, 1)] + [InlineData("../../../../HD Audio/dts-listen-x-long-lossless-(www.demolandia.net).mkv", 8, 0, 48000.0, AudioCodec.DtsX, 0, 1)] + [InlineData("../../../../HD Audio/dts-sound-unbound-callout-11.1-lossless-(www.demolandia.net).mkv", 8, 0, 48000.0, AudioCodec.DtsX, 0, 1)] + [InlineData("../../../../HD Audio/DTS-X Gravity.mkv", 8, 24, 48000.0, AudioCodec.DtsX, 0, 1)] + [InlineData("../../../../HD Audio/dts_hd_master_audio_sound_check_7_1_lossless-DWEU.mkv", 6, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] + [InlineData("../../../../HD Audio/dts_MA_all_around_us_lossless-DWEU.mkv", 8, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] + [InlineData("../../../../HD Audio/dts_orchestra_short_lossless-DWEU.mkv", 6, 24, 96000.0, AudioCodec.DtsHdHra, 0, 1)] + [InlineData("../../../../HD Audio/dtsac3audiosample.avi", 6, 16, 48000.0, AudioCodec.Dts, 0, 1)] + [InlineData("../../../../HD Audio/DTSX_Demo_2016.m2ts", 0, 0, 0.0, AudioCodec.DtsX, 0, 1)] + [InlineData("../../../../HD Audio/dvb-aac-latm.m2t", 2, 0, 48000.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] + [InlineData("../../../../HD Audio/freetv_aac_latm.ts", 1, 0, 24000.0, AudioCodec.AacMpeg4Lc, 0, 1)] + [InlineData("../../../../HD Audio/hd_dts_hd_master_audio_sound_check_5_1_lossless.m2ts", 6, 24, 48000.0, AudioCodec.DtsHdMa, 0, 1)] + [InlineData("../../../../HD Audio/lfe_is_sce.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4Lc, 0, 1)] + [InlineData("../../../../HD Audio/opus.ts", 0, 0, 0.0, AudioCodec.Opus, 0, 1)] + [InlineData("../../../../HD Audio/POCAWE_Sample.mkv", 6, 24, 48000.0, AudioCodec.PcmIntLit, 0, 1)] + [InlineData("../../../../HD Audio/Safari_ Dolby_Digital_Plus.m2ts", 8, 0, 48000.0, AudioCodec.Eac3, 0, 1)] + [InlineData("../../../../HD Audio/SBR_LFEtest5_1.mp4", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 1)] + [InlineData("../../../../HD Audio/small-sample-file.ts", 6, 20, 48000.0, AudioCodec.Dts, 0, 2)] + [InlineData("../../../../HD Audio/transf.m2ts", 6, 0, 48000.0, AudioCodec.Ac3, 0, 5)] + [InlineData("../../../../HD Audio/VC1-1080p23.976-LPCM7.1.mkv", 8, 16, 48000.0, AudioCodec.PcmIntLit, 0, 1)] + [InlineData("../../../../HD Audio/zodiac_audio.mov", 6, 0, 48000.0, AudioCodec.AacMpeg4Lc, 0, 1)] + [InlineData("../../../../HD Audio/zx.eva.renewal.01.divx511.mkv", 6, 0, 44100.0, AudioCodec.AacMpeg4LcSbr, 0, 2)] public void LoadHdAudioFromVideoContainer(string fileName, int channels, int bitDepth, double samplingRate, AudioCodec codec, int index, int audioCount) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -298,8 +298,8 @@ public void LoadHdAudioFromVideoContainer(string fileName, int channels, int bit } [Theory] - [InlineData(@"./Data/Test_MP3Tags.mp3", 74406L)] - [InlineData(@"./Data/Test_MP3Tags_2.mp3", 212274L)] + [InlineData("./Data/Test_MP3Tags.mp3", 74406L)] + [InlineData("./Data/Test_MP3Tags_2.mp3", 212274L)] public void LoadMp3FileWithTags(string fileName, long size) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -327,7 +327,7 @@ public void LoadMp3FileWithTags(string fileName, long size) } [Theory] - [InlineData(@"./Data/Test_MP3Tags.mka")] + [InlineData("./Data/Test_MP3Tags.mka")] public void LoadMultiStreamContainer(string fileName) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); diff --git a/MediaInfo.Wrapper.Tests/VideoTests.cs b/MediaInfo.Wrapper.Tests/VideoTests.cs index 3b29b66..906621c 100644 --- a/MediaInfo.Wrapper.Tests/VideoTests.cs +++ b/MediaInfo.Wrapper.Tests/VideoTests.cs @@ -37,7 +37,7 @@ public VideoTests(ITestOutputHelper testOutputHelper) } [Theory] - [InlineData(@"./Data/RTL_7_Darts_WK_2014-2013-12-23_1_h263.3gp")] + [InlineData("./Data/RTL_7_Darts_WK_2014-2013-12-23_1_h263.3gp")] public void LoadSimpleVideo(string fileName) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -66,7 +66,7 @@ public void LoadSimpleVideo(string fileName) } [Theory] - [InlineData(@"./Data/Test_H264_Atmos.m2ts")] + [InlineData("./Data/Test_H264_Atmos.m2ts")] public void LoadVideoWithDolbyAtmos(string fileName) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -100,7 +100,7 @@ public void LoadVideoWithDolbyAtmos(string fileName) } [Theory] - [InlineData(@"./Data/Test_H264_Ac3.m2ts")] + [InlineData("./Data/Test_H264_Ac3.m2ts")] public void LoadVideoWithDolbyDigital(string fileName) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -128,7 +128,7 @@ public void LoadVideoWithDolbyDigital(string fileName) } [Theory] - [InlineData(@"./Data/Test_H264.m2ts")] + [InlineData("./Data/Test_H264.m2ts")] public void LoadVideoWithoutAudio(string fileName) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -158,7 +158,7 @@ public void LoadVideoWithoutAudio(string fileName) #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"//192.168.1.187/Video_O/2016 DOLBY ATMOS DEMO DISC/BDMV/index.bdmv")] + [InlineData("//192.168.50.31/Video_O/2016 DOLBY ATMOS DEMO DISC/BDMV/index.bdmv")] public void LoadBluRayWithMenuAndDolbyAtmos(string fileName) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -189,20 +189,20 @@ public void LoadBluRayWithMenuAndDolbyAtmos(string fileName) #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../HDR/PE2_Leopard_4K.mkv", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.DtsHdMa, 6)] - [InlineData(@"../../../../HDR/LaLaLand_cafe_4K.mkv", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.TruehdAtmos, 8)] - [InlineData(@"../../../../HDR/The Redwoods.mkv", VideoCodec.Vp9, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling332, AudioCodec.Vorbis, 2)] - [InlineData(@"../../../../HDR/The World in HDR.mkv", VideoCodec.Vp9, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling332, AudioCodec.Vorbis, 2)] - [InlineData(@"../../../../HDR/LG Demo DolbyVision Comparison.mkv", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3, 6)] - [InlineData(@"../../../../HDR/LG Demo DolbyVision Trailer.mkv", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3, 6)] - [InlineData(@"../../../../HDR/LG Amaze Dolby Vision UHD 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3Atmos, 6)] - [InlineData(@"../../../../HDR/LG Daylight 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] - [InlineData(@"../../../../HDR/LG Earth Dolby Vision UHD 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3, 2)] - [InlineData(@"../../../../HDR/LG New York HDR UHD 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] - [InlineData(@"../../../../HDR/Life Untouched 4K Demo.mp4", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] - [InlineData(@"../../../../HDR/Sony Camp 4K Demo.mp4", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT709, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] - [InlineData(@"../../../../HDR/Sony Whale in Tonga HDR UHD 4K Demo.mp4", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] - [InlineData(@"../../../../HDR/TravelXP 4K HDR HLG Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.HLG, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 1)] + [InlineData("../../../../HDR/PE2_Leopard_4K.mkv", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.DtsHdMa, 6)] + [InlineData("../../../../HDR/LaLaLand_cafe_4K.mkv", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.TruehdAtmos, 8)] + [InlineData("../../../../HDR/The Redwoods.mkv", VideoCodec.Vp9, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling332, AudioCodec.Vorbis, 2)] + [InlineData("../../../../HDR/The World in HDR.mkv", VideoCodec.Vp9, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling332, AudioCodec.Vorbis, 2)] + [InlineData("../../../../HDR/LG Demo DolbyVision Comparison.mkv", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3, 6)] + [InlineData("../../../../HDR/LG Demo DolbyVision Trailer.mkv", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3, 6)] + [InlineData("../../../../HDR/LG Amaze Dolby Vision UHD 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3Atmos, 6)] + [InlineData("../../../../HDR/LG Daylight 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] + [InlineData("../../../../HDR/LG Earth Dolby Vision UHD 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.DolbyVision, ColorSpace.Generic, ChromaSubSampling.Sampling420, AudioCodec.Eac3, 2)] + [InlineData("../../../../HDR/LG New York HDR UHD 4K Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] + [InlineData("../../../../HDR/Life Untouched 4K Demo.mp4", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] + [InlineData("../../../../HDR/Sony Camp 4K Demo.mp4", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT709, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] + [InlineData("../../../../HDR/Sony Whale in Tonga HDR UHD 4K Demo.mp4", VideoCodec.MpeghIsoHevc, Hdr.HDR10, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 2)] + [InlineData("../../../../HDR/TravelXP 4K HDR HLG Demo.ts", VideoCodec.MpeghIsoHevc, Hdr.HLG, ColorSpace.BT2020, ChromaSubSampling.Sampling420, AudioCodec.AacMpeg4Lc, 1)] public void LoadHdrDemo(string fileName, VideoCodec videoCodec, Hdr hdr, ColorSpace colorSpace, ChromaSubSampling subSampling, AudioCodec audioCodec, int channels) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -228,15 +228,15 @@ public void LoadHdrDemo(string fileName, VideoCodec videoCodec, Hdr hdr, ColorSp #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../UHD/(HEVC 10-bit 25fps) Astra DVB Sample.ts", VideoCodec.MpeghIsoHevc, 2160, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/4K HEVC 59.940 Broadcast Capture Sample.mkv", VideoCodec.MpeghIsoHevc, 2160, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/4K youtube.webm", VideoCodec.Vp9, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling332)] - [InlineData(@"../../../../UHD/8K youtube.mp4", VideoCodec.Av1, 4320, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/iphone6s_4k.mov", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/lg-uhd-spain-and-patagonia-(www.demolandia.net).mkv", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/samsung-uhd-dubai-(www.demolandia.net).mkv", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/samsung_seven_wonders_of_the_world_china_uhd-DWEU.mkv", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../UHD/4k_Rec709_ProResHQ.mov", VideoCodec.ProRes, 3072, ColorSpace.Generic, ChromaSubSampling.Sampling422)] + [InlineData("../../../../UHD/(HEVC 10-bit 25fps) Astra DVB Sample.ts", VideoCodec.MpeghIsoHevc, 2160, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/4K HEVC 59.940 Broadcast Capture Sample.mkv", VideoCodec.MpeghIsoHevc, 2160, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/4K youtube.webm", VideoCodec.Vp9, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling332)] + [InlineData("../../../../UHD/8K youtube.mp4", VideoCodec.Av1, 4320, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/iphone6s_4k.mov", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/lg-uhd-spain-and-patagonia-(www.demolandia.net).mkv", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/samsung-uhd-dubai-(www.demolandia.net).mkv", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/samsung_seven_wonders_of_the_world_china_uhd-DWEU.mkv", VideoCodec.Mpeg4IsoAvc, 2160, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../UHD/4k_Rec709_ProResHQ.mov", VideoCodec.ProRes, 3072, ColorSpace.Generic, ChromaSubSampling.Sampling422)] public void LoadUhdDemo(string fileName, VideoCodec videoCodec, int height, ColorSpace colorSpace, ChromaSubSampling subSampling) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -258,11 +258,11 @@ public void LoadUhdDemo(string fileName, VideoCodec videoCodec, int height, Colo #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../3D/3D-full-MVC.mkv", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.Stereo, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../3D/Guards 3D Half-OU.mk3d", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.TopBottomRight, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../3D/BD3D/BDMV/index.bdmv", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.Stereo, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../3D/Dracula 480p.wmv", VideoCodec.Vc1, Hdr.None, ColorSpace.Generic, StereoMode.SideBySideRight, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../3D/small-00000.ssif", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.Stereo, ChromaSubSampling.Sampling420)] + [InlineData("../../../../3D/3D-full-MVC.mkv", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.Stereo, ChromaSubSampling.Sampling420)] + [InlineData("../../../../3D/Guards 3D Half-OU.mk3d", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.TopBottomRight, ChromaSubSampling.Sampling420)] + [InlineData("../../../../3D/BD3D/BDMV/index.bdmv", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.Stereo, ChromaSubSampling.Sampling420)] + [InlineData("../../../../3D/Dracula 480p.wmv", VideoCodec.Vc1, Hdr.None, ColorSpace.Generic, StereoMode.SideBySideRight, ChromaSubSampling.Sampling420)] + [InlineData("../../../../3D/small-00000.ssif", VideoCodec.Mpeg4IsoAvc, Hdr.None, ColorSpace.Generic, StereoMode.Stereo, ChromaSubSampling.Sampling420)] public void Load3dDemo(string fileName, VideoCodec videoCodec, Hdr hdr, ColorSpace colorSpace, StereoMode stereoMode, ChromaSubSampling subSampling) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); @@ -282,34 +282,34 @@ public void Load3dDemo(string fileName, VideoCodec videoCodec, Hdr hdr, ColorSpa #else [Theory(Skip = "Test in development environment only")] #endif - [InlineData(@"../../../../HD/[Underwater] Another - sample H264 Hi10P 720p.avi", VideoCodec.Mpeg4IsoAvc, 720, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/[Underwater] Another - sample H264 Hi10P 1080p.avi", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/1080i-25-H264.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/Bieber Grammys.ts", VideoCodec.Mpeg2, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling422)] - [InlineData(@"../../../../HD/Clannad After Story OPA - sample HEVC main10 1080p.mkv", VideoCodec.MpeghIsoHevc, 1088, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/DSCF1912_parrot.AVI", VideoCodec.Mjpg, 480, ColorSpace.Generic, ChromaSubSampling.Sampling422)] - [InlineData(@"../../../../HD/DSCF1928_fish.AVI", VideoCodec.Mjpg, 480, ColorSpace.Generic, ChromaSubSampling.Sampling422)] - [InlineData(@"../../../../HD/DSCF1929_fish.AVI", VideoCodec.Mjpg, 480, ColorSpace.Generic, ChromaSubSampling.Sampling422)] - [InlineData(@"../../../../HD/FPS_test_1080p23.976_L4.1.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/FPS_test_1080p24_L4.1.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/FPS_test_1080p25_L4.1.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/FPS_test_1080p50_L4.2.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/FPS_test_1080p59.94_L4.2.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/FPS_test_1080p60_L4.2.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/Grace Potter 29.97 Mpeg-2 1080i 35mbps DTS-HD MA 5.1 Sample.ts", VideoCodec.Mpeg2, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/H.265 HVEC Test 1.mkv", VideoCodec.MpeghIsoHevc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/H.265 HVEC Test 2.mkv", VideoCodec.MpeghIsoHevc, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling332)] - [InlineData(@"../../../../HD/Human Flight 3D - Andy carving_(FullHD).avi", VideoCodec.Mpeg4IsoAvc, 540, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/Imagine Dragons 59.94 720p 20mbps Mpeg-2 MPA2.0 Sample.ts", VideoCodec.Mpeg2, 720, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/issue1930.h264", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/MPEG2_1080i_sample.mkv", VideoCodec.Mpeg2, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/PE2_Leopard_1080.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/San%20Francisco%20Time%20Lapse%20(Empty%20America).mp4", VideoCodec.Mpeg4IsoAvc, 720, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/Sisvel3DTile.ts", VideoCodec.Mpeg4IsoAvc, 720, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/Surfcup.mp4", VideoCodec.H263, 408, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/test 8.mp4", VideoCodec.Mpeg4IsoAvc, 288, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/VC-1_23.976_sample.mkv", VideoCodec.Vc1, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] - [InlineData(@"../../../../HD/VC-1_29.970_sample.mkv", VideoCodec.Vc1, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/[Underwater] Another - sample H264 Hi10P 720p.avi", VideoCodec.Mpeg4IsoAvc, 720, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/[Underwater] Another - sample H264 Hi10P 1080p.avi", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/1080i-25-H264.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/Bieber Grammys.ts", VideoCodec.Mpeg2, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling422)] + [InlineData("../../../../HD/Clannad After Story OPA - sample HEVC main10 1080p.mkv", VideoCodec.MpeghIsoHevc, 1088, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/DSCF1912_parrot.AVI", VideoCodec.Mjpg, 480, ColorSpace.Generic, ChromaSubSampling.Sampling422)] + [InlineData("../../../../HD/DSCF1928_fish.AVI", VideoCodec.Mjpg, 480, ColorSpace.Generic, ChromaSubSampling.Sampling422)] + [InlineData("../../../../HD/DSCF1929_fish.AVI", VideoCodec.Mjpg, 480, ColorSpace.Generic, ChromaSubSampling.Sampling422)] + [InlineData("../../../../HD/FPS_test_1080p23.976_L4.1.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/FPS_test_1080p24_L4.1.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/FPS_test_1080p25_L4.1.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/FPS_test_1080p50_L4.2.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/FPS_test_1080p59.94_L4.2.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/FPS_test_1080p60_L4.2.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/Grace Potter 29.97 Mpeg-2 1080i 35mbps DTS-HD MA 5.1 Sample.ts", VideoCodec.Mpeg2, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/H.265 HVEC Test 1.mkv", VideoCodec.MpeghIsoHevc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/H.265 HVEC Test 2.mkv", VideoCodec.MpeghIsoHevc, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling332)] + [InlineData("../../../../HD/Human Flight 3D - Andy carving_(FullHD).avi", VideoCodec.Mpeg4IsoAvc, 540, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/Imagine Dragons 59.94 720p 20mbps Mpeg-2 MPA2.0 Sample.ts", VideoCodec.Mpeg2, 720, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/issue1930.h264", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.BT709, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/MPEG2_1080i_sample.mkv", VideoCodec.Mpeg2, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/PE2_Leopard_1080.mkv", VideoCodec.Mpeg4IsoAvc, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/San%20Francisco%20Time%20Lapse%20(Empty%20America).mp4", VideoCodec.Mpeg4IsoAvc, 720, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/Sisvel3DTile.ts", VideoCodec.Mpeg4IsoAvc, 720, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/Surfcup.mp4", VideoCodec.H263, 408, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/test 8.mp4", VideoCodec.Mpeg4IsoAvc, 288, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/VC-1_23.976_sample.mkv", VideoCodec.Vc1, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] + [InlineData("../../../../HD/VC-1_29.970_sample.mkv", VideoCodec.Vc1, 1080, ColorSpace.Generic, ChromaSubSampling.Sampling420)] public void LoadHdDemo(string fileName, VideoCodec videoCodec, int height, ColorSpace colorSpace, ChromaSubSampling chromaSubSampling) { _mediaInfoWrapper = new MediaInfoWrapper(fileName, _logger); diff --git a/MediaInfo.Wrapper/Builder/AudioStreamBuilder.cs b/MediaInfo.Wrapper/Builder/AudioStreamBuilder.cs index b9e822e..a9df88f 100644 --- a/MediaInfo.Wrapper/Builder/AudioStreamBuilder.cs +++ b/MediaInfo.Wrapper/Builder/AudioStreamBuilder.cs @@ -305,7 +305,7 @@ public override AudioStream Build() result.Codec = formatProfile; baseIndex = 1; } - else + else { formatProfile = GetMlpCodecIdByAdditionalFeatures(Get((int)NativeMethods.Audio.Audio_Format_AdditionalFeatures, InfoKind.Text).Trim()); if (formatProfile != AudioCodec.Undefined) @@ -338,28 +338,18 @@ public override AudioStream Build() return result; } - private static string ExtractInfo(string source, int index) - { - return source.IndexOf("/", StringComparison.Ordinal) >= 0 ? - source.Split('/').Skip(index).FirstOrDefault()?.Trim() : - source; - } + private static string ExtractInfo(string source, int index) => + source.IndexOf("/", StringComparison.Ordinal) >= 0 ? + source.Split('/').Skip(index).FirstOrDefault()?.Trim() : + source; - private static bool TryGetCodecByCodecId(string source, out AudioCodec result) - { - return CodecIds.TryGetValue(source, out result); - } + private static bool TryGetCodecByCodecId(string source, out AudioCodec result) => + CodecIds.TryGetValue(source, out result); - private static AudioCodec GetCodecIdByCodecName(string source) - { - AudioCodec result; - return Codecs.TryGetValue(source, out result) ? result : AudioCodec.Undefined; - } + private static AudioCodec GetCodecIdByCodecName(string source) => + Codecs.TryGetValue(source, out var result) ? result : AudioCodec.Undefined; - private static AudioCodec GetMlpCodecIdByAdditionalFeatures(string source) - { - AudioCodec result; - return MlpCodecsAdditionalFeatures.TryGetValue(source, out result) ? result : AudioCodec.Undefined; - } + private static AudioCodec GetMlpCodecIdByAdditionalFeatures(string source) => + MlpCodecsAdditionalFeatures.TryGetValue(source, out var result) ? result : AudioCodec.Undefined; } } \ No newline at end of file diff --git a/MediaInfo.Wrapper/MediaInfo.Wrapper.Core.csproj b/MediaInfo.Wrapper/MediaInfo.Wrapper.Core.csproj index 0feaf73..e02bfe9 100644 --- a/MediaInfo.Wrapper/MediaInfo.Wrapper.Core.csproj +++ b/MediaInfo.Wrapper/MediaInfo.Wrapper.Core.csproj @@ -3,9 +3,9 @@ netstandard2.0 MediaInfo - 19.09.3 - 19.09.03.0 - 19.09.03.0 + 19.09.4 + 19.09.04.0 + 19.09.04.0 Team MediaPortal yartat MP-MediaInfo diff --git a/MediaInfo.Wrapper/MediaInfo.Wrapper.csproj b/MediaInfo.Wrapper/MediaInfo.Wrapper.csproj index d05e73b..a153448 100644 --- a/MediaInfo.Wrapper/MediaInfo.Wrapper.csproj +++ b/MediaInfo.Wrapper/MediaInfo.Wrapper.csproj @@ -3,9 +3,9 @@ net4.0;net4.5 MediaInfo - 19.09.3 - 19.09.03.0 - 19.09.03.0 + 19.09.4 + 19.09.04.0 + 19.09.04.0 Team MediaPortal yartat MP-MediaInfo diff --git a/MediaInfo.Wrapper/MediaInfoWrapper.cs b/MediaInfo.Wrapper/MediaInfoWrapper.cs index a1222cf..9b22f97 100644 --- a/MediaInfo.Wrapper/MediaInfoWrapper.cs +++ b/MediaInfo.Wrapper/MediaInfoWrapper.cs @@ -36,7 +36,7 @@ public class MediaInfoWrapper { #region private vars - private static readonly Dictionary SubTitleExtensions = new Dictionary + private static readonly Dictionary SubTitleExtensions = new Dictionary { { ".AQT", true }, { ".ASC", true }, @@ -95,7 +95,7 @@ public MediaInfoWrapper(string filePath, ILogger logger = null) /// The file path. /// The path to DLL. /// the logger instance. - protected MediaInfoWrapper(string filePath, string pathToDll, ILogger logger) + public MediaInfoWrapper(string filePath, string pathToDll, ILogger logger) #endif { _filePath = filePath; @@ -115,7 +115,24 @@ protected MediaInfoWrapper(string filePath, string pathToDll, ILogger logger) } #if (NET40 || NET45) - var realPathToDll = IfExistsPath(logger, ".\\", () => IfExistsPath(logger, pathToDll, () => null)); + var realPathToDll = ((string)null) + .IfExistsPath("./", logger) + .IfExistsPath(pathToDll, logger) + .IfExistsPath( + Path.GetDirectoryName(typeof(MediaInfoWrapper).Assembly.Location), + logger) + .IfExistsPath( + Path.IsPathRooted(pathToDll) ? + null : + Path.Combine(Path.GetDirectoryName(typeof(MediaInfoWrapper).Assembly.Location), pathToDll), + logger); + + if (string.IsNullOrEmpty(realPathToDll)) + { + logger.LogError("MediaInfo.dll was not found"); + MediaInfoNotloaded = true; + return; + } #endif var isTv = filePath.IsLiveTv(); @@ -186,13 +203,13 @@ public void WriteInfo() { _logger.LogInformation($"Inspecting media : {_filePath}"); if (MediaInfoNotloaded) - { - _logger.LogWarning($"MediaInfo.dll was not loaded!"); + { + _logger.LogWarning("MediaInfo.dll was not loaded!"); } else { _logger.LogDebug($"DLL version : {Version}"); - + // General _logger.LogDebug($"Media duration : {TimeSpan.FromMilliseconds(Duration)}"); _logger.LogDebug($"Has audio : {(AudioStreams?.Count ?? 0) > 0}"); @@ -230,7 +247,7 @@ public void WriteInfo() // Subtitles if (HasSubtitles) - { + { _logger.LogDebug($"Subtitles count : {Subtitles?.Count ?? 0}"); } @@ -242,27 +259,6 @@ public void WriteInfo() } } -#if (NET40 || NET45) - private string IfExistsPath(ILogger logger, string pathToDll, Func anotherPath) - { - var result = anotherPath(); - if (!string.IsNullOrEmpty(result)) - { - return result; - } - - logger.LogDebug("Check MediaInfo.dll from {0}.", pathToDll); - if (!MediaInfoExist(pathToDll)) - { - MediaInfoNotloaded = true; - logger.LogWarning($"Library MediaInfo.dll was not found at {pathToDll}"); - return null; - } - - return pathToDll; - } -#endif - private static long GetDirectorySize(string folderName) { if (!Directory.Exists(folderName)) @@ -476,10 +472,10 @@ private void SetupProperties(MediaInfo mediaInfo) ? mediaInfo.Get(StreamKind.Video, BestVideoStream.StreamPosition, "DisplayAspectRatio") : string.Empty; AspectRatio = BestVideoStream != null ? - AspectRatio == "4:3" || AspectRatio == "1.333" ? "fullscreen" : "widescreen" : + AspectRatio == "4:3" || AspectRatio == "1.333" ? "fullscreen" : "widescreen" : string.Empty; - BestAudioStream = AudioStreams.OrderByDescending(x => x.Channel * 10000000 + x.Bitrate).FirstOrDefault(); + BestAudioStream = AudioStreams.OrderByDescending(x => (x.Channel * 10000000) + x.Bitrate).FirstOrDefault(); AudioCodec = BestAudioStream?.CodecName ?? string.Empty; AudioRate = (int?)BestAudioStream?.Bitrate ?? 0; AudioSampleRate = (int?)BestAudioStream?.SamplingRate ?? 0; @@ -489,17 +485,7 @@ private void SetupProperties(MediaInfo mediaInfo) #endregion - /// - /// Checks if mediaInfo.dll file exist. - /// - /// The path to mediaInfo.dll - /// Returns true if mediaInfo.dll is exists; elsewhere false. - public static bool MediaInfoExist(string pathToDll) - { - return File.Exists(Path.Combine(pathToDll, "MediaInfo.dll")); - } - -#region private methods + #region private methods private static bool CheckHasExternalSubtitles(string strFile) { @@ -521,9 +507,9 @@ private static bool CheckHasExternalSubtitles(string strFile) } } -#endregion + #endregion -#region public video related properties + #region public video related properties /// /// Gets a value indicating whether this instance has video. @@ -637,9 +623,9 @@ private static bool CheckHasExternalSubtitles(string strFile) /// public int VideoRate { get; private set; } -#endregion + #endregion -#region public audio related properties + #region public audio related properties /// /// Gets the audio streams. @@ -697,9 +683,9 @@ private static bool CheckHasExternalSubtitles(string strFile) /// public string AudioChannelsFriendly { get; private set; } -#endregion + #endregion -#region public subtitles related properties + #region public subtitles related properties /// /// Gets the list of media subtitles. @@ -725,9 +711,9 @@ private static bool CheckHasExternalSubtitles(string strFile) /// public bool HasExternalSubtitles { get; } -#endregion + #endregion -#region public chapters related properties + #region public chapters related properties /// /// Gets the media chapters. @@ -745,9 +731,9 @@ private static bool CheckHasExternalSubtitles(string strFile) /// public bool HasChapters => Chapters.Count > 0; -#endregion + #endregion -#region public menu related properties + #region public menu related properties /// /// Gets the menu streams from media. @@ -765,7 +751,9 @@ private static bool CheckHasExternalSubtitles(string strFile) /// public bool HasMenu => MenuStreams.Count > 0; -#endregion + #endregion + + #region public common properties /// /// Gets a value indicating whether media is DVD. @@ -846,5 +834,43 @@ private static bool CheckHasExternalSubtitles(string strFile) /// The tags. /// public AudioTags Tags { get; private set; } + + #endregion } + +#if (NET40 || NET45) + internal static class PathExtensions + { + public static string IfExistsPath(this string sourcePath, string anotherPath, ILogger logger) + { + if (!string.IsNullOrEmpty(sourcePath)) + { + return sourcePath; + } + + if (string.IsNullOrEmpty(anotherPath)) + { + return null; + } + + logger.LogDebug("Check MediaInfo.dll from {0}.", anotherPath); + if (!anotherPath.MediaInfoExist()) + { + logger.LogWarning($"Library MediaInfo.dll was not found at {anotherPath}"); + return null; + } + + logger.LogInformation($"Library MediaInfo.dll was found at {anotherPath}"); + return anotherPath; + } + + /// + /// Checks if mediaInfo.dll file exist. + /// + /// The path to mediaInfo.dll + /// Returns true if mediaInfo.dll is exists; elsewhere false. + public static bool MediaInfoExist(this string pathToDll) => + File.Exists(Path.Combine(pathToDll, "MediaInfo.dll")); + } +#endif } \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 848a14e..2e789a5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 19.09.03 +version: 19.09.04 branches: only: