diff options
author | Wim Taymans <wtaymans@redhat.com> | 2015-11-06 17:29:22 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2015-11-06 17:29:22 +0100 |
commit | b8bea9d8be12d2eb8247a67bb67d8f3e8264957f (patch) | |
tree | b13b196e3898376c6d2420a9d848b00f98e69dfe /gst/audioconvert | |
parent | 268ed5dd6ffbea7ca9e7fe5c0f09ca2de7306f5a (diff) |
audio: add debug categories
Diffstat (limited to 'gst/audioconvert')
-rw-r--r-- | gst/audioconvert/audioconvert.c | 22 | ||||
-rw-r--r-- | gst/audioconvert/gstaudioconvert.c | 1 | ||||
-rw-r--r-- | gst/audioconvert/gstchannelmix.c | 23 |
3 files changed, 46 insertions, 0 deletions
diff --git a/gst/audioconvert/audioconvert.c b/gst/audioconvert/audioconvert.c index 0e62e8543..06de29f98 100644 --- a/gst/audioconvert/audioconvert.c +++ b/gst/audioconvert/audioconvert.c @@ -53,6 +53,28 @@ * </refsect2> */ +#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 ("audio-converter", 0, + "audio-converter object"); + + g_once_init_leave (&cat_gonce, cat_done); + } + + return (GstDebugCategory *) cat_gonce; +} +#else +#define ensure_debug_category() /* NOOP */ +#endif /* GST_DISABLE_GST_DEBUG */ + typedef void (*AudioConvertFunc) (gpointer dst, const gpointer src, gint count); /** diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 92a79fb48..4476acff7 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -68,6 +68,7 @@ GST_DEBUG_CATEGORY (audio_convert_debug); GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); +#define GST_CAT_DEFAULT (audio_convert_debug) /*** DEFINITIONS **************************************************************/ diff --git a/gst/audioconvert/gstchannelmix.c b/gst/audioconvert/gstchannelmix.c index 639de1538..86000e948 100644 --- a/gst/audioconvert/gstchannelmix.c +++ b/gst/audioconvert/gstchannelmix.c @@ -29,6 +29,29 @@ #include "gstchannelmix.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 ("audio-channel-mix", 0, + "audio-channel-mix object"); + + g_once_init_leave (&cat_gonce, cat_done); + } + + return (GstDebugCategory *) cat_gonce; +} +#else +#define ensure_debug_category() /* NOOP */ +#endif /* GST_DISABLE_GST_DEBUG */ + + #define INT_MATRIX_FACTOR_EXPONENT 10 typedef void (*MixFunc) (GstAudioChannelMix * mix, const gpointer src, |