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()) // Video output: High resolution repeating images (startRecording() or useFrameProcessor())
if (video != null) { if (video != null) {
// TODO: Should this be dynamic? val format = video.format.toImageFormat()
val format = ImageFormat.YUV_420_888
val size = characteristics.getVideoSizes(cameraId, format).closestToOrMax(video.targetSize) val size = characteristics.getVideoSizes(cameraId, format).closestToOrMax(video.targetSize)
val enableFrameProcessor = video.enableFrameProcessor ?: false val enableFrameProcessor = video.enableFrameProcessor ?: false
val videoPipeline = VideoPipeline(size.width, size.height, video.format, isMirrored, enableFrameProcessor) val videoPipeline = VideoPipeline(size.width, size.height, video.format, isMirrored, enableFrameProcessor)