diff options
| author | theopeuchlestrade <83510973+theopeuchlestrade@users.noreply.github.com> | 2026-10-05 19:19:10 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-10-05 19:19:10 -0400 |
| commit | 32efb47601d3ce4174f61a66181d9e4665288c92 (patch) | |
| tree | e0818ea584c7ab7ea67fb358ec8ceca5392f7938 /tests | |
| parent | f89279fc4bd33d47623284ad337d3bc5aa6dd282 (diff) | |
Backport pull request #18300 from jellyfin/release-12.z
Use hvc1 for Dolby Vision profile 8
Original-merge: 173ee6947286d36cdb0ba86bbe9676770c57e27b
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs b/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs index 5f5f273f12..a9f85739bc 100644 --- a/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs +++ b/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs @@ -3,6 +3,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Controllers; using MediaBrowser.Controller.MediaEncoding; +using MediaBrowser.Model.Entities; using Microsoft.Extensions.Logging.Abstractions; using Xunit; @@ -11,6 +12,34 @@ namespace Jellyfin.Api.Tests.Controllers public class DynamicHlsControllerTests { [Theory] + [InlineData(8, 1, "smpte2084", false, "hvc1")] + [InlineData(8, 1, "smpte2084", true, "hvc1")] + [InlineData(8, 2, "bt709", false, "hvc1")] + [InlineData(8, 4, "arib-std-b67", false, "hvc1")] + [InlineData(8, 6, "smpte2084", false, "hvc1")] + [InlineData(5, 0, "smpte2084", false, "dvh1")] + [InlineData(7, 6, "smpte2084", false, "dvh1")] + [InlineData(null, null, "smpte2084", false, "dvh1")] + public void GetDolbyVisionHevcCodecTag_SelectsTagForProfile(int? profile, int? compatibilityId, string transfer, bool hdr10Plus, string expected) + { + var stream = new MediaStream + { + Codec = "hevc", + Type = MediaStreamType.Video, + RpuPresentFlag = 1, + BlPresentFlag = 1, + ColorSpace = "bt2020nc", + ColorPrimaries = "bt2020", + ColorTransfer = transfer, + DvProfile = profile, + DvBlSignalCompatibilityId = compatibilityId, + Hdr10PlusPresentFlag = hdr10Plus + }; + + Assert.Equal(expected, DynamicHlsController.GetDolbyVisionHevcCodecTag(stream)); + } + + [Theory] [MemberData(nameof(GetSegmentLengths_Success_TestData))] public void GetSegmentLengths_Success(long runtimeTicks, int segmentlength, double[] expected) { |
