diff options
| author | Mohamed Akram <mohd-akram@users.noreply.github.com> | 2024-01-07 01:11:08 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-06 14:11:08 -0700 |
| commit | f49de51225b2206609df6a89f3cbb5fd7459ff68 (patch) | |
| tree | ca816ef98baf21a02672cd1a199d5e0e3304c25b /tests/Jellyfin.MediaEncoding.Tests/Probing | |
| parent | 7b5c41c2a521f2e49f8acc24f29c8472938f3987 (diff) | |
Detect audio spatial format (#9996)
* Detect audio spatial format
* Update MediaBrowser.Model/Entities/MediaStream.cs
* Update MediaStream.cs
---------
Co-authored-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'tests/Jellyfin.MediaEncoding.Tests/Probing')
| -rw-r--r-- | tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs b/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs index 198dc63efe..344ac8971c 100644 --- a/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs +++ b/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs @@ -46,7 +46,7 @@ namespace Jellyfin.MediaEncoding.Tests.Probing var internalMediaInfoResult = JsonSerializer.Deserialize<InternalMediaInfoResult>(bytes, _jsonOptions); MediaInfo res = _probeResultNormalizer.GetMediaInfo(internalMediaInfoResult, VideoType.VideoFile, false, "Test Data/Probing/video_metadata.mkv", MediaProtocol.File); - Assert.Single(res.MediaStreams); + Assert.Equal(3, res.MediaStreams.Count); Assert.NotNull(res.VideoStream); Assert.Equal("4:3", res.VideoStream.AspectRatio); @@ -83,6 +83,14 @@ namespace Jellyfin.MediaEncoding.Tests.Probing Assert.Equal(1, res.VideoStream.BlPresentFlag); Assert.Equal(0, res.VideoStream.DvBlSignalCompatibilityId); + var audio1 = res.MediaStreams[1]; + Assert.Equal("eac3", audio1.Codec); + Assert.Equal(AudioSpatialFormat.DolbyAtmos, audio1.AudioSpatialFormat); + + var audio2 = res.MediaStreams[2]; + Assert.Equal("dts", audio2.Codec); + Assert.Equal(AudioSpatialFormat.DTSX, audio2.AudioSpatialFormat); + Assert.Empty(res.Chapters); Assert.Equal("Just color bars", res.Overview); } |
