Added GST_INFO_ENABLED flags
authorWim Taymans <wim.taymans@gmail.com>
Mon, 1 Jan 2001 00:44:28 +0000 (00:44 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 1 Jan 2001 00:44:28 +0000 (00:44 +0000)
Original commit message from CVS:
Added GST_INFO_ENABLED flags
Added --enable-debug-info
A little fix for the avidecoder

acconfig.h
configure.in
gst/gstinfo.h

index 2ada5dd..9a8d212 100644 (file)
@@ -17,3 +17,4 @@
 #undef HAVE_ATOMIC_H
 
 #undef GST_DEBUG_ENABLED
+#undef GST_INFO_ENABLED
index ad68daf..6c2e172 100644 (file)
@@ -318,7 +318,7 @@ esac],
 [PLUGINS_USE_SRCDIR=yes]) dnl Default value
 
 AC_ARG_ENABLE(debug,
-[  --enable-debug               spews lots of useless info at runtime],
+[  --enable-debug               compile with -g debugging info],
 [case "${enableval}" in
   yes) USE_DEBUG=yes ;;
   no)  USE_DEBUG=no ;;
@@ -326,6 +326,24 @@ AC_ARG_ENABLE(debug,
 esac], 
 [USE_DEBUG=no]) dnl Default value
 
+AC_ARG_ENABLE(debug-verbose,
+[  --enable-debug-verbose       spews lots of useless debugging info at runtime],
+[case "${enableval}" in
+  yes) USE_DEBUG_VERBOSE=yes ;;
+  no)  USE_DEBUG_VERBOSE=no ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-verbose) ;;
+esac], 
+[USE_DEBUG_VERBOSE=no]) dnl Default value
+
+AC_ARG_ENABLE(debug-info,
+[  --enable-debug-info         spews lots of info at runtime for plugin writers],
+[case "${enableval}" in
+  yes) USE_DEBUG_INFO=yes ;;
+  no)  USE_DEBUG_INFO=no ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-info) ;;
+esac], 
+[USE_DEBUG_INFO=no]) dnl Default value
+
 AC_ARG_ENABLE(profiling,
 [  --enable-profiling           adds -pg to compiler commandline, for profiling],
 [case "${enableval}" in
@@ -364,9 +382,16 @@ fi
 
 if test "x$USE_DEBUG" = xyes; then
   CFLAGS="$CFLAGS -g"
+fi
+
+if test "x$USE_DEBUG_VERBOSE" = xyes; then
   AC_DEFINE(GST_DEBUG_ENABLED)
 fi
 
+if test "x$USE_DEBUG_INFO" = xyes; then
+  AC_DEFINE(GST_INFO_ENABLED)
+fi
+
 if test "x$USE_PROFILING" = xyes; then
   CFLAGS="$CFLAGS -pg"
 fi
@@ -425,7 +450,6 @@ gst/Makefile
 gst/types/Makefile
 gst/meta/Makefile
 gst/elements/Makefile
-gst/xml/Makefile
 libs/Makefile
 libs/riff/Makefile
 libs/colorspace/Makefile
index e672cfb..f1ffaf0 100644 (file)
@@ -179,7 +179,16 @@ void gst_default_info_handler (gint category,gchar *file,gchar *function,
 extern GstInfoHandler _gst_info_handler;
 extern guint32 _gst_info_categories;
 
+/* for include files that make too much noise normally */
+#ifdef GST_INFO_FORCE_DISABLE
+#undef GST_INFO_ENABLED
+#endif
+/* for applications that really really want all the noise */
+#ifdef GST_INFO_FORCE_ENABLE
+#define GST_INFO_ENABLED
+#endif
 
+#ifdef GST_INFO_ENABLED
 #define INFO(cat,format,args...) G_STMT_START{ \
   if ((1<<cat) & _gst_info_categories) \
     _gst_info_handler(cat,__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
@@ -192,9 +201,13 @@ extern guint32 _gst_info_categories;
                       element,g_strdup_printf( format , ## args )); \
 }G_STMT_END
 
+#else
+#define INFO(cat,format,args...) 
+#define INFO_ELEMENT(cat,element,format,args...)
+#endif
 
 void           gst_info_set_categories         (guint32 categories);
-guint32                gst_info_get_categories         ();
+guint32                gst_info_get_categories         (void);
 const gchar *  gst_info_get_category_name      (gint category);
 void           gst_info_enable_category        (gint category);
 void           gst_info_disable_category       (gint category);