mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING
This commit is contained in:
parent
3de090c1f0
commit
de1f89bf07
35 changed files with 65 additions and 65 deletions
|
@ -1053,7 +1053,7 @@ gst_ass_render_chain_text (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
|
||||
if (render->subtitle_flushing) {
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||
|
@ -1106,7 +1106,7 @@ gst_ass_render_chain_text (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
GST_DEBUG_OBJECT (render, "Text pad flushing");
|
||||
gst_buffer_unref (buffer);
|
||||
g_mutex_unlock (&render->subtitle_mutex);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
GST_DEBUG_OBJECT (render,
|
||||
"Too early text buffer, waiting (%" GST_TIME_FORMAT " > %"
|
||||
|
|
|
@ -185,7 +185,7 @@ decode_failed:
|
|||
not_ready:
|
||||
{
|
||||
GST_ELEMENT_ERROR (b, LIBRARY, FAILED, (NULL), ("Decompressor not ready."));
|
||||
flow = GST_FLOW_WRONG_STATE;
|
||||
flow = GST_FLOW_FLUSHING;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ done:
|
|||
not_ready:
|
||||
{
|
||||
GST_ELEMENT_ERROR (b, LIBRARY, FAILED, (NULL), ("Compressor not ready."));
|
||||
flow = GST_FLOW_WRONG_STATE;
|
||||
flow = GST_FLOW_FLUSHING;
|
||||
goto done;
|
||||
}
|
||||
compress_error:
|
||||
|
|
|
@ -338,7 +338,7 @@ gst_mse_chain_ref (GstPad * pad, GstBuffer * buffer)
|
|||
if (fs->cancel) {
|
||||
g_mutex_unlock (fs->lock);
|
||||
gst_object_unref (fs);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ gst_mse_chain_test (GstPad * pad, GstBuffer * buffer)
|
|||
if (fs->cancel) {
|
||||
g_mutex_unlock (fs->lock);
|
||||
gst_object_unref (fs);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -824,7 +824,7 @@ gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf)
|
|||
GST_KATE_TIGER_MUTEX_UNLOCK (tiger);
|
||||
gst_object_unref (tiger);
|
||||
gst_buffer_unref (buf);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
if (G_LIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (buf))) {
|
||||
|
|
|
@ -646,7 +646,7 @@ gst_mpeg2enc_src_activate_mode (GstPad * pad, GstObject * parent,
|
|||
/* can only end the encoding loop by forcing eos */
|
||||
GST_MPEG2ENC_MUTEX_LOCK (enc);
|
||||
enc->eos = TRUE;
|
||||
enc->srcresult = GST_FLOW_WRONG_STATE;
|
||||
enc->srcresult = GST_FLOW_FLUSHING;
|
||||
GST_MPEG2ENC_SIGNAL (enc);
|
||||
GST_MPEG2ENC_MUTEX_UNLOCK (enc);
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ gst_mplex_sink_event (GstPad * sinkpad, GstObject * parent, GstEvent * event)
|
|||
|
||||
/* now unblock the chain function */
|
||||
GST_MPLEX_MUTEX_LOCK (mplex);
|
||||
mplex->srcresult = GST_FLOW_WRONG_STATE;
|
||||
mplex->srcresult = GST_FLOW_FLUSHING;
|
||||
GST_MPLEX_SIGNAL (mplex, mpad);
|
||||
GST_MPLEX_MUTEX_UNLOCK (mplex);
|
||||
/* no way to pause/restart loop task */
|
||||
|
@ -709,7 +709,7 @@ gst_mplex_src_activate_mode (GstPad * pad, GstObject * parent,
|
|||
/* end the muxing loop by forcing eos and unblock chains */
|
||||
GST_MPLEX_MUTEX_LOCK (mplex);
|
||||
mplex->eos = TRUE;
|
||||
mplex->srcresult = GST_FLOW_WRONG_STATE;
|
||||
mplex->srcresult = GST_FLOW_FLUSHING;
|
||||
GST_MPLEX_SIGNAL_ALL (mplex);
|
||||
GST_MPLEX_MUTEX_UNLOCK (mplex);
|
||||
|
||||
|
|
|
@ -1159,7 +1159,7 @@ internal_error:
|
|||
branching:
|
||||
{
|
||||
g_mutex_unlock (src->branch_lock);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -739,7 +739,7 @@ gst_teletextdec_chain (GstPad * pad, GstBuffer * buf)
|
|||
error:
|
||||
{
|
||||
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED
|
||||
&& ret != GST_FLOW_WRONG_STATE) {
|
||||
&& ret != GST_FLOW_FLUSHING) {
|
||||
GST_ELEMENT_ERROR (teletext, STREAM, FAILED,
|
||||
("Internal data stream error."), ("stream stopped, reason %s",
|
||||
gst_flow_get_name (ret)));
|
||||
|
|
|
@ -778,7 +778,7 @@ flushing:
|
|||
{
|
||||
GST_DEBUG_OBJECT (ringbuffer, "ringbuffer is flushing");
|
||||
GST_OBJECT_UNLOCK (ringbuffer);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -944,7 +944,7 @@ flushing:
|
|||
GST_DEBUG_OBJECT (ringbuffer, "we are flushing");
|
||||
GST_OBJECT_UNLOCK (ringbuffer);
|
||||
gst_object_unref (ringbuffer);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
wrong_size:
|
||||
{
|
||||
|
|
|
@ -675,7 +675,7 @@ flushing:
|
|||
GST_DEBUG_OBJECT (pad, "We are flushing, discard buffer %p", buf);
|
||||
GST_INPUT_SELECTOR_UNLOCK (sel);
|
||||
gst_buffer_unref (buf);
|
||||
res = GST_FLOW_WRONG_STATE;
|
||||
res = GST_FLOW_FLUSHING;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -798,7 +798,7 @@ paused:
|
|||
dtmfsrc->last_event = NULL;
|
||||
}
|
||||
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -844,7 +844,7 @@ paused:
|
|||
dtmfsrc->redundancy_count = dtmfsrc->packet_redundancy;
|
||||
goto send_last;
|
||||
} else {
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
no_clock:
|
||||
|
|
|
@ -239,7 +239,7 @@ gst_freeze_play (GstPad * pad, GstBuffer * buff)
|
|||
|
||||
if (freeze->on_flush) {
|
||||
g_object_unref (freeze);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
/* If it is working in push mode this function will be called by "_chain"
|
||||
|
|
|
@ -425,7 +425,7 @@ gst_live_adder_flush_start (GstLiveAdder * adder)
|
|||
|
||||
GST_OBJECT_LOCK (adder);
|
||||
/* mark ourselves as flushing */
|
||||
adder->srcresult = GST_FLOW_WRONG_STATE;
|
||||
adder->srcresult = GST_FLOW_FLUSHING;
|
||||
|
||||
/* Empty the queue */
|
||||
g_queue_foreach (adder->buffers, (GFunc) gst_mini_object_unref, NULL);
|
||||
|
|
|
@ -2738,7 +2738,7 @@ gst_flups_demux_loop (GstPad * pad)
|
|||
demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad));
|
||||
|
||||
if (G_UNLIKELY (demux->flushing)) {
|
||||
ret = GST_FLOW_WRONG_STATE;
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
goto pause;
|
||||
}
|
||||
|
||||
|
@ -3013,7 +3013,7 @@ gst_flups_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
while (gst_flups_demux_resync (demux, save)) {
|
||||
gboolean ps_sync = TRUE;
|
||||
if (G_UNLIKELY (demux->flushing)) {
|
||||
ret = GST_FLOW_WRONG_STATE;
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -2481,7 +2481,7 @@ gst_multi_fd_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
sink = GST_MULTI_FD_SINK (bsink);
|
||||
|
||||
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_MULTI_FD_SINK_OPEN),
|
||||
GST_FLOW_WRONG_STATE);
|
||||
GST_FLOW_FLUSHING);
|
||||
|
||||
#if 0
|
||||
/* since we check every buffer for streamheader caps, we need to make
|
||||
|
|
|
@ -611,11 +611,11 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux)
|
|||
|
||||
for (i = 0; i < demux->preface->content_storage->n_packages; i++) {
|
||||
if (demux->preface->content_storage->packages[i] &&
|
||||
MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->
|
||||
content_storage->packages[i])) {
|
||||
MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->content_storage->
|
||||
packages[i])) {
|
||||
ret =
|
||||
MXF_METADATA_GENERIC_PACKAGE (demux->preface->
|
||||
content_storage->packages[i]);
|
||||
MXF_METADATA_GENERIC_PACKAGE (demux->preface->content_storage->
|
||||
packages[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -775,8 +775,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
|
|||
essence_container);
|
||||
|
||||
if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) {
|
||||
if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->
|
||||
parent.descriptor[0]))
|
||||
if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent.
|
||||
descriptor[0]))
|
||||
mxf_ul_to_string (&MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR
|
||||
(track->parent.descriptor[0])->picture_essence_coding,
|
||||
essence_compression);
|
||||
|
@ -785,8 +785,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
|
|||
g_strdup_printf ("video/x-mxf-%s-%s", essence_container,
|
||||
essence_compression);
|
||||
} else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) {
|
||||
if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->
|
||||
parent.descriptor[0]))
|
||||
if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.
|
||||
descriptor[0]))
|
||||
mxf_ul_to_string (&MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR
|
||||
(track->parent.descriptor[0])->sound_essence_compression,
|
||||
essence_compression);
|
||||
|
@ -795,8 +795,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
|
|||
g_strdup_printf ("audio/x-mxf-%s-%s", essence_container,
|
||||
essence_compression);
|
||||
} else if (track->parent.type == MXF_METADATA_TRACK_DATA_ESSENCE) {
|
||||
if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->
|
||||
parent.descriptor[0]))
|
||||
if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent.
|
||||
descriptor[0]))
|
||||
mxf_ul_to_string (&MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR
|
||||
(track->parent.descriptor[0])->data_essence_coding,
|
||||
essence_compression);
|
||||
|
@ -1421,8 +1421,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
|
|||
pad->current_component_index);
|
||||
|
||||
pad->current_component =
|
||||
MXF_METADATA_SOURCE_CLIP (sequence->
|
||||
structural_components[pad->current_component_index]);
|
||||
MXF_METADATA_SOURCE_CLIP (sequence->structural_components[pad->
|
||||
current_component_index]);
|
||||
if (pad->current_component == NULL) {
|
||||
GST_ERROR_OBJECT (demux, "No such structural component");
|
||||
return GST_FLOW_ERROR;
|
||||
|
@ -1430,8 +1430,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
|
|||
|
||||
if (!pad->current_component->source_package
|
||||
|| !pad->current_component->source_package->top_level
|
||||
|| !MXF_METADATA_GENERIC_PACKAGE (pad->
|
||||
current_component->source_package)->tracks) {
|
||||
|| !MXF_METADATA_GENERIC_PACKAGE (pad->current_component->
|
||||
source_package)->tracks) {
|
||||
GST_ERROR_OBJECT (demux, "Invalid component");
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
@ -2849,7 +2849,7 @@ gst_mxf_demux_chain (GstPad * pad, GstBuffer * inbuf)
|
|||
while (ret == GST_FLOW_OK) {
|
||||
if (G_UNLIKELY (demux->flushing)) {
|
||||
GST_DEBUG_OBJECT (demux, "we are now flushing, exiting parser loop");
|
||||
ret = GST_FLOW_WRONG_STATE;
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2998,8 +2998,8 @@ gst_mxf_demux_pad_set_last_stop (GstMXFDemux * demux, GstMXFDemuxPad * p,
|
|||
for (i = 0; i < p->material_track->parent.sequence->n_structural_components;
|
||||
i++) {
|
||||
clip =
|
||||
MXF_METADATA_SOURCE_CLIP (p->material_track->parent.
|
||||
sequence->structural_components[i]);
|
||||
MXF_METADATA_SOURCE_CLIP (p->material_track->parent.sequence->
|
||||
structural_components[i]);
|
||||
|
||||
if (clip->parent.duration <= 0)
|
||||
break;
|
||||
|
@ -3077,8 +3077,8 @@ gst_mxf_demux_seek_push (GstMXFDemux * demux, GstEvent * event)
|
|||
if (format != GST_FORMAT_TIME)
|
||||
goto wrong_format;
|
||||
|
||||
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
|
||||
keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
|
||||
keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||
|
||||
/* Work on a copy until we are sure the seek succeeded. */
|
||||
memcpy (&seeksegment, &demux->segment, sizeof (GstSegment));
|
||||
|
@ -3210,8 +3210,8 @@ gst_mxf_demux_seek_pull (GstMXFDemux * demux, GstEvent * event)
|
|||
if (rate <= 0.0)
|
||||
goto wrong_rate;
|
||||
|
||||
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
|
||||
keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
|
||||
keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||
|
||||
if (flush) {
|
||||
GstEvent *e;
|
||||
|
|
|
@ -773,7 +773,7 @@ gst_nuv_demux_read_bytes (GstNuvDemux * nuv, guint64 size, gboolean move,
|
|||
/* got eos */
|
||||
} else if (ret == GST_FLOW_UNEXPECTED) {
|
||||
gst_nuv_demux_send_eos (nuv);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
} else {
|
||||
if (gst_adapter_available (nuv->adapter) < size)
|
||||
|
|
|
@ -432,7 +432,7 @@ found_eos:
|
|||
{
|
||||
GST_DEBUG ("found EOS");
|
||||
gst_pad_push_event (ttaparse->srcpad, gst_event_new_eos ());
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
pull_error:
|
||||
{
|
||||
|
|
|
@ -421,7 +421,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
|||
[bufQueueLock lockWhenCondition:HAS_BUFFER_OR_STOP_REQUEST];
|
||||
if (stopRequest) {
|
||||
[bufQueueLock unlock];
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
sbuf = (CMSampleBufferRef) [bufQueue lastObject];
|
||||
|
|
|
@ -470,7 +470,7 @@ gst_cel_video_src_create (GstPushSrc * pushsrc, GstBuffer ** buf)
|
|||
shutting_down:
|
||||
{
|
||||
cm->FigSampleBufferRelease (sbuf);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ shutting_down:
|
|||
*buf = NULL;
|
||||
}
|
||||
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
unexpected_format:
|
||||
{
|
||||
|
|
|
@ -434,7 +434,7 @@ openFailed:
|
|||
[queueLock lockWhenCondition:HAS_FRAME_OR_STOP_REQUEST];
|
||||
if (stopRequest) {
|
||||
[queueLock unlock];
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
frame = (CVPixelBufferRef) [queue lastObject];
|
||||
|
|
|
@ -391,7 +391,7 @@ gst_avc_src_create (GstBaseSrc * src, guint64 offset, guint size,
|
|||
if (avcsrc->unlock) {
|
||||
if (buffer)
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
gst_buffer_set_caps (buffer, GST_PAD_CAPS (avcsrc->srcpad));
|
||||
|
|
|
@ -1710,7 +1710,7 @@ success:
|
|||
GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return GST_FLOW_OK;
|
||||
wrong_state:
|
||||
GST_D3DVIDEOSINK_SWAP_CHAIN_UNLOCK (sink);
|
||||
GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return GST_FLOW_WRONG_STATE;
|
||||
GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return GST_FLOW_FLUSHING;
|
||||
/*unexpected:*/
|
||||
/* GST_D3DVIDEOSINK_SWAP_CHAIN_UNLOCK(sink); */
|
||||
/* GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK */
|
||||
|
|
|
@ -741,7 +741,7 @@ gst_decklink_sink_videosink_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
ret = GST_FLOW_OK;
|
||||
} else {
|
||||
ret = GST_FLOW_WRONG_STATE;
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
frame->Release ();
|
||||
|
|
|
@ -579,7 +579,7 @@ gst_dshowaudiodec_chain (GstPad * pad, GstBuffer * buffer)
|
|||
if (!adec->setup) {
|
||||
/* we are not set up */
|
||||
GST_WARNING_OBJECT (adec, "Decoder not set up, failing");
|
||||
adec->last_ret = GST_FLOW_WRONG_STATE;
|
||||
adec->last_ret = GST_FLOW_FLUSHING;
|
||||
goto beach;
|
||||
}
|
||||
|
||||
|
|
|
@ -853,7 +853,7 @@ gst_dshowvideodec_chain (GstPad * pad, GstBuffer * buffer)
|
|||
if (!vdec->setup) {
|
||||
/* we are not setup */
|
||||
GST_WARNING_OBJECT (vdec, "Decoder not set up, failing");
|
||||
vdec->last_ret = GST_FLOW_WRONG_STATE;
|
||||
vdec->last_ret = GST_FLOW_FLUSHING;
|
||||
goto beach;
|
||||
}
|
||||
|
||||
|
|
|
@ -868,7 +868,7 @@ gst_dshowvideosrc_create (GstPushSrc * psrc, GstBuffer ** buf)
|
|||
gst_buffer_unref (*buf);
|
||||
*buf = NULL;
|
||||
}
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
GST_DEBUG ("dshowvideosrc_create => pts %" GST_TIME_FORMAT " duration %"
|
||||
|
|
|
@ -1675,13 +1675,13 @@ gst_dshowvideosink_show_frame (GstVideoSink *vsink, GstBuffer *buffer)
|
|||
if (!sink->graph_running){
|
||||
retst = gst_dshowvideosink_start_graph(sink);
|
||||
if (retst == GST_STATE_CHANGE_FAILURE)
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
ret = sink->fakesrc->GetOutputPin()->PushBuffer (buffer);
|
||||
if (!sink->graph_running){
|
||||
retst = gst_dshowvideosink_pause_graph(sink);
|
||||
if (retst == GST_STATE_CHANGE_FAILURE)
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
GST_DSHOWVIDEOSINK_GRAPH_UNLOCK(sink);
|
||||
GST_DEBUG_OBJECT (sink, "Done pushing buffer through fakesrc->renderer: %s", gst_flow_get_name(ret));
|
||||
|
|
|
@ -415,7 +415,7 @@ gst_linsys_sdi_src_create (GstBaseSrc * src, guint64 _offset, guint size,
|
|||
guint8 *data = linsyssdisrc->tmpdata;
|
||||
|
||||
if (linsyssdisrc->fd < 0)
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
|
||||
if (linsyssdisrc->is_625) {
|
||||
sdi_width = 864;
|
||||
|
|
|
@ -404,7 +404,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self));
|
||||
if (self->unlock) {
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self));
|
||||
if (self->unlock) {
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,7 +427,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self));
|
||||
if (self->unlock) {
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
while (self->wait_for_connection && !self->clients) {
|
||||
|
@ -435,7 +435,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
if (self->unlock) {
|
||||
sp_writer_free_block (block);
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -306,14 +306,14 @@ gst_shm_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
|||
do {
|
||||
if (gst_poll_wait (self->poll, GST_CLOCK_TIME_NONE) < 0) {
|
||||
if (errno == EBUSY)
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
GST_ELEMENT_ERROR (self, RESOURCE, READ, ("Failed to read from shmsrc"),
|
||||
("Poll failed on fd: %s", strerror (errno)));
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
if (self->unlocked)
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
|
||||
if (gst_poll_fd_has_closed (self->poll, &self->pollfd)) {
|
||||
GST_ELEMENT_ERROR (self, RESOURCE, READ, ("Failed to read from shmsrc"),
|
||||
|
|
|
@ -1146,7 +1146,7 @@ error_cancel:
|
|||
if (error_str != NULL)
|
||||
*error_str = NULL;
|
||||
|
||||
return GST_FLOW_WRONG_STATE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
error_get_result:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue