Robert Mader
mastodon 4.7.3Mostly #wayland stuff around #gnomeshell, #gstreamer, #Firefox, #Pipewire, #libcamera, #linuxmobile - @collabora@floss.social
Generally thing that make the Linux desktop use graphics hardware features. And sometimes random boosts.
Based in Berlin.
Member of the German green party.
Trying out a new Gnome camera app: Snapshot. Written using #gtk4, #libadwaita and #rustlang it's the continuation of the stalled gnome-camera app I posted about earlier.
Highlights: xdg-camera portal support, a fully GL accelerated pipeline for the viewfinder and, most importantly, highly motivated devs!
Image quality still has room for improvements, the #nafo fella looked much better in reality.
Check it out: https://gitlab.gnome.org/msandova/snapshot
- If your app has its own indicator - like #Firefox had until recently - you can drop it and rely on DEs to inform the user for you, be it for cameras, microphones or screen sharing.
You may have seen that the FF indicator never worked well on #Wayland because apps don't get to choose window positioning themselves.
I've spoken to some devs from #kde and #sway and we all agreed that DE indicators are a much better solution.
- If you use #GStreamer for cameras #PipeWire support in turn comes for free via the PW GST plugin. Additionally supporting proper #Flatpak sandboxing via the camera portal is possible with little work using #libportal or #ashpd and the
GstPipeWireDeviceProvider. Feel free to ping me if you need help with this - there'll also be a new example in #workbench for this soon.
- If you additionally implement support for the camera portal and ship your app as a sandboxed #Flatpak, you'll get a better privacy rating on #Flathub, Gnome-Software & co. Show people that your app is a good citizen and respects users privacy. Make it easier for users to trust your app when they first use it.
- A simple API. If your app has its own #v4l2 handling code, switching to #PipeWire gives you a much nicer API to work with. This is especially true if your app already support screen sharing on #Wayland - in that case you already have both #PipeWire and portal support and can reuse a lot of that. That's for example done in #libwebrtc for #Firefox and #Chromium.
@cdamian@rls.social @mattdm@hachyderm.io I think you could take the output of pw-dump - it's json - and check if there is a camera node and whether it's active.
@cdamian@rls.social @mattdm@hachyderm.io Ah, I see. For such monitoring jobs you'll probably want to use the C API as constantly polling pw-dump is more expensive.
I guess sooner or later we'll want to have a pipewire-monitor library that can be used by scripting languages - maybe you can start it? :P