fix: Fix "maxImages (3) has already been acquired" error (#2352)

This commit is contained in:
Marc Rousavy 2024-01-05 15:51:39 +01:00 committed by GitHub
parent 833ffb8478
commit 2cd22ad236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -298,7 +298,7 @@ class CameraSession(private val context: Context, private val cameraManager: Cam
val imageFormat = ImageFormat.JPEG
val sizes = characteristics.getPhotoSizes(imageFormat)
val size = sizes.closestToOrMax(format?.photoSize)
val maxImages = 3
val maxImages = 10
Log.i(TAG, "Adding ${size.width} x ${size.height} Photo Output in Format #$imageFormat...")
val imageReader = ImageReader.newInstance(size.width, size.height, imageFormat, maxImages)