static void debug_dump_element_pads (GstIterator * pad_iter, GstPad * pad, GstElement * element, GstDebugGraphDetails details, GString * str, const gint indent, guint * src_pads, guint * sink_pads) { GValue item = { 0, }; gboolean pads_done; GstPadDirection dir; pads_done = FALSE; while (!pads_done) { switch (gst_iterator_next (pad_iter, &item)) { case GST_ITERATOR_OK: pad = g_value_get_object (&item); debug_dump_element_pad (pad, element, details, str, 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; } } }
static void debug_dump_element_pads (GstIterator * pad_iter, GstPad * pad, GstElement * element, GstDebugGraphDetails details, GString * str, const gint indent, guint * num_pads, gchar * cluster_name, gchar ** first_pad_name) { GValue item = { 0, }; gboolean pads_done; const gchar *spc = MAKE_INDENT (indent); pads_done = FALSE; while (!pads_done) { switch (gst_iterator_next (pad_iter, &item)) { case GST_ITERATOR_OK: pad = g_value_get_object (&item); if (!*num_pads) { g_string_append_printf (str, "%ssubgraph cluster_%s {\n", spc, cluster_name); g_string_append_printf (str, "%s label=\"\";\n", spc); g_string_append_printf (str, "%s style=\"invis\";\n", spc); (*first_pad_name) = debug_dump_make_object_name (GST_OBJECT (pad)); } debug_dump_element_pad (pad, element, details, str, indent); (*num_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; } } if (*num_pads) { g_string_append_printf (str, "%s}\n\n", spc); } }