add gst_alloc_trace_live_all(), used by the test suites
authorDavid Schleef <ds@schleef.org>
Wed, 15 Oct 2003 21:31:23 +0000 (21:31 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 15 Oct 2003 21:31:23 +0000 (21:31 +0000)
Original commit message from CVS:
add gst_alloc_trace_live_all(), used by the test suites

gst/gsttrace.c
gst/gsttrace.h

index 990d4ed..6130e7d 100644 (file)
@@ -219,6 +219,28 @@ gst_alloc_trace_list (void)
 }
 
 /**
+ * gst_alloc_trace_live_all:
+ *
+ * Returns the total number of live registered alloc trace objects.
+ */
+int
+gst_alloc_trace_live_all (void)
+{
+  GList *walk = _gst_alloc_tracers;
+  int num = 0;
+  
+  while (walk) {
+    GstAllocTrace *trace = (GstAllocTrace *) walk->data;
+
+    num += trace->live;
+
+    walk = g_list_next (walk);
+  }
+
+  return num;
+}
+
+/**
  * gst_alloc_trace_print_all:
  *
  * Print the status of all registered alloc trace objectes.
index a97a6dc..7243415 100644 (file)
@@ -89,6 +89,7 @@ gboolean              gst_alloc_trace_available       (void);
 const GList*           gst_alloc_trace_list            (void);
 GstAllocTrace*         _gst_alloc_trace_register       (const gchar *name);
 
+int                    gst_alloc_trace_live_all        (void);
 void                   gst_alloc_trace_print_all       (void);
 void                   gst_alloc_trace_set_flags_all   (GstAllocTraceFlags flags);