mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
update for task api change
This commit is contained in:
parent
dc04908412
commit
30d3dfee36
11 changed files with 19 additions and 19 deletions
|
@ -1046,7 +1046,7 @@ gst_dvdemux_handle_pull_seek (GstDVDemux * demux, GstPad * pad,
|
||||||
/* and restart the task in case it got paused explicitely or by
|
/* and restart the task in case it got paused explicitely or by
|
||||||
* the FLUSH_START event we pushed out. */
|
* the FLUSH_START event we pushed out. */
|
||||||
gst_pad_start_task (demux->sinkpad, (GstTaskFunction) gst_dvdemux_loop,
|
gst_pad_start_task (demux->sinkpad, (GstTaskFunction) gst_dvdemux_loop,
|
||||||
demux->sinkpad);
|
demux->sinkpad, NULL);
|
||||||
|
|
||||||
/* and release the lock again so we can continue streaming */
|
/* and release the lock again so we can continue streaming */
|
||||||
GST_PAD_STREAM_UNLOCK (demux->sinkpad);
|
GST_PAD_STREAM_UNLOCK (demux->sinkpad);
|
||||||
|
@ -1766,7 +1766,7 @@ gst_dvdemux_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
if (active) {
|
if (active) {
|
||||||
demux->seek_handler = gst_dvdemux_handle_pull_seek;
|
demux->seek_handler = gst_dvdemux_handle_pull_seek;
|
||||||
res = gst_pad_start_task (sinkpad,
|
res = gst_pad_start_task (sinkpad,
|
||||||
(GstTaskFunction) gst_dvdemux_loop, sinkpad);
|
(GstTaskFunction) gst_dvdemux_loop, sinkpad, NULL);
|
||||||
} else {
|
} else {
|
||||||
demux->seek_handler = NULL;
|
demux->seek_handler = NULL;
|
||||||
res = gst_pad_stop_task (sinkpad);
|
res = gst_pad_stop_task (sinkpad);
|
||||||
|
|
|
@ -4177,7 +4177,7 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
if (!avi->streaming) {
|
if (!avi->streaming) {
|
||||||
gst_pad_start_task (avi->sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
gst_pad_start_task (avi->sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
||||||
avi->sinkpad);
|
avi->sinkpad, NULL);
|
||||||
}
|
}
|
||||||
/* reset the last flow and mark discont, seek is always DISCONT */
|
/* reset the last flow and mark discont, seek is always DISCONT */
|
||||||
for (i = 0; i < avi->num_streams; i++) {
|
for (i = 0; i < avi->num_streams; i++) {
|
||||||
|
@ -5389,7 +5389,7 @@ gst_avi_demux_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
if (active) {
|
if (active) {
|
||||||
avi->streaming = FALSE;
|
avi->streaming = FALSE;
|
||||||
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
||||||
sinkpad);
|
sinkpad, NULL);
|
||||||
} else {
|
} else {
|
||||||
res = gst_pad_stop_task (sinkpad);
|
res = gst_pad_stop_task (sinkpad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,7 @@ gst_rnd_buffer_size_activate_mode (GstPad * pad, GstObject * parent,
|
||||||
GST_INFO_OBJECT (self, "starting pull");
|
GST_INFO_OBJECT (self, "starting pull");
|
||||||
res =
|
res =
|
||||||
gst_pad_start_task (pad, (GstTaskFunction) gst_rnd_buffer_size_loop,
|
gst_pad_start_task (pad, (GstTaskFunction) gst_rnd_buffer_size_loop,
|
||||||
self);
|
self, NULL);
|
||||||
self->need_newsegment = TRUE;
|
self->need_newsegment = TRUE;
|
||||||
} else {
|
} else {
|
||||||
GST_INFO_OBJECT (self, "stopping pull");
|
GST_INFO_OBJECT (self, "stopping pull");
|
||||||
|
@ -323,7 +323,7 @@ gst_rnd_buffer_size_src_event (GstPad * pad, GstObject * parent,
|
||||||
self->need_newsegment = TRUE;
|
self->need_newsegment = TRUE;
|
||||||
|
|
||||||
gst_pad_start_task (self->sinkpad, (GstTaskFunction) gst_rnd_buffer_size_loop,
|
gst_pad_start_task (self->sinkpad, (GstTaskFunction) gst_rnd_buffer_size_loop,
|
||||||
self);
|
self, NULL);
|
||||||
|
|
||||||
GST_PAD_STREAM_UNLOCK (self->sinkpad);
|
GST_PAD_STREAM_UNLOCK (self->sinkpad);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -2828,7 +2828,7 @@ exit:
|
||||||
gst_pad_pause_task (demux->sinkpad);
|
gst_pad_pause_task (demux->sinkpad);
|
||||||
} else {
|
} else {
|
||||||
gst_pad_start_task (demux->sinkpad,
|
gst_pad_start_task (demux->sinkpad,
|
||||||
(GstTaskFunction) gst_flv_demux_loop, demux->sinkpad);
|
(GstTaskFunction) gst_flv_demux_loop, demux->sinkpad, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PAD_STREAM_UNLOCK (demux->sinkpad);
|
GST_PAD_STREAM_UNLOCK (demux->sinkpad);
|
||||||
|
@ -2893,7 +2893,7 @@ gst_flv_demux_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
if (active) {
|
if (active) {
|
||||||
demux->random_access = TRUE;
|
demux->random_access = TRUE;
|
||||||
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_flv_demux_loop,
|
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_flv_demux_loop,
|
||||||
sinkpad);
|
sinkpad, NULL);
|
||||||
} else {
|
} else {
|
||||||
demux->random_access = FALSE;
|
demux->random_access = FALSE;
|
||||||
res = gst_pad_stop_task (sinkpad);
|
res = gst_pad_stop_task (sinkpad);
|
||||||
|
|
|
@ -649,7 +649,7 @@ gst_image_freeze_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
|
|
||||||
if (self->buffer != NULL)
|
if (self->buffer != NULL)
|
||||||
gst_pad_start_task (self->srcpad,
|
gst_pad_start_task (self->srcpad,
|
||||||
(GstTaskFunction) gst_image_freeze_src_loop, self->srcpad);
|
(GstTaskFunction) gst_image_freeze_src_loop, self->srcpad, NULL);
|
||||||
|
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
}
|
}
|
||||||
|
@ -685,7 +685,7 @@ gst_image_freeze_sink_chain (GstPad * pad, GstObject * parent,
|
||||||
self->buffer = buffer;
|
self->buffer = buffer;
|
||||||
|
|
||||||
gst_pad_start_task (self->srcpad, (GstTaskFunction) gst_image_freeze_src_loop,
|
gst_pad_start_task (self->srcpad, (GstTaskFunction) gst_image_freeze_src_loop,
|
||||||
self->srcpad);
|
self->srcpad, NULL);
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,7 +343,7 @@ gst_qt_moov_recover_change_state (GstElement * element,
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
qtmr->task = gst_task_new (gst_qt_moov_recover_run, qtmr);
|
qtmr->task = gst_task_new (gst_qt_moov_recover_run, qtmr, NULL);
|
||||||
g_rec_mutex_init (&qtmr->task_mutex);
|
g_rec_mutex_init (&qtmr->task_mutex);
|
||||||
gst_task_set_lock (qtmr->task, &qtmr->task_mutex);
|
gst_task_set_lock (qtmr->task, &qtmr->task_mutex);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1419,7 +1419,7 @@ gst_qtdemux_do_seek (GstQTDemux * qtdemux, GstPad * pad, GstEvent * event)
|
||||||
qtdemux->streams[i]->last_ret = GST_FLOW_OK;
|
qtdemux->streams[i]->last_ret = GST_FLOW_OK;
|
||||||
|
|
||||||
gst_pad_start_task (qtdemux->sinkpad, (GstTaskFunction) gst_qtdemux_loop,
|
gst_pad_start_task (qtdemux->sinkpad, (GstTaskFunction) gst_qtdemux_loop,
|
||||||
qtdemux->sinkpad);
|
qtdemux->sinkpad, NULL);
|
||||||
|
|
||||||
GST_PAD_STREAM_UNLOCK (qtdemux->sinkpad);
|
GST_PAD_STREAM_UNLOCK (qtdemux->sinkpad);
|
||||||
|
|
||||||
|
@ -4490,7 +4490,7 @@ qtdemux_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
if (active) {
|
if (active) {
|
||||||
demux->pullbased = TRUE;
|
demux->pullbased = TRUE;
|
||||||
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_qtdemux_loop,
|
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_qtdemux_loop,
|
||||||
sinkpad);
|
sinkpad, NULL);
|
||||||
} else {
|
} else {
|
||||||
res = gst_pad_stop_task (sinkpad);
|
res = gst_pad_stop_task (sinkpad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2111,7 +2111,7 @@ exit:
|
||||||
/* restart our task since it might have been stopped when we did the
|
/* restart our task since it might have been stopped when we did the
|
||||||
* flush. */
|
* flush. */
|
||||||
gst_pad_start_task (demux->common.sinkpad,
|
gst_pad_start_task (demux->common.sinkpad,
|
||||||
(GstTaskFunction) gst_matroska_demux_loop, demux->common.sinkpad);
|
(GstTaskFunction) gst_matroska_demux_loop, demux->common.sinkpad, NULL);
|
||||||
|
|
||||||
/* streaming can continue now */
|
/* streaming can continue now */
|
||||||
if (pad_locked) {
|
if (pad_locked) {
|
||||||
|
@ -4821,7 +4821,7 @@ gst_matroska_demux_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
if (active) {
|
if (active) {
|
||||||
/* if we have a scheduler we can start the task */
|
/* if we have a scheduler we can start the task */
|
||||||
gst_pad_start_task (sinkpad, (GstTaskFunction) gst_matroska_demux_loop,
|
gst_pad_start_task (sinkpad, (GstTaskFunction) gst_matroska_demux_loop,
|
||||||
sinkpad);
|
sinkpad, NULL);
|
||||||
} else {
|
} else {
|
||||||
gst_pad_stop_task (sinkpad);
|
gst_pad_stop_task (sinkpad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -904,7 +904,7 @@ gst_rtp_jitter_buffer_src_activate_mode (GstPad * pad, GstObject * parent,
|
||||||
/* start pushing out buffers */
|
/* start pushing out buffers */
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "Starting task on srcpad");
|
GST_DEBUG_OBJECT (jitterbuffer, "Starting task on srcpad");
|
||||||
result = gst_pad_start_task (jitterbuffer->priv->srcpad,
|
result = gst_pad_start_task (jitterbuffer->priv->srcpad,
|
||||||
(GstTaskFunction) gst_rtp_jitter_buffer_loop, jitterbuffer);
|
(GstTaskFunction) gst_rtp_jitter_buffer_loop, jitterbuffer, NULL);
|
||||||
} else {
|
} else {
|
||||||
/* make sure all data processing stops ASAP */
|
/* make sure all data processing stops ASAP */
|
||||||
gst_rtp_jitter_buffer_flush_start (jitterbuffer);
|
gst_rtp_jitter_buffer_flush_start (jitterbuffer);
|
||||||
|
|
|
@ -6494,7 +6494,7 @@ gst_rtspsrc_start (GstRTSPSrc * src)
|
||||||
src->pending_cmd = CMD_WAIT;
|
src->pending_cmd = CMD_WAIT;
|
||||||
|
|
||||||
if (src->task == NULL) {
|
if (src->task == NULL) {
|
||||||
src->task = gst_task_new ((GstTaskFunction) gst_rtspsrc_thread, src);
|
src->task = gst_task_new ((GstTaskFunction) gst_rtspsrc_thread, src, NULL);
|
||||||
if (src->task == NULL)
|
if (src->task == NULL)
|
||||||
goto task_error;
|
goto task_error;
|
||||||
|
|
||||||
|
|
|
@ -963,7 +963,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
|
||||||
/* and start the streaming task again */
|
/* and start the streaming task again */
|
||||||
if (!wav->streaming) {
|
if (!wav->streaming) {
|
||||||
gst_pad_start_task (wav->sinkpad, (GstTaskFunction) gst_wavparse_loop,
|
gst_pad_start_task (wav->sinkpad, (GstTaskFunction) gst_wavparse_loop,
|
||||||
wav->sinkpad);
|
wav->sinkpad, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PAD_STREAM_UNLOCK (wav->sinkpad);
|
GST_PAD_STREAM_UNLOCK (wav->sinkpad);
|
||||||
|
@ -2608,7 +2608,7 @@ gst_wavparse_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
if (active) {
|
if (active) {
|
||||||
/* if we have a scheduler we can start the task */
|
/* if we have a scheduler we can start the task */
|
||||||
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_wavparse_loop,
|
res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_wavparse_loop,
|
||||||
sinkpad);
|
sinkpad, NULL);
|
||||||
} else {
|
} else {
|
||||||
res = gst_pad_stop_task (sinkpad);
|
res = gst_pad_stop_task (sinkpad);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue