[PATCH] gst: provider: Do not hide v4l2deviceprovider

Barnabás Pőcze pobrn at protonmail.com
Mon May 6 22:56:39 CEST 2024


Hi


2024. május 6., hétfő 21:51 keltezéssel, Nicolas Dufresne <nicolas at ndufresne.ca> írta:

> Le lundi 06 mai 2024 à 21:38 +0300, Laurent Pinchart a écrit :
> > On Mon, May 06, 2024 at 08:03:53PM +0530, Umang Jain wrote:
> > > Hi Hou Qi
> > >
> > > On 06/05/24 7:55 am, Hou Qi wrote:
> > > > Currently libcameraprovider hides "v4l2deviceprovider" to avoid devices
> > > > being duplicated. When running "gst-gst-device-monitor-1.0 Video",
> > > > device monitor probes device providers one by one and sends bus message
> > > > to gst-device-monitor to print device information.
> > > >
> > > > There is one case that libcameraprovider and v4l2deviceprovider both
> > > > exit, libcameraprovider fails to probe device while v4l2deviceprovider
> > > > probes successfully. "gst-device-monitor Video" will show nothing as
> > > > v4l2deviceprovider is hidden and the bus message it uses to convey
> > > > device information is dropped.
> > > >
> > > > To fix this issue, not to hide v4l2deviceprovider when do
> > > > gst_libcamera_provider_init().
> > >
> > > I think this just circumvents the issue rather than fixing it. I would
> > > be more interested in knowing /why/ libcameraprovider can't probe it.
> >
> > Possibly because not all V4L2 devices are in scope for libcamera ?
> >
> > Hiding the provider isn't a very nice solution, but duplicating devices
> > isn't good either. The approach taken by pipewire is to query libcamera
> > for the list of devices it supports, and ignoring them in the V4L2
> > source element. I wonder if something similar could be done for
> > GStreamer.
> 
> Do you have links to that ? I was not ware that you could mix v4l2 and libcamera
> in pipewire today.

I believe it was always possible. The only recent thing is camera de-duplication,
which was introduced in wireplumber not so long ago:

  https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/525


> [...]


Regards,
Barnabás Pőcze


More information about the libcamera-devel mailing list