pbutils: Add a pbutils debug category

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505>
This commit is contained in:
Philippe Normand 2022-01-08 14:56:06 +00:00 committed by GStreamer Marge Bot
parent 574cbbf0b5
commit 1c8f7c32aa
6 changed files with 19 additions and 0 deletions

View 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))

View file

@ -299,6 +299,9 @@
#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))

View 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"

View 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;

View 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);

View 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);