mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
multiqueue: Ignore queue fullness for most events
Use gst_data_queue_push_force() for most events so they are immediately enqueued. Only gap events and actual buffer data will now block when the queue is full. This fixes a problem with non-flushing seek handling where events following a segment-done event would block if they precede the SEGMENT event, since only SEGMENT events would clear the 'eos' state of the multiqueue queue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5954>
This commit is contained in:
parent
8e923a8e2d
commit
533b28cd6a
1 changed files with 9 additions and 2 deletions
|
@ -2648,6 +2648,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
GstEventType type;
|
||||
GstEvent *sref = NULL;
|
||||
GstPad *srcpad;
|
||||
gboolean is_timed_event = FALSE;
|
||||
|
||||
|
||||
sq = GST_MULTIQUEUE_PAD (pad)->sq;
|
||||
|
@ -2732,6 +2733,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
}
|
||||
}
|
||||
is_timed_event = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2755,8 +2757,13 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
"Enqueuing event %p of type %s with id %d",
|
||||
event, GST_EVENT_TYPE_NAME (event), curid);
|
||||
|
||||
if (!gst_data_queue_push (sq->queue, (GstDataQueueItem *) item))
|
||||
goto flushing;
|
||||
if (is_timed_event) {
|
||||
if (!gst_data_queue_push (sq->queue, (GstDataQueueItem *) item))
|
||||
goto flushing;
|
||||
} else {
|
||||
if (!gst_data_queue_push_force (sq->queue, (GstDataQueueItem *) item))
|
||||
goto flushing;
|
||||
}
|
||||
|
||||
/* mark EOS when we received one, we must do that after putting the
|
||||
* buffer in the queue because EOS marks the buffer as filled. */
|
||||
|
|
Loading…
Reference in a new issue