From e10b460ed4dde5e10cead1ac752ab9f0ebc36405 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 25 May 2025 19:31:22 +0900 Subject: [PATCH] rtputils: Add debug category Use rtputils specific debug category instead of "default" Part-of: --- .../gst-plugins-good/gst/rtp/gstrtputils.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtputils.c b/subprojects/gst-plugins-good/gst/rtp/gstrtputils.c index 4d86fb2208..5776cd8e02 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtputils.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtputils.c @@ -17,8 +17,33 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "gstrtputils.h" +#ifndef GST_DISABLE_GST_DEBUG +#define GST_CAT_DEFAULT ensure_debug_category() +static GstDebugCategory * +ensure_debug_category (void) +{ + static gsize cat_gonce = 0; + + if (g_once_init_enter (&cat_gonce)) { + gsize cat_done; + + cat_done = (gsize) _gst_debug_category_new ("rtputils", 0, "rtputils"); + + g_once_init_leave (&cat_gonce, cat_done); + } + + return (GstDebugCategory *) cat_gonce; +} +#else +#define ensure_debug_category() /* NOOP */ +#endif /* GST_DISABLE_GST_DEBUG */ + typedef struct { GstElement *element;