diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1bitwriter.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1bitwriter.c index 4fe133f44e..f54181d77a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1bitwriter.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1bitwriter.c @@ -25,6 +25,25 @@ #include "gstav1bitwriter.h" #include +#ifndef GST_DISABLE_GST_DEBUG +#define GST_CAT_DEFAULT gst_av1_debug_category_get() +static GstDebugCategory * +gst_av1_debug_category_get (void) +{ + static gsize cat_gonce = 0; + + if (g_once_init_enter (&cat_gonce)) { + GstDebugCategory *cat = NULL; + + GST_DEBUG_CATEGORY_INIT (cat, "bitwriter_av1", 0, "av1 bitwriter library"); + + g_once_init_leave (&cat_gonce, (gsize) cat); + } + + return (GstDebugCategory *) cat_gonce; +} +#endif /* GST_DISABLE_GST_DEBUG */ + #define WRITE_BITS_UNCHECK(bw, val, nbits) \ (nbits <= 8 ? gst_bit_writer_put_bits_uint8 (bw, val, nbits) : \ (nbits <= 16 ? gst_bit_writer_put_bits_uint16 (bw, val, nbits) : \ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.c index 078e6b18ed..5661cce0cd 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.c @@ -26,6 +26,26 @@ #include #include +#ifndef GST_DISABLE_GST_DEBUG +#define GST_CAT_DEFAULT gst_h264_debug_category_get() +static GstDebugCategory * +gst_h264_debug_category_get (void) +{ + static gsize cat_gonce = 0; + + if (g_once_init_enter (&cat_gonce)) { + GstDebugCategory *cat = NULL; + + GST_DEBUG_CATEGORY_INIT (cat, "bitwriter_h264", 0, + "h264 bitwriter library"); + + g_once_init_leave (&cat_gonce, (gsize) cat); + } + + return (GstDebugCategory *) cat_gonce; +} +#endif /* GST_DISABLE_GST_DEBUG */ + /******************************** Utils ********************************/ #define SIGNED(val) (2 * ABS(val) - ((val) > 0)) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265bitwriter.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265bitwriter.c index ae6acd8b22..c91f2dd06f 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265bitwriter.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265bitwriter.c @@ -27,6 +27,26 @@ #include #include +#ifndef GST_DISABLE_GST_DEBUG +#define GST_CAT_DEFAULT gst_h265_debug_category_get() +static GstDebugCategory * +gst_h265_debug_category_get (void) +{ + static gsize cat_gonce = 0; + + if (g_once_init_enter (&cat_gonce)) { + GstDebugCategory *cat = NULL; + + GST_DEBUG_CATEGORY_INIT (cat, "bitwriter_h265", 0, + "h265 bitwriter library"); + + g_once_init_leave (&cat_gonce, (gsize) cat); + } + + return (GstDebugCategory *) cat_gonce; +} +#endif /* GST_DISABLE_GST_DEBUG */ + /******************************** Utils ********************************/ #define SIGNED(val) (2 * ABS(val) - ((val) > 0)) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9bitwriter.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9bitwriter.c index 2b6fcfd970..3a8556930c 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9bitwriter.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9bitwriter.c @@ -25,6 +25,25 @@ #include "gstvp9bitwriter.h" #include +#ifndef GST_DISABLE_GST_DEBUG +#define GST_CAT_DEFAULT gst_vp9_debug_category_get() +static GstDebugCategory * +gst_vp9_debug_category_get (void) +{ + static gsize cat_gonce = 0; + + if (g_once_init_enter (&cat_gonce)) { + GstDebugCategory *cat = NULL; + + GST_DEBUG_CATEGORY_INIT (cat, "bitwriter_vp9", 0, "vp9 bitwriter library"); + + g_once_init_leave (&cat_gonce, (gsize) cat); + } + + return (GstDebugCategory *) cat_gonce; +} +#endif /* GST_DISABLE_GST_DEBUG */ + #define WRITE_BITS_UNCHECK(bw, val, nbits) \ (nbits <= 8 ? gst_bit_writer_put_bits_uint8 (bw, val, nbits) : \ (nbits <= 16 ? gst_bit_writer_put_bits_uint16 (bw, val, nbits) : \