+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):
/* 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--;
* 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
* 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;
}
* 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
* 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;
}