[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yvFnaY1MM7I5C7H18aJdvQ6XEQn979YkGYpCjRLsnJvCRr2vYWVKorYqFXGxP3tWKeJ5B0oEA4Fn4W2-IqPd_N_wivEM4uKJD4WX53RiSmY=@protonmail.com>
Date: Wed, 28 Dec 2022 01:44:38 +0000
From: Barnabás Pőcze <pobrn@...tonmail.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Kieran Bingham <kieran.bingham@...asonboard.com>,
linux-media@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] media: v4l2-dev: sysfs: Support streaming attribute
Hi
On 2022. december 26., hétfő 10:52, Laurent Pinchart wrote:
> Hi Kieran,
>
> Thank you for the patch.
>
> On Fri, Dec 23, 2022 at 11:17:35PM +0000, Kieran Bingham wrote:
>
> > Provide a streaming attribute to allow userspace to interogate if a device
> > is actively streaming or not.
> >
> > This will allow desktop notifications to report if a camera or device
> > is active on the system, rather than just 'open' which can occur when
> > configuring the device.
> >
> > Bug: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2669
> > Signed-off-by: Kieran Bingham kieran.bingham@...asonboard.com
> > ---
> >
> > This is a quick POC to see if such a facility makes sense.
> > I'm weary that not all video devices may have the queues registered on
> > the struct video_device, but this seems like an effective way to be able
> > to determine if a device is actively streaming on a system.
>
>
> I can imagine multiple problems, from race conditions to permissions and
> privacy. In order to comment on the fitness of this solution to address
> the problem you're trying to solve, could you describe the actual
> problem ?
The issue is explained in the following thread:
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2669#note_1697388
In short, the user wants to show a "camera-in-use" indicator when the laptop camera
is used. The script that the user previously had only checked if /dev/video0
was open in any process, if it was, the indicator was shown. However, libcamera
- at least at the moment - keeps the file descriptor open as long as the Camera
object exists, which pipewire keeps alive for the entire lifetime of the device,
therefore the "camera-in-use" indicator is always shown.
> [...]
Regards,
Barnabás Pőcze
Powered by blists - more mailing lists