How to achieve (video recording and capture frames in real time) simultaneously using camerax?
What I tried till now.
I tried to bind camera preview, videoCapture and imageAnalysis use cases together but got this exception,
java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0. May be attempting to bind too many use cases.
at androidx.camera.camera2.impl.Camera2DeviceSurfaceManager.getSuggestedResolutions.
So What approaches I did
1- bind only videoCapture and imageAnalysis use cases and for preview I used an imageView and set image to it retrieved from imageAnalysis, which was indeed not so efficient approach so.
2- I tried binding only preview and imageAnalysis use cases, and for recording i used screen recording, but we must have permission for that, so this approach is at least priority.
3- I got this library
implementation "com.priyankvasa.android:cameraview-ex:3.5.5-alpha"
which is promising me what i seek but not working on 3 out of 5 devices i tested.
Could it not be achieved using camera-x?
That's all.
Help me out.