rmader,
@rmader@floss.social avatar

So we'll have a neat little camera indicator in .

It will only show up for apps that use for camera access so we depend on more apps switching to that.

During the "State of the Shell" talk I was asked what incentives there are for app developers to do so and unfortunately I messed up to make the probably most convincing ones, so short 🧵

  1. support for modern cameras via (as opposed to only / UVC cameras).

cdamian,
@cdamian@rls.social avatar

@rmader
Is there a good way to check from a script if a camera is in use?
I'm currently checking the v4l2 device usage, which is not ideal.
@mattdm

rmader,
@rmader@floss.social avatar

@cdamian @mattdm 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,
@cdamian@rls.social avatar

@rmader
Cool, I'll try that.
I have a small python script that pauses the music and switches on the lights when I'm in a video call.
@mattdm

rmader,
@rmader@floss.social avatar

@cdamian @mattdm 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

cdamian,
@cdamian@rls.social avatar

@rmader
I'll will have to dust off my C skillz 😀
@mattdm

rmader,
@rmader@floss.social avatar

@cdamian @mattdm If you want to give it a try: I think https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/src/shell-camera-monitor.c should be pretty reusable.

mattdm,
@mattdm@hachyderm.io avatar

@cdamian @rmader

Ooh, I want that! I have a spot light that fills in some shadows on my wall that I only want on for video!

cdamian,
@cdamian@rls.social avatar

@mattdm
Yep, I have an Elgato key light for better calls. My script is maybe too embarrassing to share though :-) I'll dig it out later.
@rmader

cdamian,
@cdamian@rls.social avatar
rmader,
@rmader@floss.social avatar

(this thread is written in real-time and on satellite inet, so please bear with me :P).

While "complex" cameras have been common for phones and professional cameras for a long time now, the linux ecosystem more or less got away with only supporting UVC cameras via V4L2.

By now more and more laptops using non-UVC cameras are entering the market on one hand and new use-cases like become more common on the other.

Switching to gives you support for for free.

rmader,
@rmader@floss.social avatar
  1. If you use for cameras support in turn comes for free via the PW GST plugin. Additionally supporting proper sandboxing via the camera portal is possible with little work using or and the GstPipeWireDeviceProvider. Feel free to ping me if you need help with this - there'll also be a new example in for this soon.
rmader,
@rmader@floss.social avatar
  1. A simple API. If your app has its own handling code, switching to gives you a much nicer API to work with. This is especially true if your app already support screen sharing on - in that case you already have both and portal support and can reuse a lot of that. That's for example done in for and .
rmader,
@rmader@floss.social avatar
  1. If you additionally implement support for the camera portal and ship your app as a sandboxed , you'll get a better privacy rating on , 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.
rmader,
@rmader@floss.social avatar
  1. If you use you get to see the neat little indicator :P

And other DEs will hopefully/likely start showing similar indicators soon, just as they already do for screen sharing.

rmader,
@rmader@floss.social avatar
  1. If your app has its own indicator - like 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 because apps don't get to choose window positioning themselves.

I've spoken to some devs from and and we all agreed that DE indicators are a much better solution.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • Durango
  • mdbf
  • magazineikmin
  • InstantRegret
  • rosin
  • modclub
  • Youngstown
  • slotface
  • thenastyranch
  • cubers
  • kavyap
  • everett
  • khanakhh
  • megavids
  • GTA5RPClips
  • osvaldo12
  • ngwrru68w68
  • normalnudes
  • cisconetworking
  • Leos
  • ethstaker
  • tester
  • tacticalgear
  • provamag3
  • anitta
  • JUstTest
  • lostlight
  • All magazines