I’m trying to use ImageWriter to stream from Camera2 device to MediaRecorder’s surface(recording video basically).
And it works on one of two devices I tried it on but on Samsung SM-G955U1 at some point in time it just fails with
attachBuffer: IGraphicBufferProducer call failed (-19)
2024-07-09 20:51:12.627 12895-13147 ImageWriter_JNI E Attach image failed: No such device (-19)
IllegalStateException: Surface has been abandoned
I keep my ImageWriter in a strong reference as well as the MediaRecorder and ImageReader I’m reading the Image from so I’m not quite sure what is wrong here.
Could anybody help? Any advice on how to debug this?