I have published the snippet of code that implements a GPU-based ISP with bunch of corrections and encodes video in real time on the Librem 5. Feel free to take parts of it and use in your apps and frameworks... or record your cats 😼
https://source.puri.sm/-/snippets/1223
#linuxmobile #mobilelinux #linuxphones #camera #librem5 #shotonlibrem5
@pavel It shows the right way and runs reliably for hours here on crimson. There should be no crashes whatsoever. Could be some regression on GStreamer side, but on newer distros you should rather use GTK4 and GtkGraphicsOffload instead anyway.
Of course simpler shaders allow for higher performance, the challenge is in simplifying the shader without making the output shitty ;)
@pavel rotate-method sets what gets passed to wl_surface::set_buffer_transform verbatim, and the camera is rotated 90° counter clock-wise in relation to the screen, so it should be 1. Unless I'm getting something wrong, it smells like a bug in newer phoc.
@pavel As long as it doesn't overlay the GStreamer's subsurface, you simply add a button to the box. I had that at one point, so I know it works. For more complex UI, use GtkGraphicsOffload which will handle overlaying widgets. I won't hand-hold you with that, it's simple stuff with many examples out there.
PDAF is more complex to setup and I don't have anything to share at this moment.
@pavel Also, you can already refocus manually with the code I posted.