mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING
This commit is contained in:
parent
bd4bf43171
commit
a75e9102c5
14 changed files with 27 additions and 27 deletions
|
@ -1643,7 +1643,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
|
||||||
} else {
|
} else {
|
||||||
/* no pad to pull on, send EOS */
|
/* no pad to pull on, send EOS */
|
||||||
gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ());
|
gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ());
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -687,7 +687,7 @@ gst_ogm_parse_comment_packet (GstOgmParse * ogm, GstBuffer * buf)
|
||||||
|
|
||||||
if (ogm->srcpad == NULL) {
|
if (ogm->srcpad == NULL) {
|
||||||
GST_DEBUG ("no source pad");
|
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
|
/* 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));
|
GST_DEBUG_PAD_NAME (ogm->srcpad), gst_flow_get_name (ret));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = GST_FLOW_WRONG_STATE;
|
ret = GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -2367,7 +2367,7 @@ gst_base_text_overlay_text_chain (GstPad * pad, GstObject * parent,
|
||||||
|
|
||||||
if (overlay->text_flushing) {
|
if (overlay->text_flushing) {
|
||||||
GST_OBJECT_UNLOCK (overlay);
|
GST_OBJECT_UNLOCK (overlay);
|
||||||
ret = GST_FLOW_WRONG_STATE;
|
ret = GST_FLOW_FLUSHING;
|
||||||
GST_LOG_OBJECT (overlay, "text flushing");
|
GST_LOG_OBJECT (overlay, "text flushing");
|
||||||
goto beach;
|
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));
|
GST_DEBUG ("Pad %s:%s resuming", GST_DEBUG_PAD_NAME (pad));
|
||||||
if (overlay->text_flushing) {
|
if (overlay->text_flushing) {
|
||||||
GST_OBJECT_UNLOCK (overlay);
|
GST_OBJECT_UNLOCK (overlay);
|
||||||
ret = GST_FLOW_WRONG_STATE;
|
ret = GST_FLOW_FLUSHING;
|
||||||
goto beach;
|
goto beach;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2735,7 +2735,7 @@ flushing:
|
||||||
GST_OBJECT_UNLOCK (overlay);
|
GST_OBJECT_UNLOCK (overlay);
|
||||||
GST_DEBUG_OBJECT (overlay, "flushing, discarding buffer");
|
GST_DEBUG_OBJECT (overlay, "flushing, discarding buffer");
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
have_eos:
|
have_eos:
|
||||||
{
|
{
|
||||||
|
|
|
@ -634,7 +634,7 @@ flushing:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (appsink, "we are flushing");
|
GST_DEBUG_OBJECT (appsink, "we are flushing");
|
||||||
g_mutex_unlock (priv->mutex);
|
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");
|
GST_DEBUG_OBJECT (appsink, "we are flushing");
|
||||||
g_mutex_unlock (priv->mutex);
|
g_mutex_unlock (priv->mutex);
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
stopping:
|
stopping:
|
||||||
{
|
{
|
||||||
|
|
|
@ -1041,7 +1041,7 @@ flushing:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (appsrc, "we are flushing");
|
GST_DEBUG_OBJECT (appsrc, "we are flushing");
|
||||||
g_mutex_unlock (priv->mutex);
|
g_mutex_unlock (priv->mutex);
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
eos:
|
eos:
|
||||||
{
|
{
|
||||||
|
@ -1502,7 +1502,7 @@ flushing:
|
||||||
if (steal_ref)
|
if (steal_ref)
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
g_mutex_unlock (priv->mutex);
|
g_mutex_unlock (priv->mutex);
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
eos:
|
eos:
|
||||||
{
|
{
|
||||||
|
@ -1526,7 +1526,7 @@ eos:
|
||||||
* space becomes available in the queue.
|
* space becomes available in the queue.
|
||||||
*
|
*
|
||||||
* Returns: #GST_FLOW_OK when the buffer was successfuly queued.
|
* 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.
|
* #GST_FLOW_EOS when EOS occured.
|
||||||
*
|
*
|
||||||
* Since: 0.10.22
|
* 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.
|
* element is the last buffer of the stream.
|
||||||
*
|
*
|
||||||
* Returns: #GST_FLOW_OK when the EOS was successfuly queued.
|
* 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
|
* Since: 0.10.22
|
||||||
*/
|
*/
|
||||||
|
@ -1584,7 +1584,7 @@ flushing:
|
||||||
{
|
{
|
||||||
g_mutex_unlock (priv->mutex);
|
g_mutex_unlock (priv->mutex);
|
||||||
GST_DEBUG_OBJECT (appsrc, "refuse EOS, we are flushing");
|
GST_DEBUG_OBJECT (appsrc, "refuse EOS, we are flushing");
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1469,7 +1469,7 @@ flushing:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (sink, "we are flushing");
|
GST_DEBUG_OBJECT (sink, "we are flushing");
|
||||||
GST_OBJECT_LOCK (sink);
|
GST_OBJECT_LOCK (sink);
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1028,7 +1028,7 @@ no_sync:
|
||||||
wrong_state:
|
wrong_state:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (src, "ringbuffer in wrong state");
|
GST_DEBUG_OBJECT (src, "ringbuffer in wrong state");
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
wrong_offset:
|
wrong_offset:
|
||||||
{
|
{
|
||||||
|
@ -1046,7 +1046,7 @@ stopped:
|
||||||
{
|
{
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
GST_DEBUG_OBJECT (src, "ringbuffer stopped");
|
GST_DEBUG_OBJECT (src, "ringbuffer stopped");
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gio_debug);
|
||||||
/* @func_name: Name of the GIO function, for debugging messages.
|
/* @func_name: Name of the GIO function, for debugging messages.
|
||||||
* @err: Error location. *err may be NULL, but err must be non-NULL.
|
* @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
|
* @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
|
* 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
|
* 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)) {
|
if (GST_GIO_ERROR_MATCHES (*err, CANCELLED)) {
|
||||||
GST_DEBUG_OBJECT (element, "blocking I/O call cancelled (%s)", func_name);
|
GST_DEBUG_OBJECT (element, "blocking I/O call cancelled (%s)", func_name);
|
||||||
if (ret)
|
if (ret)
|
||||||
*ret = GST_FLOW_WRONG_STATE;
|
*ret = GST_FLOW_FLUSHING;
|
||||||
} else if (*err != NULL) {
|
} else if (*err != NULL) {
|
||||||
handled = FALSE;
|
handled = FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2341,7 +2341,7 @@ gst_multi_socket_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
sink = GST_MULTI_SOCKET_SINK (bsink);
|
sink = GST_MULTI_SOCKET_SINK (bsink);
|
||||||
|
|
||||||
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink,
|
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
|
#if 0
|
||||||
/* since we check every buffer for streamheader caps, we need to make
|
/* since we check every buffer for streamheader caps, we need to make
|
||||||
|
|
|
@ -180,7 +180,7 @@ gst_tcp_client_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
sink = GST_TCP_CLIENT_SINK (bsink);
|
sink = GST_TCP_CLIENT_SINK (bsink);
|
||||||
|
|
||||||
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCP_CLIENT_SINK_OPEN),
|
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_buffer_map (buf, &map, GST_MAP_READ);
|
||||||
GST_LOG_OBJECT (sink, "writing %" G_GSIZE_FORMAT " bytes for buffer data",
|
GST_LOG_OBJECT (sink, "writing %" G_GSIZE_FORMAT " bytes for buffer data",
|
||||||
|
@ -207,7 +207,7 @@ write_error:
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
|
||||||
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
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");
|
GST_DEBUG_OBJECT (sink, "Cancelled reading from socket");
|
||||||
} else {
|
} else {
|
||||||
GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
|
||||||
|
|
|
@ -245,7 +245,7 @@ gst_tcp_client_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
||||||
*outbuf = NULL;
|
*outbuf = NULL;
|
||||||
} else if (rret < 0) {
|
} else if (rret < 0) {
|
||||||
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
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");
|
GST_DEBUG_OBJECT (src, "Cancelled reading from socket");
|
||||||
} else {
|
} else {
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
|
@ -290,7 +290,7 @@ get_available_error:
|
||||||
wrong_state:
|
wrong_state:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
|
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,7 @@ gst_tcp_server_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
||||||
*outbuf = NULL;
|
*outbuf = NULL;
|
||||||
} else if (rret < 0) {
|
} else if (rret < 0) {
|
||||||
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
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");
|
GST_DEBUG_OBJECT (src, "Cancelled reading from socket");
|
||||||
} else {
|
} else {
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
|
@ -272,7 +272,7 @@ done:
|
||||||
wrong_state:
|
wrong_state:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
|
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
|
||||||
return GST_FLOW_WRONG_STATE;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
accept_error:
|
accept_error:
|
||||||
{
|
{
|
||||||
|
|
|
@ -620,7 +620,7 @@ GST_START_TEST (test_video_waits_for_text)
|
||||||
|
|
||||||
GST_LOG ("pushing video buffer 4");
|
GST_LOG ("pushing video buffer 4");
|
||||||
gst_buffer_ref (inbuffer);
|
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 */
|
/* and clean up */
|
||||||
g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
|
g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
|
||||||
|
|
|
@ -657,7 +657,7 @@ GST_START_TEST (test_non_ok_flow)
|
||||||
GST_BUFFER_TIMESTAMP (buf) = ts;
|
GST_BUFFER_TIMESTAMP (buf) = ts;
|
||||||
|
|
||||||
/* pushing gives away our reference */
|
/* 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 */
|
||||||
cleanup_videorate (videorate);
|
cleanup_videorate (videorate);
|
||||||
|
|
Loading…
Reference in a new issue