[gst-cvs] CVS: gstreamer/libs/bytestream gstbytestream.c,1.1.2.11,1.1.2.12

Wim Taymans wtay at users.sourceforge.net
Tue Sep 25 15:10:06 PDT 2001


Update of /cvsroot/gstreamer/gstreamer/libs/bytestream
In directory usw-pr-cvs1:/tmp/cvs-serv31443

Modified Files:
      Tag: BRANCH-EVENTS1
	gstbytestream.c 
Log Message:
Make debugging code less CPU consuling when compiled out.


Index: gstbytestream.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/libs/bytestream/Attic/gstbytestream.c,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -d -r1.1.2.11 -r1.1.2.12
--- gstbytestream.c	2001/09/25 04:08:23	1.1.2.11
+++ gstbytestream.c	2001/09/25 22:09:45	1.1.2.12
@@ -26,9 +26,16 @@
 #include <gst/gstinfo.h>
 #include "gstbytestream.h"
 
-//#define bs_print(format,args...) g_print(format, ## args)
-#define bs_print(format,args...)
+//#define BS_DEBUG
 
+#ifdef BS_DEBUG
+# define bs_print(format,args...) 	GST_DEBUG (GST_CAT_BUFFER,  format, ## args)
+# define bs_status(bs) 			gst_bytestream_print_status(bs)
+#else
+# define bs_print(format,args...)
+# define bs_status(bs)
+#endif
+
 //static void gst_bytestream_print_status(GstByteStream *bs);
 guint8 *gst_bytestream_assemble (GstByteStream * bs, guint32 len);
 
@@ -198,7 +205,7 @@
       return NULL;
     bs_print ("peek: there are now %d bytes in the list\n", bs->listavail);
   }
-  gst_bytestream_print_status (bs);
+  bs_status (bs);
 
   // extract the head buffer
   headbuf = GST_BUFFER (bs->buflist->data);
@@ -243,7 +250,7 @@
       return NULL;
     bs_print ("peek_bytes: there are now %d bytes in the list\n", bs->listavail);
   }
-  gst_bytestream_print_status (bs);
+  bs_status (bs);
 
   // extract the head buffer
   headbuf = GST_BUFFER (bs->buflist->data);





More information about the Gstreamer-commits mailing list