On cameraX documentation is following rule:
Preview + VideoCapture + ImageAnalysis + ImageCapture: not supported.
But I need to detect faces than capture image & cut face image, after that record video for 5 seconds.
I seen camera apps that can capture image during video record.
Here is my code:
cameraProvider = future.get()
textureEntry = textureRegistry.createSurfaceTexture()
val textureId = textureEntry!!.id()
val owner = activity as LifecycleOwner
val preview = buildPreview()
val analysis = buildImageAnalysis()
imageCapture = buildImageCapture()
camera = cameraProvider!!.bindToLifecycle(
owner,
cameraConfigs.cameraSelector,
preview,
analysis,
imageCapture
)
cameraProvider have function unbind(useCase) but no function to bind other.