mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
plugins/multiqueue: Use new GstDataQueue constructor
This commit is contained in:
parent
ea9b0cedcd
commit
7c6d555848
1 changed files with 4 additions and 8 deletions
|
@ -1428,8 +1428,10 @@ gst_single_queue_new (GstMultiQueue * mqueue)
|
||||||
|
|
||||||
sq->mqueue = mqueue;
|
sq->mqueue = mqueue;
|
||||||
sq->srcresult = GST_FLOW_WRONG_STATE;
|
sq->srcresult = GST_FLOW_WRONG_STATE;
|
||||||
sq->queue = gst_data_queue_new ((GstDataQueueCheckFullFunction)
|
sq->queue = gst_data_queue_new_full ((GstDataQueueCheckFullFunction)
|
||||||
single_queue_check_full, sq);
|
single_queue_check_full,
|
||||||
|
(GstDataQueueFullCallback) single_queue_overrun_cb,
|
||||||
|
(GstDataQueueEmptyCallback) single_queue_underrun_cb, sq);
|
||||||
sq->is_eos = FALSE;
|
sq->is_eos = FALSE;
|
||||||
gst_segment_init (&sq->sink_segment, GST_FORMAT_TIME);
|
gst_segment_init (&sq->sink_segment, GST_FORMAT_TIME);
|
||||||
gst_segment_init (&sq->src_segment, GST_FORMAT_TIME);
|
gst_segment_init (&sq->src_segment, GST_FORMAT_TIME);
|
||||||
|
@ -1438,12 +1440,6 @@ gst_single_queue_new (GstMultiQueue * mqueue)
|
||||||
sq->oldid = 0;
|
sq->oldid = 0;
|
||||||
sq->turn = g_cond_new ();
|
sq->turn = g_cond_new ();
|
||||||
|
|
||||||
/* attach to underrun/overrun signals to handle non-starvation */
|
|
||||||
g_signal_connect (sq->queue, "full",
|
|
||||||
G_CALLBACK (single_queue_overrun_cb), sq);
|
|
||||||
g_signal_connect (sq->queue, "empty",
|
|
||||||
G_CALLBACK (single_queue_underrun_cb), sq);
|
|
||||||
|
|
||||||
tmp = g_strdup_printf ("sink%d", sq->id);
|
tmp = g_strdup_printf ("sink%d", sq->id);
|
||||||
sq->sinkpad = gst_pad_new_from_static_template (&sinktemplate, tmp);
|
sq->sinkpad = gst_pad_new_from_static_template (&sinktemplate, tmp);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
|
|
Loading…
Reference in a new issue