summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2015-11-06 17:29:22 +0100
committerWim Taymans <wtaymans@redhat.com>2015-11-06 17:29:22 +0100
commitb8bea9d8be12d2eb8247a67bb67d8f3e8264957f (patch)
treeb13b196e3898376c6d2420a9d848b00f98e69dfe
parent268ed5dd6ffbea7ca9e7fe5c0f09ca2de7306f5a (diff)
audio: add debug categories
-rw-r--r--gst-libs/gst/audio/audio-channels.c23
-rw-r--r--gst-libs/gst/audio/audio-info.c23
-rw-r--r--gst-libs/gst/audio/audio.c22
-rw-r--r--gst/audioconvert/audioconvert.c22
-rw-r--r--gst/audioconvert/gstaudioconvert.c1
-rw-r--r--gst/audioconvert/gstchannelmix.c23
6 files changed, 114 insertions, 0 deletions
diff --git a/gst-libs/gst/audio/audio-channels.c b/gst-libs/gst/audio/audio-channels.c
index 50ec0edd2..b358cc2a4 100644
--- a/gst-libs/gst/audio/audio-channels.c
+++ b/gst-libs/gst/audio/audio-channels.c
@@ -31,6 +31,29 @@
#include "audio-channels.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-channels", 0,
+ "audio-channels object");
+
+ g_once_init_leave (&cat_gonce, cat_done);
+ }
+
+ return (GstDebugCategory *) cat_gonce;
+}
+#else
+#define ensure_debug_category() /* NOOP */
+#endif /* GST_DISABLE_GST_DEBUG */
+
+
static const GstAudioChannelPosition default_channel_order[64] = {
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
diff --git a/gst-libs/gst/audio/audio-info.c b/gst-libs/gst/audio/audio-info.c
index e5f334162..739448c3e 100644
--- a/gst-libs/gst/audio/audio-info.c
+++ b/gst-libs/gst/audio/audio-info.c
@@ -27,6 +27,29 @@
#include <gst/gststructure.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-info", 0,
+ "audio-info object");
+
+ g_once_init_leave (&cat_gonce, cat_done);
+ }
+
+ return (GstDebugCategory *) cat_gonce;
+}
+#else
+#define ensure_debug_category() /* NOOP */
+#endif /* GST_DISABLE_GST_DEBUG */
+
+
/**
* gst_audio_info_copy:
* @info: a #GstAudioInfo
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index de713d7b6..5f3556feb 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -32,6 +32,28 @@
#include "audio.h"
#include "audio-enumtypes.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", 0, "audio library");
+
+ g_once_init_leave (&cat_gonce, cat_done);
+ }
+
+ return (GstDebugCategory *) cat_gonce;
+}
+#else
+#define ensure_debug_category() /* NOOP */
+#endif /* GST_DISABLE_GST_DEBUG */
+
+
/**
* gst_audio_buffer_clip:
* @buffer: (transfer full): The buffer to clip.
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,