} 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;
}
}
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
GST_DEBUG_PAD_NAME (ogm->srcpad), gst_flow_get_name (ret));
}
} else {
- ret = GST_FLOW_WRONG_STATE;
+ ret = GST_FLOW_FLUSHING;
}
return ret;
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;
}
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;
}
}
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:
{
{
GST_DEBUG_OBJECT (appsink, "we are flushing");
g_mutex_unlock (priv->mutex);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
{
GST_DEBUG_OBJECT (appsink, "we are flushing");
g_mutex_unlock (priv->mutex);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
stopping:
{
{
GST_DEBUG_OBJECT (appsrc, "we are flushing");
g_mutex_unlock (priv->mutex);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
eos:
{
if (steal_ref)
gst_buffer_unref (buffer);
g_mutex_unlock (priv->mutex);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
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
* 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
*/
{
g_mutex_unlock (priv->mutex);
GST_DEBUG_OBJECT (appsrc, "refuse EOS, we are flushing");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
{
GST_DEBUG_OBJECT (sink, "we are flushing");
GST_OBJECT_LOCK (sink);
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
wrong_state:
{
GST_DEBUG_OBJECT (src, "ringbuffer in wrong state");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
wrong_offset:
{
{
gst_buffer_unref (buf);
GST_DEBUG_OBJECT (src, "ringbuffer stopped");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
/* @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
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 {
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
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",
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,
*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;
wrong_state:
{
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
}
*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;
wrong_state:
{
GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
- return GST_FLOW_WRONG_STATE;
+ return GST_FLOW_FLUSHING;
}
accept_error:
{
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);
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);