}
}
- 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
{
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;