aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs')
-rw-r--r--tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs b/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
index 0fc8724b6..13cfe885f 100644
--- a/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
+++ b/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
@@ -31,6 +31,16 @@ namespace Jellyfin.MediaEncoding.Tests.Probing
public void GetFrameRate_Success(string value, float? expected)
=> Assert.Equal(expected, ProbeResultNormalizer.GetFrameRate(value));
+ [Theory]
+ [InlineData(0.5f, "0/1", false)]
+ [InlineData(24.5f, "8/196", false)]
+ [InlineData(63.5f, "1/127", true)]
+ [InlineData(null, "1/60", false)]
+ [InlineData(30f, "2/120", true)]
+ [InlineData(59.999996f, "1563/187560", true)]
+ public void IsCodecTimeBaseDoubleTheFrameRate_Success(float? frameRate, string codecTimeBase, bool expected)
+ => Assert.Equal(expected, ProbeResultNormalizer.IsCodecTimeBaseDoubleTheFrameRate(frameRate, codecTimeBase));
+
[Fact]
public void GetMediaInfo_MetaData_Success()
{
@@ -65,6 +75,14 @@ namespace Jellyfin.MediaEncoding.Tests.Probing
Assert.Equal(1, res.VideoStream.RefFrames);
Assert.Equal("1/1000", res.VideoStream.TimeBase);
Assert.Equal(MediaStreamType.Video, res.VideoStream.Type);
+ Assert.Equal(1, res.VideoStream.DvVersionMajor);
+ Assert.Equal(0, res.VideoStream.DvVersionMinor);
+ Assert.Equal(5, res.VideoStream.DvProfile);
+ Assert.Equal(6, res.VideoStream.DvLevel);
+ Assert.Equal(1, res.VideoStream.RpuPresentFlag);
+ Assert.Equal(0, res.VideoStream.ElPresentFlag);
+ Assert.Equal(1, res.VideoStream.BlPresentFlag);
+ Assert.Equal(0, res.VideoStream.DvBlSignalCompatibilityId);
Assert.Empty(res.Chapters);
Assert.Equal("Just color bars", res.Overview);