summaryrefslogtreecommitdiffstats
path: root/gst/audioresample
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-09-23 16:40:27 +0000
committerDavid Schleef <ds@schleef.org>2005-09-23 16:40:27 +0000
commit4de70b1520c851277c3b7daea7b717a8d531c1e7 (patch)
treef834558a1e36c4973d5db7fae155836ede85130f /gst/audioresample
parent33adbc8b2330036119ce96b59e719bb63f026869 (diff)
downloadgst-plugins-bad-4de70b1520c851277c3b7daea7b717a8d531c1e7.tar.gz
gst-plugins-bad-4de70b1520c851277c3b7daea7b717a8d531c1e7.tar.bz2
gst-plugins-bad-4de70b1520c851277c3b7daea7b717a8d531c1e7.zip
gst/audioresample/: Convert to using gst debugging
Original commit message from CVS: * gst/audioresample/Makefile.am: * gst/audioresample/debug.h: * gst/audioresample/gstaudioresample.c: * gst/audioresample/resample.c: Convert to using gst debugging
Diffstat (limited to 'gst/audioresample')
-rw-r--r--gst/audioresample/Makefile.am1
-rw-r--r--gst/audioresample/debug.h17
-rw-r--r--gst/audioresample/gstaudioresample.c2
-rw-r--r--gst/audioresample/resample.c6
4 files changed, 18 insertions, 8 deletions
diff --git a/gst/audioresample/Makefile.am b/gst/audioresample/Makefile.am
index c3e8766e..10b5377f 100644
--- a/gst/audioresample/Makefile.am
+++ b/gst/audioresample/Makefile.am
@@ -7,7 +7,6 @@ resample_SOURCES = \
resample_ref.c \
resample_chunk.c \
resample.h \
- debug.c \
buffer.c
noinst_HEADERS = \
diff --git a/gst/audioresample/debug.h b/gst/audioresample/debug.h
index 2205940c..b369fe63 100644
--- a/gst/audioresample/debug.h
+++ b/gst/audioresample/debug.h
@@ -2,6 +2,7 @@
#ifndef __RESAMPLE_DEBUG_H__
#define __RESAMPLE_DEBUG_H__
+#if 0
enum
{
RESAMPLE_LEVEL_NONE = 0,
@@ -30,5 +31,21 @@ void resample_debug_log (int level, const char *file, const char *function,
int line, const char *format, ...);
void resample_debug_set_level (int level);
int resample_debug_get_level (void);
+#else
+
+#include <gst/gst.h>
+
+GST_DEBUG_CATEGORY_EXTERN (audioresample_debug);
+#define GST_CAT_DEFAULT audioresample_debug
+
+#define RESAMPLE_ERROR(...) GST_ERROR(__VA_ARGS__)
+#define RESAMPLE_WARNING(...) GST_WARNING(__VA_ARGS__)
+#define RESAMPLE_INFO(...) GST_INFO(__VA_ARGS__)
+#define RESAMPLE_DEBUG(...) GST_DEBUG(__VA_ARGS__)
+#define RESAMPLE_LOG(...) GST_LOG(__VA_ARGS__)
+
+#define resample_debug_set_level(x) do { } while (0)
+
+#endif
#endif
diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c
index 1d11856e..62736e98 100644
--- a/gst/audioresample/gstaudioresample.c
+++ b/gst/audioresample/gstaudioresample.c
@@ -31,7 +31,7 @@
#include <gst/audio/audio.h>
#include <gst/base/gstbasetransform.h>
-GST_DEBUG_CATEGORY_STATIC (audioresample_debug);
+GST_DEBUG_CATEGORY (audioresample_debug);
#define GST_CAT_DEFAULT audioresample_debug
/* elementfactory information */
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
index fb39807f..1f793639 100644
--- a/gst/audioresample/resample.c
+++ b/gst/audioresample/resample.c
@@ -37,21 +37,15 @@ void resample_scale_ref (ResampleState * r);
void resample_scale_functable (ResampleState * r);
-
void
resample_init (void)
{
static int inited = 0;
- const char *debug;
if (!inited) {
oil_init ();
inited = 1;
}
-
- if ((debug = g_getenv ("RESAMPLE_DEBUG"))) {
- resample_debug_set_level (atoi (debug));
- }
}
ResampleState *