rename from imageAnalyzer to imageAnalysis

This commit is contained in:
Adam Velebil 2022-09-15 14:41:36 +02:00
parent 26caad52f1
commit 02222d3764
No known key found for this signature in database
GPG Key ID: AC6D6B9D715FC084

View File

@ -110,7 +110,7 @@ internal class QRScannerView(
private var cameraProvider: ProcessCameraProvider? = null
private val cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
private var imageAnalyzer: ImageAnalysis? = null
private var imageAnalysis: ImageAnalysis? = null
private var preview: Preview? = null
override fun getView(): View {
@ -120,8 +120,8 @@ internal class QRScannerView(
override fun dispose() {
cameraProvider?.unbindAll()
preview = null
imageAnalyzer?.clearAnalyzer();
imageAnalyzer = null
imageAnalysis?.clearAnalyzer();
imageAnalysis = null
cameraExecutor.shutdown()
methodChannel.setMethodCallHandler(null)
Log.d(TAG, "View disposed")
@ -226,7 +226,7 @@ internal class QRScannerView(
cameraProvider?.unbindAll()
imageAnalyzer = ImageAnalysis.Builder()
imageAnalysis = ImageAnalysis.Builder()
.setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
.setTargetAspectRatio(QR_SCANNER_ASPECT_RATIO)
.build()
@ -250,7 +250,7 @@ internal class QRScannerView(
val camera = cameraProvider?.bindToLifecycle(
context as LifecycleOwner,
cameraSelector,
preview, imageAnalyzer
preview, imageAnalysis
)
camera?.cameraInfo?.cameraState?.let {