From: Christopher Obbard Date: Tue, 27 Sep 2022 17:17:24 +0000 (+0100) Subject: v4l2codecs: Warn user when no media devices are found X-Git-Tag: 1.22.0~879 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c83ddcdf7e931abb8601a030c4676efc196e9be;p=platform%2Fupstream%2Fgstreamer.git v4l2codecs: Warn user when no media devices are found Currently if the user is not able to access the devices under /dev/media*, either due to no media devices present on the system or simply no permission to access the device, v4l2codecs initialises with no features or debug messages. Since calling `GST_DEBUG="v4l2*:7" gst-inspect-1.0 v4l2codecs` is a typical way to diagnose why element(s) failed to enumerate, we should be more verbose here when the user is not able to access any /dev/media* device. So print a simple debug message in this case to aid debugging. Part-of: --- diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecdevice.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecdevice.c index 7886c79..0497a1a 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecdevice.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecdevice.c @@ -316,6 +316,9 @@ gst_v4l2_codec_find_devices (void) client = g_udev_client_new (NULL); udev_devices = g_udev_client_query_by_subsystem (client, "media"); + if (!udev_devices) + GST_DEBUG ("Found no media devices"); + for (d = udev_devices; d; d = g_list_next (d)) { GUdevDevice *udev = (GUdevDevice *) d->data; const gchar *path = g_udev_device_get_device_file (udev);