diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2021-04-19 16:39:03 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-20 06:35:01 +0000 |
commit | c70b41b22bfe46f60cfb392e586885e17e418979 (patch) | |
tree | db60850efe5aa97a06281277e31b2551edeeb96a /sys | |
parent | b705fb93be41e6fbf6ab8a4bdf5bfd0086df03f4 (diff) |
v4l2: fix debug category initialisation again
Would spew warnings on the rpi4 when calling into
gst_v4l2_object_get_codec_caps() from the probe_and_register()
function since the v4l2_debug category initialisation would
only be done later as part of the element/device provider
registration.
Also log things in the probe function to the v4l2 category
instead of the default category while we're at it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/956>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/v4l2/gstv4l2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c index dbdcff456..ec53bc9e8 100644 --- a/sys/v4l2/gstv4l2.c +++ b/sys/v4l2/gstv4l2.c @@ -58,6 +58,9 @@ #include "gstv4l2vp9enc.h" #include "gstv4l2transform.h" +GST_DEBUG_CATEGORY_EXTERN (v4l2_debug); +#define GST_CAT_DEFAULT v4l2_debug + #ifdef GST_V4L2_ENABLE_PROBE /* This is a minimalist probe, for speed, we only enumerate formats */ static GstCaps * @@ -124,6 +127,8 @@ gst_v4l2_probe_and_register (GstPlugin * plugin) struct v4l2_capability vcap; guint32 device_caps; + v4l2_element_init (plugin); + GST_DEBUG ("Probing devices"); it = gst_v4l2_iterator_new (); |