From a5f8b8431dcd7f03ec6acc36d046c7253add3848 Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 14 Oct 2026 02:14:24 +0200 Subject: [PATCH] Verify video profile fallback without excluding a supported codec --- .../test/java/com/utun/chat/data/StreamVideoCodecTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/chatgui-android/app/src/test/java/com/utun/chat/data/StreamVideoCodecTest.kt b/tools/chatgui-android/app/src/test/java/com/utun/chat/data/StreamVideoCodecTest.kt index 6271c553..8dc65b69 100644 --- a/tools/chatgui-android/app/src/test/java/com/utun/chat/data/StreamVideoCodecTest.kt +++ b/tools/chatgui-android/app/src/test/java/com/utun/chat/data/StreamVideoCodecTest.kt @@ -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())) + } }