diff options
author | Benjamin Otte <otte@gnome.org> | 2003-08-03 17:18:40 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2003-08-03 17:18:40 +0000 |
commit | f7c37a4384fdc31ec2a0849207b4728d2565082a (patch) | |
tree | 46c2c221f57bb5f0ec56d39806da4be711c4eab6 /gst/gstinfo.h | |
parent | 4c4d69e51abd772fdf09a98aac52c53ab4ce59a6 (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.h | 7 |
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 |