mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gst/base/gstbasesink.c: Flushing the preroll queue always needs to unlock the waiters.
Original commit message from CVS: * gst/base/gstbasesink.c: (gst_basesink_preroll_queue_flush), (gst_basesink_event), (gst_basesink_deactivate): Flushing the preroll queue always needs to unlock the waiters.
This commit is contained in:
parent
2e75d2ae7e
commit
7dc174d140
3 changed files with 16 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-06-28 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/base/gstbasesink.c: (gst_basesink_preroll_queue_flush),
|
||||||
|
(gst_basesink_event), (gst_basesink_deactivate):
|
||||||
|
Flushing the preroll queue always needs to unlock the waiters.
|
||||||
|
|
||||||
2005-06-28 Edward Hervey <edward@fluendo.com>
|
2005-06-28 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/gstpipeline.c: (gst_pipeline_send_event):
|
* gst/gstpipeline.c: (gst_pipeline_send_event):
|
||||||
|
|
|
@ -408,7 +408,7 @@ gst_basesink_preroll_queue_empty (GstBaseSink * basesink, GstPad * pad)
|
||||||
|
|
||||||
/* with PREROLL_LOCK */
|
/* with PREROLL_LOCK */
|
||||||
static void
|
static void
|
||||||
gst_basesink_preroll_queue_flush (GstBaseSink * basesink)
|
gst_basesink_preroll_queue_flush (GstBaseSink * basesink, GstPad * pad)
|
||||||
{
|
{
|
||||||
GstMiniObject *obj;
|
GstMiniObject *obj;
|
||||||
GQueue *q = basesink->preroll_queue;
|
GQueue *q = basesink->preroll_queue;
|
||||||
|
@ -422,6 +422,8 @@ gst_basesink_preroll_queue_flush (GstBaseSink * basesink)
|
||||||
}
|
}
|
||||||
/* we can't have EOS anymore now */
|
/* we can't have EOS anymore now */
|
||||||
basesink->eos = FALSE;
|
basesink->eos = FALSE;
|
||||||
|
/* and signal any waiters now */
|
||||||
|
GST_PREROLL_SIGNAL (pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* with STREAM_LOCK */
|
/* with STREAM_LOCK */
|
||||||
|
@ -587,9 +589,8 @@ gst_basesink_event (GstPad * pad, GstEvent * event)
|
||||||
GST_PREROLL_LOCK (pad);
|
GST_PREROLL_LOCK (pad);
|
||||||
/* we need preroll after the flush */
|
/* we need preroll after the flush */
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
gst_basesink_preroll_queue_flush (basesink);
|
|
||||||
/* unlock from a possible state change/preroll */
|
/* unlock from a possible state change/preroll */
|
||||||
GST_PREROLL_SIGNAL (pad);
|
gst_basesink_preroll_queue_flush (basesink, pad);
|
||||||
|
|
||||||
GST_LOCK (basesink);
|
GST_LOCK (basesink);
|
||||||
if (basesink->clock_id) {
|
if (basesink->clock_id) {
|
||||||
|
@ -847,9 +848,8 @@ gst_basesink_deactivate (GstBaseSink * basesink, GstPad * pad)
|
||||||
bclass->unlock (basesink);
|
bclass->unlock (basesink);
|
||||||
|
|
||||||
/* flush out the data thread if it's locked in finish_preroll */
|
/* flush out the data thread if it's locked in finish_preroll */
|
||||||
gst_basesink_preroll_queue_flush (basesink);
|
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
GST_PREROLL_SIGNAL (pad);
|
gst_basesink_preroll_queue_flush (basesink, pad);
|
||||||
GST_PREROLL_UNLOCK (pad);
|
GST_PREROLL_UNLOCK (pad);
|
||||||
|
|
||||||
/* step 2, make sure streaming finishes */
|
/* step 2, make sure streaming finishes */
|
||||||
|
|
|
@ -408,7 +408,7 @@ gst_basesink_preroll_queue_empty (GstBaseSink * basesink, GstPad * pad)
|
||||||
|
|
||||||
/* with PREROLL_LOCK */
|
/* with PREROLL_LOCK */
|
||||||
static void
|
static void
|
||||||
gst_basesink_preroll_queue_flush (GstBaseSink * basesink)
|
gst_basesink_preroll_queue_flush (GstBaseSink * basesink, GstPad * pad)
|
||||||
{
|
{
|
||||||
GstMiniObject *obj;
|
GstMiniObject *obj;
|
||||||
GQueue *q = basesink->preroll_queue;
|
GQueue *q = basesink->preroll_queue;
|
||||||
|
@ -422,6 +422,8 @@ gst_basesink_preroll_queue_flush (GstBaseSink * basesink)
|
||||||
}
|
}
|
||||||
/* we can't have EOS anymore now */
|
/* we can't have EOS anymore now */
|
||||||
basesink->eos = FALSE;
|
basesink->eos = FALSE;
|
||||||
|
/* and signal any waiters now */
|
||||||
|
GST_PREROLL_SIGNAL (pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* with STREAM_LOCK */
|
/* with STREAM_LOCK */
|
||||||
|
@ -587,9 +589,8 @@ gst_basesink_event (GstPad * pad, GstEvent * event)
|
||||||
GST_PREROLL_LOCK (pad);
|
GST_PREROLL_LOCK (pad);
|
||||||
/* we need preroll after the flush */
|
/* we need preroll after the flush */
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
gst_basesink_preroll_queue_flush (basesink);
|
|
||||||
/* unlock from a possible state change/preroll */
|
/* unlock from a possible state change/preroll */
|
||||||
GST_PREROLL_SIGNAL (pad);
|
gst_basesink_preroll_queue_flush (basesink, pad);
|
||||||
|
|
||||||
GST_LOCK (basesink);
|
GST_LOCK (basesink);
|
||||||
if (basesink->clock_id) {
|
if (basesink->clock_id) {
|
||||||
|
@ -847,9 +848,8 @@ gst_basesink_deactivate (GstBaseSink * basesink, GstPad * pad)
|
||||||
bclass->unlock (basesink);
|
bclass->unlock (basesink);
|
||||||
|
|
||||||
/* flush out the data thread if it's locked in finish_preroll */
|
/* flush out the data thread if it's locked in finish_preroll */
|
||||||
gst_basesink_preroll_queue_flush (basesink);
|
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
GST_PREROLL_SIGNAL (pad);
|
gst_basesink_preroll_queue_flush (basesink, pad);
|
||||||
GST_PREROLL_UNLOCK (pad);
|
GST_PREROLL_UNLOCK (pad);
|
||||||
|
|
||||||
/* step 2, make sure streaming finishes */
|
/* step 2, make sure streaming finishes */
|
||||||
|
|
Loading…
Reference in a new issue