summaryrefslogtreecommitdiff
path: root/gst/gstinfo.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-08-03 17:18:40 +0000
committerBenjamin Otte <otte@gnome.org>2003-08-03 17:18:40 +0000
commitf7c37a4384fdc31ec2a0849207b4728d2565082a (patch)
tree46c2c221f57bb5f0ec56d39806da4be711c4eab6 /gst/gstinfo.h
parent4c4d69e51abd772fdf09a98aac52c53ab4ce59a6 (diff)
optimized debugging.
Original commit message from CVS: optimized debugging. good: - we're a lot faster than before (no more locking in debug printing) bad : - we leak memory now when adding/removing debug handlers (which equals never for every current gstreamer app) - gst_debug_set_active isn't threadsafe anymore
Diffstat (limited to 'gst/gstinfo.h')
-rw-r--r--gst/gstinfo.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/gstinfo.h b/gst/gstinfo.h
index fb1f53ac85..090141a5fa 100644
--- a/gst/gstinfo.h
+++ b/gst/gstinfo.h
@@ -277,16 +277,17 @@ gchar * gst_debug_construct_term_color (guint colorinfo);
extern GstDebugCategory * GST_CAT_DEFAULT;
-
+/* this symbol may not be used */
+extern gboolean __gst_debug_enabled;
#ifdef G_HAVE_ISO_VARARGS
#define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
- if (gst_debug_is_active ()) { \
+ if (__gst_debug_enabled) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, (GObject *) (object), __VA_ARGS__); \
} \
}G_STMT_END
#else /* G_HAVE_GNUC_VARARGS */
#define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{ \
- if (gst_debug_is_active ()) { \
+ if (__gst_debug_enabled) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, (GObject *) (object), ##args ); \
} \
}G_STMT_END