Merge remote-tracking branch 'origin/master' into 0.11
authorEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 10 Aug 2011 15:07:54 +0000 (17:07 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 10 Aug 2011 15:07:54 +0000 (17:07 +0200)
Conflicts:
gst/gstdebugutils.c
gst/gstelementdetails.h
gst/gstregistrychunks.c
tools/gst-run.c

1  2 
gst/gstdebugutils.c
gst/gstregistrychunks.c

@@@ -458,6 -459,39 +458,41 @@@ debug_dump_element_pad_link (GstPad * p
    }
  }
  
 -    switch (gst_iterator_next (pad_iter, (gpointer) & pad)) {
+ /* New function
+  */
+ static void
+ debug_dump_element_pads (GstIterator * pad_iter, GstPad * pad,
+     GstElement * element, GstDebugGraphDetails details, FILE * out,
+     const gint indent, guint * src_pads, guint * sink_pads)
+ {
++  GValue item = { 0, };
+   gboolean pads_done;
+   GstPadDirection dir;
+   pads_done = FALSE;
+   while (!pads_done) {
 -        gst_object_unref (pad);
++    switch (gst_iterator_next (pad_iter, &item)) {
+       case GST_ITERATOR_OK:
++        pad = g_value_get_object (&item);
+         debug_dump_element_pad (pad, element, details, out, indent);
+         dir = gst_pad_get_direction (pad);
+         if (dir == GST_PAD_SRC)
+           (*src_pads)++;
+         else if (dir == GST_PAD_SINK)
+           (*sink_pads)++;
++        g_value_reset (&item);
+         break;
+       case GST_ITERATOR_RESYNC:
+         gst_iterator_resync (pad_iter);
+         break;
+       case GST_ITERATOR_ERROR:
+       case GST_ITERATOR_DONE:
+         pads_done = TRUE;
+         break;
+     }
+   }
+ }
  /*
   * debug_dump_element:
   * @bin: the bin that should be analyzed
@@@ -472,11 -506,8 +507,10 @@@ debug_dump_element (GstBin * bin, GstDe
  {
    GstIterator *element_iter, *pad_iter;
    gboolean elements_done, pads_done;
 +  GValue item = { 0, };
 +  GValue item2 = { 0, };
    GstElement *element;
    GstPad *pad;
-   GstPadDirection dir;
    guint src_pads, sink_pads;
    gchar *element_name;
    gchar *state_name = NULL;
Simple merge