summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamerasrc.cpp
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-01-16 10:30:05 -0500
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-07 01:57:45 +0200
commitcfa61225a47e9ab59d27f306383ff54e6a568f37 (patch)
tree1c5a8ac68b450027135f7696cf67118762da3ca5 /src/gstreamer/gstlibcamerasrc.cpp
parent2c93810ec1f155e7e517d3ebd88e131af310cdd2 (diff)
gst: libcamerasrc: Add a debug category
This will allow selecting libcamerasrc traces with the following environment: GST_DEBUG=libcamerasrc:7 Or all libcamera GStreamer element traces using GST_DEBUG="libcamera*:7" Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamerasrc.cpp')
-rw-r--r--src/gstreamer/gstlibcamerasrc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index e0c1c4e5..3e13a000 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -11,6 +11,9 @@
#include "gstlibcamerapad.h"
#include "gstlibcamera-utils.h"
+GST_DEBUG_CATEGORY_STATIC(source_debug);
+#define GST_CAT_DEFAULT source_debug
+
struct _GstLibcameraSrc {
GstElement parent;
GstPad *srcpad;
@@ -22,7 +25,9 @@ enum {
PROP_CAMERA_NAME
};
-G_DEFINE_TYPE(GstLibcameraSrc, gst_libcamera_src, GST_TYPE_ELEMENT);
+G_DEFINE_TYPE_WITH_CODE(GstLibcameraSrc, gst_libcamera_src, GST_TYPE_ELEMENT,
+ GST_DEBUG_CATEGORY_INIT(source_debug, "libcamerasrc", 0,
+ "libcamera Source"));
#define TEMPLATE_CAPS GST_STATIC_CAPS("video/x-raw; image/jpeg")