[gst-cvs] CVS: gstreamer/gst gstbuffer.c,1.36.2.10,1.36.2.11

Joshua Pritikin jpritikin at users.sourceforge.net
Tue Sep 25 15:36:02 PDT 2001


Update of /cvsroot/gstreamer/gstreamer/gst
In directory usw-pr-cvs1:/tmp/cvs-serv4561

Modified Files:
      Tag: BRANCH-EVENTS1
	gstbuffer.c 
Log Message:
fix bugs in gst_buffer_print_live()


Index: gstbuffer.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/gstbuffer.c,v
retrieving revision 1.36.2.10
retrieving revision 1.36.2.11
diff -u -d -r1.36.2.10 -r1.36.2.11
--- gstbuffer.c	2001/09/25 04:07:09	1.36.2.10
+++ gstbuffer.c	2001/09/25 22:35:19	1.36.2.11
@@ -332,26 +332,37 @@
     return -1;
 }
 
+//
+// GST_BUFFER_WHERE will be replaced with something better as
+// soon as something better is actually implemented.  The
+// problems with this technique are:
+//
+// 1. Toggling debugging changes the function prototypes, causing
+// a full recompile.  Yuk.
+//
+// 2. The prototypes don't match the documentation.  This may cause
+// gtk-doc to choak.
+//
+// 3. Lots of ugly macros make the source code hard to maintain.
+//
+
 void gst_buffer_print_live ()
 {
-  GSList *sorted;
   GSList *elem;
 
   g_mutex_lock (_gst_buffer_chunk_lock);
 
-  sorted = g_slist_sort (_debug_live, (GCompareFunc) _compare_buffer);
+  _debug_live = g_slist_sort (_debug_live, (GCompareFunc) _compare_buffer);
 
-  for (elem = sorted; elem; elem = elem->next) {
+  for (elem = _debug_live; elem; elem = elem->next) {
     GstBuffer *buf = elem->data;
     g_print ("%sbuffer %p created %s:%d data=%p size=0x%x\n",
 	     buf->parent? "sub":"   ",
 	     buf, (!buf->file || buf->file == NULL)? "?" : buf->file,
 	     buf->line, buf->data, buf->size);
   }
-
-  g_print ("(%d buffers)\n", g_slist_length (sorted));
 
-  g_slist_free (sorted);
+  g_print ("(%d buffers)\n", g_slist_length (_debug_live));
 
   g_mutex_unlock (_gst_buffer_chunk_lock);
 }





More information about the Gstreamer-commits mailing list