fix: Use dynamic video format

This commit is contained in:
Marc Rousavy 2023-10-03 13:59:19 +02:00
parent 324e269173
commit 224bffd4dc

View File

@ -135,8 +135,7 @@ class CameraOutputs(
// Video output: High resolution repeating images (startRecording() or useFrameProcessor())
if (video != null) {
// TODO: Should this be dynamic?
val format = ImageFormat.YUV_420_888
val format = video.format.toImageFormat()
val size = characteristics.getVideoSizes(cameraId, format).closestToOrMax(video.targetSize)
val enableFrameProcessor = video.enableFrameProcessor ?: false
val videoPipeline = VideoPipeline(size.width, size.height, video.format, isMirrored, enableFrameProcessor)