[PATCH] gst: provider: Do not hide v4l2deviceprovider

Hou Qi qi.hou at nxp.com
Mon May 6 04:25:55 CEST 2024


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().

Signed-off-by: Hou Qi <qi.hou at nxp.com>
---
 src/gstreamer/gstlibcameraprovider.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp
index ce3e0a08..454e7aaa 100644
--- a/src/gstreamer/gstlibcameraprovider.cpp
+++ b/src/gstreamer/gstlibcameraprovider.cpp
@@ -227,10 +227,6 @@ gst_libcamera_provider_probe(GstDeviceProvider *provider)
 static void
 gst_libcamera_provider_init(GstLibcameraProvider *self)
 {
-	GstDeviceProvider *provider = GST_DEVICE_PROVIDER(self);
-
-	/* Avoid devices being duplicated. */
-	gst_device_provider_hide_provider(provider, "v4l2deviceprovider");
 }
 
 static void
-- 
2.34.1



More information about the libcamera-devel mailing list