/* as long as we don't have flow returns for event functions we need
* to post an error here, or the application might never know that
* things failed */
- if (res != GST_FLOW_OK && res != GST_FLOW_WRONG_STATE) {
+ if (res != GST_FLOW_OK && res != GST_FLOW_FLUSHING) {
GST_ELEMENT_ERROR (pixbuf, STREAM, FAILED, (NULL),
("Flow: %s", gst_flow_get_name (res)));
}
GST_DEBUG_OBJECT (dec, "failed to alloc buffer, reason %s", reason);
/* Reset for next time */
jpeg_abort_decompress (&dec->cinfo);
- if (ret != GST_FLOW_EOS && ret != GST_FLOW_WRONG_STATE &&
+ if (ret != GST_FLOW_EOS && ret != GST_FLOW_FLUSHING &&
ret != GST_FLOW_NOT_LINKED) {
gst_jpeg_dec_set_error (dec, GST_FUNCTION, __LINE__,
"Buffer allocation failed, reason: %s", reason);
not_configured:
{
GST_LOG_OBJECT (pngdec, "we are not configured yet");
- ret = GST_FLOW_WRONG_STATE;
+ ret = GST_FLOW_FLUSHING;
goto beach;
}
}
told_to_stop:
{
GST_DEBUG_OBJECT (dv1394src, "told to stop, shutting down");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
told_to_stop:
{
GST_DEBUG_OBJECT (dv1394src, "told to stop, shutting down");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
} else if ((enc->srcpad_last_return == GST_FLOW_NOT_LINKED) &&
(enc->wvcsrcpad_last_return == GST_FLOW_NOT_LINKED)) {
ret = GST_FLOW_NOT_LINKED;
- } else if ((enc->srcpad_last_return == GST_FLOW_WRONG_STATE) &&
- (enc->wvcsrcpad_last_return == GST_FLOW_WRONG_STATE)) {
- ret = GST_FLOW_WRONG_STATE;
+ } else if ((enc->srcpad_last_return == GST_FLOW_FLUSHING) &&
+ (enc->wvcsrcpad_last_return == GST_FLOW_FLUSHING)) {
+ ret = GST_FLOW_FLUSHING;
} else {
GST_ELEMENT_ERROR (enc, LIBRARY, ENCODE, (NULL),
("encoding samples failed"));
gst_object_sync_values (GST_OBJECT (filter), timestamp);
if (G_UNLIKELY (filter->planetable == NULL))
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
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;
goto beach;
}
GST_PAD_STREAM_LOCK (self->srcpad);
ret = gst_pad_alloc_buffer (self->srcpad, offset, size, caps, buf);
- seeking = ret == GST_FLOW_WRONG_STATE
- && g_atomic_int_get (&self->seeking);
+ seeking = ret == GST_FLOW_FLUSHING && g_atomic_int_get (&self->seeking);
GST_PAD_STREAM_UNLOCK (self->srcpad);
} while (seeking);
flow_failed:
{
/* maybe upstream temporarily flushing */
- if (ret != GST_FLOW_WRONG_STATE) {
+ if (ret != GST_FLOW_FLUSHING) {
GST_DEBUG_OBJECT (qtdemux, "no next moof");
offset = 0;
} else {
GST_DEBUG_OBJECT (src, "I/O operation cancelled from another thread");
g_error_free (err);
gst_buffer_unref (buf);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
GstRgAnalysis *filter = GST_RG_ANALYSIS (base);
GstMapInfo map;
- g_return_val_if_fail (filter->ctx != NULL, GST_FLOW_WRONG_STATE);
+ g_return_val_if_fail (filter->ctx != NULL, GST_FLOW_FLUSHING);
g_return_val_if_fail (filter->analyze != NULL, GST_FLOW_NOT_NEGOTIATED);
if (filter->skip)
JBUF_LOCK (priv);
/* mark ourselves as flushing */
- priv->srcresult = GST_FLOW_WRONG_STATE;
+ priv->srcresult = GST_FLOW_FLUSHING;
GST_DEBUG_OBJECT (jitterbuffer, "Disabling pop on queue");
/* this unblocks any waiting pops on the src pad task */
JBUF_SIGNAL (priv);
/*
* Must be called with JBUF_LOCK held, will release the LOCK when emiting the
* signal. The function returns GST_FLOW_ERROR when a parsing error happened and
- * GST_FLOW_WRONG_STATE when the element is shutting down. On success
+ * GST_FLOW_FLUSHING when the element is shutting down. On success
* GST_FLOW_OK is returned.
*/
static GstFlowReturn
out_flushing:
{
GST_DEBUG_OBJECT (jitterbuffer, "we are flushing");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
parse_failed:
{
if (G_UNLIKELY (priv->clock_rate == -1)) {
/* no clock rate given on the caps, try to get one with the signal */
if (gst_rtp_jitter_buffer_get_clock_rate (jitterbuffer,
- pt) == GST_FLOW_WRONG_STATE)
+ pt) == GST_FLOW_FLUSHING)
goto out_flushing;
if (G_UNLIKELY (priv->clock_rate == -1))
gst_rtsp_message_unset (&message);
GST_DEBUG_OBJECT (src, "got interrupted: stop connection flush");
gst_rtspsrc_connection_flush (src, FALSE);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
receive_error:
{
gst_rtsp_message_unset (&message);
GST_DEBUG_OBJECT (src, "got interrupted: stop connection flush");
gst_rtspsrc_connection_flush (src, FALSE);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
connect_error:
{
g_free (str);
ret = GST_FLOW_ERROR;
} else {
- ret = GST_FLOW_WRONG_STATE;
+ ret = GST_FLOW_FLUSHING;
}
return ret;
}
g_free (str);
ret = GST_FLOW_ERROR;
} else {
- ret = GST_FLOW_WRONG_STATE;
+ ret = GST_FLOW_FLUSHING;
}
return ret;
}
no_connection:
{
GST_WARNING_OBJECT (src, "we are not connected");
- ret = GST_FLOW_WRONG_STATE;
+ ret = GST_FLOW_FLUSHING;
goto pause;
}
pause:
{
GST_DEBUG_OBJECT (self, "Shutting down");
gst_buffer_unref (buffer);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
qos:
{
stopped:
{
GST_DEBUG ("stop called");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
get_available_error:
{
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_BUSY) ||
g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_clear_error (&err);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
} else {
GST_ELEMENT_ERROR (udpsrc, RESOURCE, READ, (NULL),
("receive error %d: %s", ret, err->message));
GstWavEnc *wavenc = GST_WAVENC (parent);
GstFlowReturn flow = GST_FLOW_OK;
- g_return_val_if_fail (wavenc->channels > 0, GST_FLOW_WRONG_STATE);
+ g_return_val_if_fail (wavenc->channels > 0, GST_FLOW_FLUSHING);
if (!wavenc->sent_header) {
/* use bogus size initially, we'll write the real
stopped:
{
GST_DEBUG ("stop called");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
select_error:
{
flushing:
{
GST_DEBUG_OBJECT (pool, "We are flushing");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
no_buffer_pool:
{
GST_DEBUG_OBJECT (v4l2object->element, "no buffer pool");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
poll_error:
{
if (ret == GST_CLOCK_UNSCHEDULED) {
/* Got woken up by the unlock function */
GST_OBJECT_UNLOCK (s);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
/* Duration is a complete 1/fps frame duration */
dur = gst_util_uint64_scale_int (GST_SECOND, s->fps_d, s->fps_n);