diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-05-24 13:27:09 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-05-24 13:28:38 +0200 |
commit | 53e53386d7cd15cc8a212ff267b21c98dfb9afe7 (patch) | |
tree | c10b1cfe12908a97587996fbb7a9eaf0d94756c4 /gst/gstdebugutils.c | |
parent | 483c0fe4909c4e2f55681496652fb1f291fe3bd7 (diff) |
debugutils: Fix for GstIterator API changes
Diffstat (limited to 'gst/gstdebugutils.c')
-rw-r--r-- | gst/gstdebugutils.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c index 3bca9f75f..3e95bf6e7 100644 --- a/gst/gstdebugutils.c +++ b/gst/gstdebugutils.c @@ -473,6 +473,8 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, { GstIterator *element_iter, *pad_iter; gboolean elements_done, pads_done; + GValue item = { 0, }; + GValue item2 = { 0, }; GstElement *element; GstPad *pad; GstPadDirection dir; @@ -485,8 +487,9 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, element_iter = gst_bin_iterate_elements (bin); elements_done = FALSE; while (!elements_done) { - switch (gst_iterator_next (element_iter, (gpointer) & element)) { + switch (gst_iterator_next (element_iter, &item)) { case GST_ITERATOR_OK: + element = g_value_get_object (&item); element_name = debug_dump_make_object_name (GST_OBJECT (element)); if (details & GST_DEBUG_GRAPH_SHOW_STATES) { @@ -519,15 +522,16 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, if ((pad_iter = gst_element_iterate_pads (element))) { pads_done = FALSE; while (!pads_done) { - switch (gst_iterator_next (pad_iter, (gpointer) & pad)) { + switch (gst_iterator_next (pad_iter, &item2)) { case GST_ITERATOR_OK: + pad = g_value_get_object (&item2); 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++; - gst_object_unref (pad); + g_value_reset (&item2); break; case GST_ITERATOR_RESYNC: gst_iterator_resync (pad_iter); @@ -538,6 +542,7 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, break; } } + g_value_unset (&item2); gst_iterator_free (pad_iter); } if (GST_IS_BIN (element)) { @@ -558,14 +563,15 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, if ((pad_iter = gst_element_iterate_pads (element))) { pads_done = FALSE; while (!pads_done) { - switch (gst_iterator_next (pad_iter, (gpointer) & pad)) { + switch (gst_iterator_next (pad_iter, &item2)) { case GST_ITERATOR_OK: + pad = g_value_get_object (&item2); if (gst_pad_is_linked (pad) && gst_pad_get_direction (pad) == GST_PAD_SRC) { debug_dump_element_pad_link (pad, element, details, out, indent); } - gst_object_unref (pad); + g_value_reset (&item2); break; case GST_ITERATOR_RESYNC: gst_iterator_resync (pad_iter); @@ -576,9 +582,10 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, break; } } + g_value_unset (&item2); gst_iterator_free (pad_iter); } - gst_object_unref (element); + g_value_reset (&item); break; case GST_ITERATOR_RESYNC: gst_iterator_resync (element_iter); @@ -589,6 +596,7 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out, break; } } + g_value_unset (&item); gst_iterator_free (element_iter); } |