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())) + } }