From: Philippe Normand Date: Sat, 8 Jan 2022 14:56:06 +0000 (+0000) Subject: pbutils: Add a pbutils debug category X-Git-Tag: 1.20.0~117 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fgstreamer.git;a=commitdiff_plain;h=1c8f7c32aa5b67fef4f10ad969b9429ad398d834 pbutils: Add a pbutils debug category Part-of: --- diff --git a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/codec-utils.c b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/codec-utils.c index 0394e37..7440ad2 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/codec-utils.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/codec-utils.c @@ -43,6 +43,9 @@ #include +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)) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-profile.c b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-profile.c index 73acbe0..02c3433 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-profile.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-profile.c @@ -299,6 +299,9 @@ #include +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)) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c index 824464f..9c4ff8c 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c @@ -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" diff --git a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.c b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.c index 8115de3..15b0dd1 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/pbutils.c @@ -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; diff --git a/subprojects/gst-plugins-base/tests/check/libs/pbutils.c b/subprojects/gst-plugins-base/tests/check/libs/pbutils.c index 37ae339..472cbb5 100644 --- a/subprojects/gst-plugins-base/tests/check/libs/pbutils.c +++ b/subprojects/gst-plugins-base/tests/check/libs/pbutils.c @@ -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); diff --git a/subprojects/gst-plugins-base/tests/check/libs/profile.c b/subprojects/gst-plugins-base/tests/check/libs/profile.c index b9d5460..d92c886 100644 --- a/subprojects/gst-plugins-base/tests/check/libs/profile.c +++ b/subprojects/gst-plugins-base/tests/check/libs/profile.c @@ -28,6 +28,7 @@ #include #include +#include #ifdef G_OS_UNIX #include /* 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);