fix: Fix "maxImages (3) has already been acquired" error (#2352)
This commit is contained in:
parent
833ffb8478
commit
2cd22ad236
@ -298,7 +298,7 @@ class CameraSession(private val context: Context, private val cameraManager: Cam
|
|||||||
val imageFormat = ImageFormat.JPEG
|
val imageFormat = ImageFormat.JPEG
|
||||||
val sizes = characteristics.getPhotoSizes(imageFormat)
|
val sizes = characteristics.getPhotoSizes(imageFormat)
|
||||||
val size = sizes.closestToOrMax(format?.photoSize)
|
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...")
|
Log.i(TAG, "Adding ${size.width} x ${size.height} Photo Output in Format #$imageFormat...")
|
||||||
val imageReader = ImageReader.newInstance(size.width, size.height, imageFormat, maxImages)
|
val imageReader = ImageReader.newInstance(size.width, size.height, imageFormat, maxImages)
|
||||||
|
Loading…
Reference in New Issue
Block a user