icles: Update for new GstIterator API

This commit is contained in:
Sebastian Dröge 2011-05-05 16:04:11 +02:00
parent 64851f12c0
commit 130cb6b515
2 changed files with 8 additions and 6 deletions

View file

@ -60,11 +60,11 @@ static void
dump_element_stats (GstElement * element)
{
GstIterator *it;
gpointer data;
GValue data = { 0, };
it = gst_element_iterate_src_pads (element);
while (gst_iterator_next (it, &data) == GST_ITERATOR_OK) {
GstPad *pad = GST_PAD (data);
GstPad *pad = g_value_get_object (&data);
GstCaps *caps;
gchar *str;
GstQuery *query;
@ -87,8 +87,9 @@ dump_element_stats (GstElement * element)
}
gst_query_unref (query);
gst_object_unref (pad);
g_value_reset (&data);
}
g_value_unset (&data);
gst_iterator_free (it);
}

View file

@ -79,7 +79,7 @@ main (gint argc, gchar * argv[])
GstStateChangeReturn res;
GstIterator *it;
GstBus *bus;
gpointer data;
GValue data = { 0, };
gst_init (&argc, &argv);
@ -133,7 +133,7 @@ main (gint argc, gchar * argv[])
it = gst_element_iterate_src_pads (decodebin);
while (gst_iterator_next (it, &data) == GST_ITERATOR_OK) {
GstPad *pad = GST_PAD (data);
GstPad *pad = g_value_get_object (&data);
GstCaps *caps;
gchar *str;
GstQuery *query;
@ -156,8 +156,9 @@ main (gint argc, gchar * argv[])
}
gst_query_unref (query);
gst_object_unref (pad);
g_value_reset (&data);
}
g_value_unset (&data);
gst_iterator_free (it);
return 0;