GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING

This commit is contained in:
Wim Taymans 2012-02-08 15:17:49 +01:00
parent bd4bf43171
commit a75e9102c5
14 changed files with 27 additions and 27 deletions

View file

@ -1643,7 +1643,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
} else {
/* no pad to pull on, send EOS */
gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ());
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
}

View file

@ -687,7 +687,7 @@ gst_ogm_parse_comment_packet (GstOgmParse * ogm, GstBuffer * buf)
if (ogm->srcpad == NULL) {
GST_DEBUG ("no source pad");
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
/* if this is not a subtitle stream, push the vorbiscomment packet
@ -821,7 +821,7 @@ gst_ogm_parse_data_packet (GstOgmParse * ogm, GstBuffer * buf,
GST_DEBUG_PAD_NAME (ogm->srcpad), gst_flow_get_name (ret));
}
} else {
ret = GST_FLOW_WRONG_STATE;
ret = GST_FLOW_FLUSHING;
}
return ret;

View file

@ -2367,7 +2367,7 @@ gst_base_text_overlay_text_chain (GstPad * pad, GstObject * parent,
if (overlay->text_flushing) {
GST_OBJECT_UNLOCK (overlay);
ret = GST_FLOW_WRONG_STATE;
ret = GST_FLOW_FLUSHING;
GST_LOG_OBJECT (overlay, "text flushing");
goto beach;
}
@ -2413,7 +2413,7 @@ gst_base_text_overlay_text_chain (GstPad * pad, GstObject * parent,
GST_DEBUG ("Pad %s:%s resuming", GST_DEBUG_PAD_NAME (pad));
if (overlay->text_flushing) {
GST_OBJECT_UNLOCK (overlay);
ret = GST_FLOW_WRONG_STATE;
ret = GST_FLOW_FLUSHING;
goto beach;
}
}
@ -2735,7 +2735,7 @@ flushing:
GST_OBJECT_UNLOCK (overlay);
GST_DEBUG_OBJECT (overlay, "flushing, discarding buffer");
gst_buffer_unref (buffer);
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
have_eos:
{

View file

@ -634,7 +634,7 @@ flushing:
{
GST_DEBUG_OBJECT (appsink, "we are flushing");
g_mutex_unlock (priv->mutex);
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
}
@ -745,7 +745,7 @@ flushing:
{
GST_DEBUG_OBJECT (appsink, "we are flushing");
g_mutex_unlock (priv->mutex);
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
stopping:
{

View file

@ -1041,7 +1041,7 @@ flushing:
{
GST_DEBUG_OBJECT (appsrc, "we are flushing");
g_mutex_unlock (priv->mutex);
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
eos:
{
@ -1502,7 +1502,7 @@ flushing:
if (steal_ref)
gst_buffer_unref (buffer);
g_mutex_unlock (priv->mutex);
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
eos:
{
@ -1526,7 +1526,7 @@ eos:
* space becomes available in the queue.
*
* Returns: #GST_FLOW_OK when the buffer was successfuly queued.
* #GST_FLOW_WRONG_STATE when @appsrc is not PAUSED or PLAYING.
* #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING.
* #GST_FLOW_EOS when EOS occured.
*
* Since: 0.10.22
@ -1553,7 +1553,7 @@ gst_app_src_push_buffer_action (GstAppSrc * appsrc, GstBuffer * buffer)
* element is the last buffer of the stream.
*
* Returns: #GST_FLOW_OK when the EOS was successfuly queued.
* #GST_FLOW_WRONG_STATE when @appsrc is not PAUSED or PLAYING.
* #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING.
*
* Since: 0.10.22
*/
@ -1584,7 +1584,7 @@ flushing:
{
g_mutex_unlock (priv->mutex);
GST_DEBUG_OBJECT (appsrc, "refuse EOS, we are flushing");
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
}

View file

@ -1469,7 +1469,7 @@ flushing:
{
GST_DEBUG_OBJECT (sink, "we are flushing");
GST_OBJECT_LOCK (sink);
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
}

View file

@ -1028,7 +1028,7 @@ no_sync:
wrong_state:
{
GST_DEBUG_OBJECT (src, "ringbuffer in wrong state");
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
wrong_offset:
{
@ -1046,7 +1046,7 @@ stopped:
{
gst_buffer_unref (buf);
GST_DEBUG_OBJECT (src, "ringbuffer stopped");
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
}

View file

@ -37,7 +37,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gio_debug);
/* @func_name: Name of the GIO function, for debugging messages.
* @err: Error location. *err may be NULL, but err must be non-NULL.
* @ret: Flow return location. May be NULL. Is set to either #GST_FLOW_ERROR
* or #GST_FLOW_WRONG_STATE.
* or #GST_FLOW_FLUSHING.
*
* Returns: TRUE to indicate a handled error. Error at given location err will
* be freed and *err will be set to NULL. A FALSE return indicates an unhandled
@ -56,7 +56,7 @@ gst_gio_error (gpointer element, const gchar * func_name, GError ** err,
if (GST_GIO_ERROR_MATCHES (*err, CANCELLED)) {
GST_DEBUG_OBJECT (element, "blocking I/O call cancelled (%s)", func_name);
if (ret)
*ret = GST_FLOW_WRONG_STATE;
*ret = GST_FLOW_FLUSHING;
} else if (*err != NULL) {
handled = FALSE;
} else {

View file

@ -2341,7 +2341,7 @@ gst_multi_socket_sink_render (GstBaseSink * bsink, GstBuffer * buf)
sink = GST_MULTI_SOCKET_SINK (bsink);
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink,
GST_MULTI_SOCKET_SINK_OPEN), GST_FLOW_WRONG_STATE);
GST_MULTI_SOCKET_SINK_OPEN), GST_FLOW_FLUSHING);
#if 0
/* since we check every buffer for streamheader caps, we need to make

View file

@ -180,7 +180,7 @@ gst_tcp_client_sink_render (GstBaseSink * bsink, GstBuffer * buf)
sink = GST_TCP_CLIENT_SINK (bsink);
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCP_CLIENT_SINK_OPEN),
GST_FLOW_WRONG_STATE);
GST_FLOW_FLUSHING);
gst_buffer_map (buf, &map, GST_MAP_READ);
GST_LOG_OBJECT (sink, "writing %" G_GSIZE_FORMAT " bytes for buffer data",
@ -207,7 +207,7 @@ write_error:
GstFlowReturn ret;
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
ret = GST_FLOW_WRONG_STATE;
ret = GST_FLOW_FLUSHING;
GST_DEBUG_OBJECT (sink, "Cancelled reading from socket");
} else {
GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,

View file

@ -245,7 +245,7 @@ gst_tcp_client_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
*outbuf = NULL;
} else if (rret < 0) {
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
ret = GST_FLOW_WRONG_STATE;
ret = GST_FLOW_FLUSHING;
GST_DEBUG_OBJECT (src, "Cancelled reading from socket");
} else {
ret = GST_FLOW_ERROR;
@ -290,7 +290,7 @@ get_available_error:
wrong_state:
{
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
}

View file

@ -240,7 +240,7 @@ gst_tcp_server_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
*outbuf = NULL;
} else if (rret < 0) {
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
ret = GST_FLOW_WRONG_STATE;
ret = GST_FLOW_FLUSHING;
GST_DEBUG_OBJECT (src, "Cancelled reading from socket");
} else {
ret = GST_FLOW_ERROR;
@ -272,7 +272,7 @@ done:
wrong_state:
{
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
return GST_FLOW_WRONG_STATE;
return GST_FLOW_FLUSHING;
}
accept_error:
{

View file

@ -620,7 +620,7 @@ GST_START_TEST (test_video_waits_for_text)
GST_LOG ("pushing video buffer 4");
gst_buffer_ref (inbuffer);
fail_unless (gst_pad_push (myvideosrcpad, inbuffer) == GST_FLOW_WRONG_STATE);
fail_unless (gst_pad_push (myvideosrcpad, inbuffer) == GST_FLOW_FLUSHING);
/* and clean up */
g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);

View file

@ -657,7 +657,7 @@ GST_START_TEST (test_non_ok_flow)
GST_BUFFER_TIMESTAMP (buf) = ts;
/* pushing gives away our reference */
fail_unless_equals_int (gst_pad_push (mysrcpad, buf), GST_FLOW_WRONG_STATE);
fail_unless_equals_int (gst_pad_push (mysrcpad, buf), GST_FLOW_FLUSHING);
/* cleanup */
cleanup_videorate (videorate);