Commit 6a4b9177 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

gst/gstbin.c: Explicitely make an element release locks in a group when being remove from a bin.

Original commit message from CVS:
* gst/gstbin.c: (gst_bin_remove_func):
Explicitely make an element release locks in a group when being
remove from a bin.
* gst/gstqueue.c: (gst_queue_chain), (gst_queue_get):
If there's no scheduler, always return immediately (similar to
gst_element_interrupt).
parent 77bf6d8c
2005-02-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstbin.c: (gst_bin_remove_func):
Explicitely make an element release locks in a group when being
remove from a bin.
* gst/gstqueue.c: (gst_queue_chain), (gst_queue_get):
If there's no scheduler, always return immediately (similar to
gst_element_interrupt).
2005-01-31 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstbin.c: (gst_bin_child_state_change_func):
......
......@@ -555,6 +555,9 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
/* remove this element from the list of managed elements */
gst_bin_unset_element_sched (element, GST_ELEMENT_SCHED (bin));
/* if it is still iterating, make it stop */
gst_element_release_locks (element);
/* now remove the element from the list of elements */
bin->children = g_list_remove (bin->children, element);
bin->numchildren--;
......
......@@ -654,10 +654,12 @@ restart:
* or its manager, switch back to iterator so bottom
* half of state change executes */
if (queue->interrupt) {
GstScheduler *sched;
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
GST_QUEUE_MUTEX_UNLOCK;
if (gst_scheduler_interrupt (gst_pad_get_scheduler (queue->sinkpad),
GST_ELEMENT (queue))) {
sched = gst_pad_get_scheduler (queue->sinkpad);
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) {
goto out_unref;
}
/* if we got here because we were unlocked after a
......@@ -778,10 +780,12 @@ restart:
* manager, switch back to iterator so bottom half of state
* change executes. */
if (queue->interrupt) {
GstScheduler *sched;
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
GST_QUEUE_MUTEX_UNLOCK;
if (gst_scheduler_interrupt (gst_pad_get_scheduler (queue->srcpad),
GST_ELEMENT (queue)))
sched = gst_pad_get_scheduler (queue->srcpad);
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue)))
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
goto restart;
}
......
......@@ -654,10 +654,12 @@ restart:
* or its manager, switch back to iterator so bottom
* half of state change executes */
if (queue->interrupt) {
GstScheduler *sched;
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
GST_QUEUE_MUTEX_UNLOCK;
if (gst_scheduler_interrupt (gst_pad_get_scheduler (queue->sinkpad),
GST_ELEMENT (queue))) {
sched = gst_pad_get_scheduler (queue->sinkpad);
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) {
goto out_unref;
}
/* if we got here because we were unlocked after a
......@@ -778,10 +780,12 @@ restart:
* manager, switch back to iterator so bottom half of state
* change executes. */
if (queue->interrupt) {
GstScheduler *sched;
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
GST_QUEUE_MUTEX_UNLOCK;
if (gst_scheduler_interrupt (gst_pad_get_scheduler (queue->srcpad),
GST_ELEMENT (queue)))
sched = gst_pad_get_scheduler (queue->srcpad);
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue)))
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
goto restart;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment