pbutils: Add a pbutils debug category
authorPhilippe Normand <philn@igalia.com>
Sat, 8 Jan 2022 14:56:06 +0000 (14:56 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 13 Jan 2022 17:15:36 +0000 (17:15 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505>

subprojects/gst-plugins-base/gst-libs/gst/pbutils/codec-utils.c
subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-profile.c
subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c
subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.c
subprojects/gst-plugins-base/tests/check/libs/pbutils.c
subprojects/gst-plugins-base/tests/check/libs/profile.c

index 0394e37..7440ad2 100644 (file)
@@ -43,6 +43,9 @@
 
 #include <string.h>
 
+GST_DEBUG_CATEGORY_EXTERN (pbutils_debug);
+#define GST_CAT_DEFAULT pbutils_debug
+
 #define GST_SIMPLE_CAPS_HAS_NAME(caps,name) \
     gst_structure_has_name(gst_caps_get_structure((caps),0),(name))
 
index 73acbe0..02c3433 100644 (file)
 
 #include <string.h>
 
+GST_DEBUG_CATEGORY_EXTERN (pbutils_debug);
+#define GST_CAT_DEFAULT pbutils_debug
+
 /* GstEncodingProfile API */
 #define PROFILE_LOCK(profile) (g_mutex_lock(&((GstEncodingProfile*)profile)->lock))
 #define PROFILE_UNLOCK(profile) (g_mutex_unlock(&((GstEncodingProfile*)profile)->lock))
index 824464f..9c4ff8c 100644 (file)
@@ -88,6 +88,9 @@
 
 /* Documented in encoding-profile.c */
 
+GST_DEBUG_CATEGORY_EXTERN (pbutils_debug);
+#define GST_CAT_DEFAULT pbutils_debug
+
 #define GST_ENCODING_TARGET_HEADER "GStreamer Encoding Target"
 #define GST_ENCODING_TARGET_DIRECTORY "encoding-profiles"
 #define GST_ENCODING_TARGET_SUFFIX ".gep"
index 8115de3..15b0dd1 100644 (file)
@@ -61,6 +61,9 @@
 
 #include "gst/gst-i18n-plugin.h"
 
+GST_DEBUG_CATEGORY (pbutils_debug);
+#define GST_CAT_DEFAULT pbutils_debug
+
 static gpointer
 _init_locale_text_domain (gpointer data)
 {
@@ -101,6 +104,8 @@ gst_pb_utils_init (void)
     GST_LOG ("already initialised");
     return;
   }
+  GST_DEBUG_CATEGORY_INIT (pbutils_debug, "pbutils", 0,
+      "GStreamer Plugins Base utils");
   gst_pb_utils_init_locale_text_domain ();
 
   inited = TRUE;
index 37ae339..472cbb5 100644 (file)
@@ -1467,6 +1467,8 @@ libgstpbutils_suite (void)
   Suite *s = suite_create ("pbutils library");
   TCase *tc_chain = tcase_create ("general");
 
+  gst_pb_utils_init ();
+
   suite_add_tcase (s, tc_chain);
   tcase_add_test (tc_chain, test_pb_utils_init);
   tcase_add_test (tc_chain, test_pb_utils_post_missing_messages);
index b9d5460..d92c886 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <gst/pbutils/encoding-profile.h>
 #include <gst/pbutils/encoding-target.h>
+#include <gst/pbutils/pbutils.h>
 
 #ifdef G_OS_UNIX
 #include <unistd.h>             /* For R_OK etc. */
@@ -698,6 +699,8 @@ profile_suite (void)
   can_write = FALSE;            /* FIXME: fix can_write test on Windows */
 #endif
 
+  gst_pb_utils_init ();
+
   suite_add_tcase (s, tc_chain);
 
   tcase_add_test (tc_chain, test_profile_creation);