Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Analog of setPreviewCallbackWithBuffer in CameraX or android.hardware.camera2

Is there a method similar to setPreviewCallbackWithBuffer in function in CameraX or android.hardware.camera2? This method was deprecated along with android.hardware.camera. Essentially I want to set a callback to the camera feed that presumes getting the image as a buffer. Any suggestions?

like image 652
dclipca Avatar asked Oct 27 '25 20:10

dclipca


1 Answers

Essentially, both camera2 and CameraX work in a manner that is comparable to setPreviewCallbackWithBuffer(). You don't need to use some special methods to avoid memory allocations while capturing preview.

like image 76
Alex Cohn Avatar answered Oct 30 '25 11:10

Alex Cohn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!