Login
You're viewing the techdon.dev public feed.
  • Jul 19, 2025, 7:51 PM

    @pavel So I was just adding autofocus to my toy code and I wanted to be able to trigger it by tapping on the viewfinder. Just replaced waylandsink with gtkwaylandsink, grabbed its GtkWidget and added it to my GtkWindow and it works 😛

    💬 1🔄 0⭐ 0

Replies

  • Jul 19, 2025, 9:40 PM
    @dos I have feeling that you'll post few more advancements and then you'll disappear, with that code being gone forever. Probably abducted by aliens as that's clearly alien code :-).

    Please publish it somewhere.... we don't want another "Fermat's last theorem" situation.

    Also, yes, at 512x.. resolution, things are likely easier. I had a lot of fun trying to get gtk/gstreamer working, and while I got it to work _somehow_, I was not really able to understand/debug performance issues.
    💬 0🔄 0⭐ 0
  • Jul 19, 2025, 11:00 PM

    @pavel Displaying the viewfinder is free with (gl)waylandsink, as the dmabuf gets passed directly to the compositor in a subsurface, so the resolution is not important - it goes straight to the GPU for compositing. It's important for encoding and that's where uncached buffers can bite you, but since my shader is currently too heavy to handle higher res anyway it's not a thing I concern myself with right now.

    And the code is basic, it just takes time to get familiar with the problem space 😜

    💬 1🔄 0⭐ 0
  • Jul 21, 2025, 3:57 PM
    @dos I want to see how you do that magic... to see if it looks reasonable or if I should keep playing with sdl. Note that first thing gstreamer will do is downscale color information. If you do that in shader -- YUY2 -- gstreamer will be faster. But having 512x.. image with perfect color in each pixel is a waste with h264 compression
    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0