[libcamera-devel] [PATCH v1 08/23] gst: libcamerasrc: Add a debug category
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Feb 11 20:29:27 CET 2020
Hi Nicolas,
Thank you for the patch.
On Tue, Jan 28, 2020 at 10:31:55PM -0500, Nicolas Dufresne wrote:
> From: Nicolas Dufresne <nicolas.dufresne at collabora.com>
>
> 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 at collabora.com>
> ---
> src/gstreamer/gstlibcamerasrc.cpp | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
> index 74e1d7e..2177a8d 100644
> --- a/src/gstreamer/gstlibcamerasrc.cpp
> +++ b/src/gstreamer/gstlibcamerasrc.cpp
> @@ -10,6 +10,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;
> @@ -21,7 +24,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"));
s/LibCamera/libcamera/ (see branding comment in a previous patch).
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> #define TEMPLATE_CAPS GST_STATIC_CAPS("video/x-raw;image/jpeg")
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list