diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-11-04 19:11:19 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-11-04 19:11:19 +0100 |
commit | c2c977602754ca2c471482839deb421925014025 (patch) | |
tree | 5c8f3d9bc8c725ddeb8308854c06941ad88d4073 /gst/gstbin.c | |
parent | a8cc106ba85050dfce7b56b6c70e331c6aba7c8e (diff) | |
parent | 795e836ce3e63b2382be0cb5981f014bb061263e (diff) |
Merge branch 'master' into 0.11
Conflicts:
gst/gstbin.c
Diffstat (limited to 'gst/gstbin.c')
-rw-r--r-- | gst/gstbin.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c index 815a33b88..52f87c1ad 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -1775,7 +1775,7 @@ gst_bin_get_state_func (GstElement * element, GstState * state, typedef struct _GstBinSortIterator { GstIterator it; - GQueue *queue; /* elements queued for state change */ + GQueue queue; /* elements queued for state change */ GstBin *bin; /* bin we iterate */ gint mode; /* adding or removing dependency */ GstElement *best; /* next element with least dependencies */ @@ -1819,7 +1819,7 @@ add_to_queue (GstBinSortIterator * bit, GstElement * element) GST_DEBUG_OBJECT (bit->bin, "adding '%s' to queue", GST_ELEMENT_NAME (element)); gst_object_ref (element); - g_queue_push_tail (bit->queue, element); + g_queue_push_tail (&bit->queue, element); HASH_SET_DEGREE (bit, element, -1); } @@ -1828,11 +1828,11 @@ remove_from_queue (GstBinSortIterator * bit, GstElement * element) { GList *find; - if ((find = g_queue_find (bit->queue, element))) { + if ((find = g_queue_find (&bit->queue, element))) { GST_DEBUG_OBJECT (bit->bin, "removing '%s' from queue", GST_ELEMENT_NAME (element)); - g_queue_delete_link (bit->queue, find); + g_queue_delete_link (&bit->queue, find); gst_object_unref (element); } else { GST_DEBUG_OBJECT (bit->bin, "unable to remove '%s' from queue", @@ -1989,8 +1989,7 @@ gst_bin_sort_iterator_next (GstBinSortIterator * bit, GValue * result) GstBin *bin = bit->bin; /* empty queue, we have to find a next best element */ - if (g_queue_is_empty (bit->queue)) { - + if (g_queue_is_empty (&bit->queue)) { bit->best = NULL; bit->best_deg = G_MAXINT; g_list_foreach (bin->children, (GFunc) find_element, bit); @@ -2015,7 +2014,7 @@ gst_bin_sort_iterator_next (GstBinSortIterator * bit, GValue * result) } } else { /* everything added to the queue got reffed */ - best = g_queue_pop_head (bit->queue); + best = g_queue_pop_head (&bit->queue); g_value_set_object (result, best); gst_object_unref (best); } @@ -2035,7 +2034,7 @@ gst_bin_sort_iterator_resync (GstBinSortIterator * bit) GST_DEBUG_OBJECT (bin, "resync"); bit->dirty = FALSE; - clear_queue (bit->queue); + clear_queue (&bit->queue); /* reset degrees */ g_list_foreach (bin->children, (GFunc) reset_degree, bit); /* calc degrees, incrementing */ @@ -2052,8 +2051,7 @@ gst_bin_sort_iterator_free (GstBinSortIterator * bit) GstBin *bin = bit->bin; GST_DEBUG_OBJECT (bin, "free"); - clear_queue (bit->queue); - g_queue_free (bit->queue); + clear_queue (&bit->queue); g_hash_table_destroy (bit->hash); gst_object_unref (bin); } @@ -2076,7 +2074,7 @@ gst_bin_sort_iterator_new (GstBin * bin) (GstIteratorItemFunction) NULL, (GstIteratorResyncFunction) gst_bin_sort_iterator_resync, (GstIteratorFreeFunction) gst_bin_sort_iterator_free); - result->queue = g_queue_new (); + g_queue_init (&result->queue); result->hash = g_hash_table_new (NULL, NULL); gst_object_ref (bin); result->bin = bin; |