Verify video profile fallback without excluding a supported codec

This commit is contained in:
evgeny committed 2026-10-14 02:14:24 +02:00
1 parent 499ce21cfc
commit a5f8b8431d
1 file changed
+6
@@ -36,4 +36,10 @@ class StreamVideoCodecTest {
val config = StreamCaptureConfig(base, StreamOrientation.LEFT, 4000000).withMode(hevc)
assertEquals(3000000, config.bitrate); assertEquals(StreamOrientation.LEFT, config.orientation)
}
@Test fun availableProfileIsUsedWhenPreferredProfileIsMissing() {
val preferred = StreamVideoCodec.H264.profile!!
assertEquals(preferred, StreamVideoCodec.H264.encoderProfile(intArrayOf(999, preferred)))
assertEquals(999, StreamVideoCodec.H264.encoderProfile(intArrayOf(999)))
assertNull(StreamVideoCodec.H266.encoderProfile(intArrayOf()))
}
}