w2016561536/android_virtual_cam

Buffer issue with camera app + Virtual.mp4

reptilano opened this issue · 2 comments

I have tested this apk for months on serveral devices and it performs the same with all.

The issue is that any default camera app of any phone will crash as you take a picture from the virtual.mp4 replacement.

The picture will take place, but then crash as you attempt to take a second picture. As you reopen the camera and you go over it again it will again crash.

The issue seems that is comming from a bad translation.

log issue: "Process: com.android.camera, PID: 20075
java.lang.UnsupportedOperationException: The producer output buffer format 0x32315669 doesn't match the ImageReader's configured buffer format 0x21."

So it seems that ImageReader needs color format 0x21(nv21), but the camera format is 0x32315669. We then after have to find what 0x32315669 format in the net.and then convert to 0x21 if possible.

If anyone manged to make this work, I can pay for the fix

Please reach out to me on tg @reptilano.


More information about the log:

[ 2023-10-03T15:18:09.568 10068: 8403: 8508 I/LSPosed-Bridge ] Crash unexpectedly: java.lang.UnsupportedOperationException: The producer output buffer format 0x32315669 doesn't match the ImageReader's configured buffer format 0x21. at android.media.ImageReader.nativeImageSetup(Native Method)
at android.media.ImageReader.acquireNextSurfaceImage(imagereader.java:450) at android.media.ImageReader.acquireNextImage(imagereader.java:504)
at com.android.camera2.MiCamera2$2.onImageAvailable(micamera2.java:2) at android.media.ImageReader$ListenerHandler.handleMessage(imagereader.java:798)
at android.os.Handler.dispatchMessage(handler.java:107) at android.os.Looper.loop(looper.java:224)
at android.os.HandlerThread.run(handlerthread.java:67)[ 2023-10-03T15:18:09.568 10068: 8403: 8508 E/AndroidRuntime ] FATAL EXCEPTION: CameraHandlerThread
Process: com.android.camera, PID: 8403java.lang.UnsupportedOperationException: The producer output buffer format 0x32315669 doesn't match the ImageReader's configured buffer format 0x21.
at android.media.ImageReader.nativeImageSetup(Native Method) at android.media.ImageReader.acquireNextSurfaceImage(imagereader.java:450)
at android.media.ImageReader.acquireNextImage(imagereader.java:504) at com.android.camera2.MiCamera2$2.onImageAvailable(micamera2.java:2)
at android.media.ImageReader$ListenerHandler.handleMessage(imagereader.java:798) at android.os.Handler.dispatchMessage(handler.java:107)
at android.os.Looper.loop(looper.java:224) at android.os.HandlerThread.run(handlerthread.java:67)

Me too, how to fix

I also got the same issue with error:
java.lang.UnsupportedOperationException: The producer output buffer format 0x1000 doesn't match the ImageReader's configured buffer format 0x21.