public void TestCopyableInferLevels() { Assert.True(Copyable264Infer.CompareLevels("4.2", 42)); Assert.False(Copyable264Infer.CompareLevels("4.1", 42)); Assert.True(Copyable264Infer.CompareLevels("1.0", 10)); Assert.False(Copyable264Infer.CompareLevels("1.0", 15)); }
public void TestCopyableInfer() { Assert.True(Copyable264Infer.DetermineCopyCanBeDone("yuv420p", "4.0", "High", new List <DEnc.Serialization.MediaStream>() { new DEnc.Serialization.MediaStream() { codec_name = "h264", level = 40, pix_fmt = "yuv420p", profile = "High" } })); Assert.True(Copyable264Infer.DetermineCopyCanBeDone("yuv420p", "4.2", "High", new List <DEnc.Serialization.MediaStream>() { new DEnc.Serialization.MediaStream() { codec_name = "h264", level = 40, pix_fmt = "yuv420p", profile = "Main" } })); Assert.False(Copyable264Infer.DetermineCopyCanBeDone("yuv420p", "4.0", "High", new List <DEnc.Serialization.MediaStream>() { new DEnc.Serialization.MediaStream() { codec_name = "h264", level = 40, pix_fmt = "yuv420p10le", profile = "High" } })); Assert.False(Copyable264Infer.DetermineCopyCanBeDone("yuv420p", "4.0", "High", new List <DEnc.Serialization.MediaStream>() { new DEnc.Serialization.MediaStream() { codec_name = "h264", level = 40, pix_fmt = "yuv420p", profile = "High 10" } })); }
public void TestCopyableInferProfiles() { Assert.True(Copyable264Infer.CompareProfiles("Main", "baseline")); Assert.True(Copyable264Infer.CompareProfiles("main", "main")); Assert.True(Copyable264Infer.CompareProfiles("High 10", "High")); Assert.True(Copyable264Infer.CompareProfiles("High444", "High 10")); Assert.False(Copyable264Infer.CompareProfiles("High", "High 10")); Assert.False(Copyable264Infer.CompareProfiles("High", "High10")); Assert.False(Copyable264Infer.CompareProfiles("main", "High 422")); }