Commit 7ab1d62c authored by Wim Taymans's avatar Wim Taymans

GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING

parent 9f207791
...@@ -302,7 +302,7 @@ do_stop (GstBufferPool * pool) ...@@ -302,7 +302,7 @@ do_stop (GstBufferPool * pool)
* @active: the new active state * @active: the new active state
* *
* Control the active state of @pool. When the pool is active, new calls to * Control the active state of @pool. When the pool is active, new calls to
* gst_buffer_pool_acquire_buffer() will return with GST_FLOW_WRONG_STATE. * gst_buffer_pool_acquire_buffer() will return with GST_FLOW_FLUSHING.
* *
* Activating the bufferpool will preallocate all resources in the pool based on * Activating the bufferpool will preallocate all resources in the pool based on
* the configuration of the pool. * the configuration of the pool.
...@@ -830,7 +830,7 @@ default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer, ...@@ -830,7 +830,7 @@ default_acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
flushing: flushing:
{ {
GST_DEBUG_OBJECT (pool, "we are flushing"); GST_DEBUG_OBJECT (pool, "we are flushing");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
} }
...@@ -887,7 +887,7 @@ default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer, ...@@ -887,7 +887,7 @@ default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer,
* *
* @params can be NULL or contain optional parameters to influence the allocation. * @params can be NULL or contain optional parameters to influence the allocation.
* *
* Returns: a #GstFlowReturn such as GST_FLOW_WRONG_STATE when the pool is * Returns: a #GstFlowReturn such as GST_FLOW_FLUSHING when the pool is
* inactive. * inactive.
*/ */
GstFlowReturn GstFlowReturn
......
...@@ -274,7 +274,7 @@ typedef enum { ...@@ -274,7 +274,7 @@ typedef enum {
* Elements unblock any waits on devices * Elements unblock any waits on devices
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* Chain or get_range functions return %GST_FLOW_WRONG_STATE. * Chain or get_range functions return %GST_FLOW_FLUSHING.
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* The element pads are deactivated so that streaming becomes impossible and * The element pads are deactivated so that streaming becomes impossible and
......
...@@ -468,7 +468,7 @@ gst_event_set_seqnum (GstEvent * event, guint32 seqnum) ...@@ -468,7 +468,7 @@ gst_event_set_seqnum (GstEvent * event, guint32 seqnum)
* upstream and downstream and travels out-of-bounds with the dataflow. * upstream and downstream and travels out-of-bounds with the dataflow.
* *
* It marks pads as being flushing and will make them return * It marks pads as being flushing and will make them return
* #GST_FLOW_WRONG_STATE when used for data flow with gst_pad_push(), * #GST_FLOW_FLUSHING when used for data flow with gst_pad_push(),
* gst_pad_chain(), gst_pad_alloc_buffer(), gst_pad_get_range() and * gst_pad_chain(), gst_pad_alloc_buffer(), gst_pad_get_range() and
* gst_pad_pull_range(). Any event (except a #GST_EVENT_FLUSH_STOP) received * gst_pad_pull_range(). Any event (except a #GST_EVENT_FLUSH_STOP) received
* on a flushing pad will return %FALSE immediately. * on a flushing pad will return %FALSE immediately.
......
...@@ -170,7 +170,7 @@ static GstFlowQuarks flow_quarks[] = { ...@@ -170,7 +170,7 @@ static GstFlowQuarks flow_quarks[] = {
{GST_FLOW_CUSTOM_SUCCESS, "custom-success", 0}, {GST_FLOW_CUSTOM_SUCCESS, "custom-success", 0},
{GST_FLOW_OK, "ok", 0}, {GST_FLOW_OK, "ok", 0},
{GST_FLOW_NOT_LINKED, "not-linked", 0}, {GST_FLOW_NOT_LINKED, "not-linked", 0},
{GST_FLOW_WRONG_STATE, "wrong-state", 0}, {GST_FLOW_FLUSHING, "flushing", 0},
{GST_FLOW_EOS, "eos", 0}, {GST_FLOW_EOS, "eos", 0},
{GST_FLOW_NOT_NEGOTIATED, "not-negotiated", 0}, {GST_FLOW_NOT_NEGOTIATED, "not-negotiated", 0},
{GST_FLOW_ERROR, "error", 0}, {GST_FLOW_ERROR, "error", 0},
...@@ -3018,7 +3018,7 @@ again: ...@@ -3018,7 +3018,7 @@ again:
flushing: flushing:
{ {
GST_DEBUG_OBJECT (pad, "pad is flushing"); GST_DEBUG_OBJECT (pad, "pad is flushing");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
dropped: dropped:
{ {
...@@ -3364,7 +3364,7 @@ flushing: ...@@ -3364,7 +3364,7 @@ flushing:
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
GST_PAD_STREAM_UNLOCK (pad); GST_PAD_STREAM_UNLOCK (pad);
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data)); gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
wrong_mode: wrong_mode:
{ {
...@@ -3412,7 +3412,7 @@ no_function: ...@@ -3412,7 +3412,7 @@ no_function:
* *
* Chain a buffer to @pad. * Chain a buffer to @pad.
* *
* The function returns #GST_FLOW_WRONG_STATE if the pad was flushing. * The function returns #GST_FLOW_FLUSHING if the pad was flushing.
* *
* If the buffer type is not acceptable for @pad (as negotiated with a * If the buffer type is not acceptable for @pad (as negotiated with a
* preceeding GST_EVENT_CAPS event), this function returns * preceeding GST_EVENT_CAPS event), this function returns
...@@ -3476,7 +3476,7 @@ gst_pad_chain_list_default (GstPad * pad, GstObject * parent, ...@@ -3476,7 +3476,7 @@ gst_pad_chain_list_default (GstPad * pad, GstObject * parent,
* *
* Chain a bufferlist to @pad. * Chain a bufferlist to @pad.
* *
* The function returns #GST_FLOW_WRONG_STATE if the pad was flushing. * The function returns #GST_FLOW_FLUSHING if the pad was flushing.
* *
* If @pad was not negotiated properly with a CAPS event, this function * If @pad was not negotiated properly with a CAPS event, this function
* returns #GST_FLOW_NOT_NEGOTIATED. * returns #GST_FLOW_NOT_NEGOTIATED.
...@@ -3567,7 +3567,7 @@ flushing: ...@@ -3567,7 +3567,7 @@ flushing:
"pushing, but pad was flushing"); "pushing, but pad was flushing");
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data)); gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
wrong_mode: wrong_mode:
{ {
...@@ -3751,7 +3751,7 @@ flushing: ...@@ -3751,7 +3751,7 @@ flushing:
"getrange, but pad was flushing"); "getrange, but pad was flushing");
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
GST_PAD_STREAM_UNLOCK (pad); GST_PAD_STREAM_UNLOCK (pad);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
wrong_mode: wrong_mode:
{ {
...@@ -3774,7 +3774,7 @@ no_parent: ...@@ -3774,7 +3774,7 @@ no_parent:
GST_DEBUG_OBJECT (pad, "no parent"); GST_DEBUG_OBJECT (pad, "no parent");
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
GST_PAD_STREAM_UNLOCK (pad); GST_PAD_STREAM_UNLOCK (pad);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
no_function: no_function:
{ {
...@@ -3822,7 +3822,7 @@ get_range_failed: ...@@ -3822,7 +3822,7 @@ get_range_failed:
* @buffer: (out callee-allocates): a pointer to hold the #GstBuffer, * @buffer: (out callee-allocates): a pointer to hold the #GstBuffer,
* returns #GST_FLOW_ERROR if %NULL. * returns #GST_FLOW_ERROR if %NULL.
* *
* When @pad is flushing this function returns #GST_FLOW_WRONG_STATE * When @pad is flushing this function returns #GST_FLOW_FLUSHING
* immediately and @buffer is %NULL. * immediately and @buffer is %NULL.
* *
* Calls the getrange function of @pad, see #GstPadGetRangeFunction for a * Calls the getrange function of @pad, see #GstPadGetRangeFunction for a
...@@ -3932,7 +3932,7 @@ flushing: ...@@ -3932,7 +3932,7 @@ flushing:
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"pullrange, but pad was flushing"); "pullrange, but pad was flushing");
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
wrong_mode: wrong_mode:
{ {
...@@ -4168,7 +4168,7 @@ flushed: ...@@ -4168,7 +4168,7 @@ flushed:
GST_DEBUG_OBJECT (pad, "We're flushing"); GST_DEBUG_OBJECT (pad, "We're flushing");
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
gst_event_unref (event); gst_event_unref (event);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
probe_stopped: probe_stopped:
{ {
...@@ -4438,7 +4438,7 @@ flushing: ...@@ -4438,7 +4438,7 @@ flushing:
GST_CAT_INFO_OBJECT (GST_CAT_EVENT, pad, GST_CAT_INFO_OBJECT (GST_CAT_EVENT, pad,
"Received event on flushing pad. Discarding"); "Received event on flushing pad. Discarding");
gst_event_unref (event); gst_event_unref (event);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
probe_stopped: probe_stopped:
{ {
...@@ -4475,7 +4475,7 @@ no_parent: ...@@ -4475,7 +4475,7 @@ no_parent:
if (need_unlock) if (need_unlock)
GST_PAD_STREAM_UNLOCK (pad); GST_PAD_STREAM_UNLOCK (pad);
gst_event_unref (event); gst_event_unref (event);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
precheck_failed: precheck_failed:
{ {
......
...@@ -127,7 +127,7 @@ typedef enum { ...@@ -127,7 +127,7 @@ typedef enum {
* GstFlowReturn: * GstFlowReturn:
* @GST_FLOW_OK: Data passing was ok. * @GST_FLOW_OK: Data passing was ok.
* @GST_FLOW_NOT_LINKED: Pad is not linked. * @GST_FLOW_NOT_LINKED: Pad is not linked.
* @GST_FLOW_WRONG_STATE: Pad is in wrong state. * @GST_FLOW_FLUSHING: Pad is flushing.
* @GST_FLOW_EOS: Pad is EOS. * @GST_FLOW_EOS: Pad is EOS.
* @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated. * @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated.
* @GST_FLOW_ERROR: Some (fatal) error occured. Element generating * @GST_FLOW_ERROR: Some (fatal) error occured. Element generating
...@@ -165,7 +165,7 @@ typedef enum { ...@@ -165,7 +165,7 @@ typedef enum {
GST_FLOW_OK = 0, GST_FLOW_OK = 0,
/* expected failures */ /* expected failures */
GST_FLOW_NOT_LINKED = -1, GST_FLOW_NOT_LINKED = -1,
GST_FLOW_WRONG_STATE = -2, GST_FLOW_FLUSHING = -2,
/* error cases */ /* error cases */
GST_FLOW_EOS = -3, GST_FLOW_EOS = -3,
GST_FLOW_NOT_NEGOTIATED = -4, GST_FLOW_NOT_NEGOTIATED = -4,
......
...@@ -2061,7 +2061,7 @@ no_clock: ...@@ -2061,7 +2061,7 @@ no_clock:
* This function will block until a state change to PLAYING happens (in which * This function will block until a state change to PLAYING happens (in which
* case this function returns #GST_FLOW_OK) or the processing must be stopped due * case this function returns #GST_FLOW_OK) or the processing must be stopped due
* to a state change to READY or a FLUSH event (in which case this function * to a state change to READY or a FLUSH event (in which case this function
* returns #GST_FLOW_WRONG_STATE). * returns #GST_FLOW_FLUSHING).
* *
* This function should only be called with the PREROLL_LOCK held, like in the * This function should only be called with the PREROLL_LOCK held, like in the
* render function. * render function.
...@@ -2091,7 +2091,7 @@ gst_base_sink_wait_preroll (GstBaseSink * sink) ...@@ -2091,7 +2091,7 @@ gst_base_sink_wait_preroll (GstBaseSink * sink)
stopping: stopping:
{ {
GST_DEBUG_OBJECT (sink, "preroll interrupted because of flush"); GST_DEBUG_OBJECT (sink, "preroll interrupted because of flush");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
step_unlocked: step_unlocked:
{ {
...@@ -2181,7 +2181,7 @@ preroll_canceled: ...@@ -2181,7 +2181,7 @@ preroll_canceled:
stopping: stopping:
{ {
GST_DEBUG_OBJECT (sink, "stopping while commiting state"); GST_DEBUG_OBJECT (sink, "stopping while commiting state");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
preroll_failed: preroll_failed:
{ {
...@@ -2262,7 +2262,7 @@ gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time, ...@@ -2262,7 +2262,7 @@ gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time,
flushing: flushing:
{ {
GST_DEBUG_OBJECT (sink, "we are flushing"); GST_DEBUG_OBJECT (sink, "we are flushing");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
} }
...@@ -2442,7 +2442,7 @@ qos_dropped: ...@@ -2442,7 +2442,7 @@ qos_dropped:
flushing: flushing:
{ {
GST_DEBUG_OBJECT (basesink, "we are flushing"); GST_DEBUG_OBJECT (basesink, "we are flushing");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
preroll_failed: preroll_failed:
{ {
...@@ -3203,7 +3203,7 @@ flushing: ...@@ -3203,7 +3203,7 @@ flushing:
{ {
GST_DEBUG_OBJECT (basesink, "sink is flushing"); GST_DEBUG_OBJECT (basesink, "sink is flushing");
gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj)); gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj));
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
was_eos: was_eos:
{ {
......
...@@ -438,7 +438,7 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class) ...@@ -438,7 +438,7 @@ gst_base_src_init (GstBaseSrc * basesrc, gpointer g_class)
basesrc->priv->do_timestamp = DEFAULT_DO_TIMESTAMP; basesrc->priv->do_timestamp = DEFAULT_DO_TIMESTAMP;
g_atomic_int_set (&basesrc->priv->have_events, FALSE); g_atomic_int_set (&basesrc->priv->have_events, FALSE);
basesrc->priv->start_result = GST_FLOW_WRONG_STATE; basesrc->priv->start_result = GST_FLOW_FLUSHING;
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTED); GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTED);
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTING); GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTING);
GST_OBJECT_FLAG_SET (basesrc, GST_ELEMENT_FLAG_SOURCE); GST_OBJECT_FLAG_SET (basesrc, GST_ELEMENT_FLAG_SOURCE);
...@@ -480,7 +480,7 @@ gst_base_src_finalize (GObject * object) ...@@ -480,7 +480,7 @@ gst_base_src_finalize (GObject * object)
* This function will block until a state change to PLAYING happens (in which * This function will block until a state change to PLAYING happens (in which
* case this function returns #GST_FLOW_OK) or the processing must be stopped due * case this function returns #GST_FLOW_OK) or the processing must be stopped due
* to a state change to READY or a FLUSH event (in which case this function * to a state change to READY or a FLUSH event (in which case this function
* returns #GST_FLOW_WRONG_STATE). * returns #GST_FLOW_FLUSHING).
* *
* Since: 0.10.12 * Since: 0.10.12
* *
...@@ -507,7 +507,7 @@ gst_base_src_wait_playing (GstBaseSrc * src) ...@@ -507,7 +507,7 @@ gst_base_src_wait_playing (GstBaseSrc * src)
flushing: flushing:
{ {
GST_DEBUG_OBJECT (src, "we are flushing"); GST_DEBUG_OBJECT (src, "we are flushing");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
} }
...@@ -2334,7 +2334,7 @@ again: ...@@ -2334,7 +2334,7 @@ again:
* get rid of the produced buffer. */ * get rid of the produced buffer. */
GST_DEBUG_OBJECT (src, GST_DEBUG_OBJECT (src,
"clock was unscheduled (%d), returning WRONG_STATE", status); "clock was unscheduled (%d), returning WRONG_STATE", status);
ret = GST_FLOW_WRONG_STATE; ret = GST_FLOW_FLUSHING;
} else { } else {
/* If we are running when this happens, we quickly switched between /* If we are running when this happens, we quickly switched between
* pause and playing. We try to produce a new buffer */ * pause and playing. We try to produce a new buffer */
...@@ -2371,7 +2371,7 @@ not_ok: ...@@ -2371,7 +2371,7 @@ not_ok:
not_started: not_started:
{ {
GST_DEBUG_OBJECT (src, "getrange but not started"); GST_DEBUG_OBJECT (src, "getrange but not started");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
no_function: no_function:
{ {
...@@ -2394,7 +2394,7 @@ flushing: ...@@ -2394,7 +2394,7 @@ flushing:
GST_DEBUG_OBJECT (src, "we are flushing"); GST_DEBUG_OBJECT (src, "we are flushing");
gst_buffer_unref (*buf); gst_buffer_unref (*buf);
*buf = NULL; *buf = NULL;
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
eos: eos:
{ {
...@@ -2427,7 +2427,7 @@ done: ...@@ -2427,7 +2427,7 @@ done:
flushing: flushing:
{ {
GST_DEBUG_OBJECT (src, "we are flushing"); GST_DEBUG_OBJECT (src, "we are flushing");
res = GST_FLOW_WRONG_STATE; res = GST_FLOW_FLUSHING;
goto done; goto done;
} }
} }
...@@ -2642,7 +2642,7 @@ flushing: ...@@ -2642,7 +2642,7 @@ flushing:
{ {
GST_DEBUG_OBJECT (src, "we are flushing"); GST_DEBUG_OBJECT (src, "we are flushing");
GST_LIVE_UNLOCK (src); GST_LIVE_UNLOCK (src);
ret = GST_FLOW_WRONG_STATE; ret = GST_FLOW_FLUSHING;
goto pause; goto pause;
} }
pause: pause:
...@@ -2942,7 +2942,7 @@ gst_base_src_start (GstBaseSrc * basesrc) ...@@ -2942,7 +2942,7 @@ gst_base_src_start (GstBaseSrc * basesrc)
if (GST_BASE_SRC_IS_STARTED (basesrc)) if (GST_BASE_SRC_IS_STARTED (basesrc))
goto was_started; goto was_started;
basesrc->priv->start_result = GST_FLOW_WRONG_STATE; basesrc->priv->start_result = GST_FLOW_FLUSHING;
GST_OBJECT_FLAG_SET (basesrc, GST_BASE_SRC_FLAG_STARTING); GST_OBJECT_FLAG_SET (basesrc, GST_BASE_SRC_FLAG_STARTING);
basesrc->num_buffers_left = basesrc->num_buffers; basesrc->num_buffers_left = basesrc->num_buffers;
basesrc->running = FALSE; basesrc->running = FALSE;
...@@ -3148,7 +3148,7 @@ flushing: ...@@ -3148,7 +3148,7 @@ flushing:
{ {
GST_DEBUG_OBJECT (basesrc, "we are flushing"); GST_DEBUG_OBJECT (basesrc, "we are flushing");
GST_LIVE_UNLOCK (basesrc); GST_LIVE_UNLOCK (basesrc);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
} }
...@@ -3171,7 +3171,7 @@ gst_base_src_stop (GstBaseSrc * basesrc) ...@@ -3171,7 +3171,7 @@ gst_base_src_stop (GstBaseSrc * basesrc)
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTING); GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTING);
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTED); GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTED);
basesrc->priv->start_result = GST_FLOW_WRONG_STATE; basesrc->priv->start_result = GST_FLOW_FLUSHING;
GST_LIVE_SIGNAL (basesrc); GST_LIVE_SIGNAL (basesrc);
GST_LIVE_UNLOCK (basesrc); GST_LIVE_UNLOCK (basesrc);
......
...@@ -138,8 +138,8 @@ struct _GstBaseSrc { ...@@ -138,8 +138,8 @@ struct _GstBaseSrc {
* @do_seek: Perform seeking on the resource to the indicated segment. * @do_seek: Perform seeking on the resource to the indicated segment.
* @unlock: Unlock any pending access to the resource. Subclasses should * @unlock: Unlock any pending access to the resource. Subclasses should
* unblock any blocked function ASAP. In particular, any create() function in * unblock any blocked function ASAP. In particular, any create() function in
* progress should be unblocked and should return GST_FLOW_WRONG_STATE. Any * progress should be unblocked and should return GST_FLOW_FLUSHING. Any
* future @create<!-- -->() function call should also return GST_FLOW_WRONG_STATE * future @create<!-- -->() function call should also return GST_FLOW_FLUSHING
* until the @unlock_stop<!-- -->() function has been called. * until the @unlock_stop<!-- -->() function has been called.
* @unlock_stop: Clear the previous unlock request. Subclasses should clear * @unlock_stop: Clear the previous unlock request. Subclasses should clear
* any state they set during unlock(), such as clearing command queues. * any state they set during unlock(), such as clearing command queues.
......
...@@ -2001,14 +2001,14 @@ not_started: ...@@ -2001,14 +2001,14 @@ not_started:
{ {
GST_DEBUG ("not started"); GST_DEBUG ("not started");
gst_collect_pads2_clear (pads, data); gst_collect_pads2_clear (pads, data);
ret = GST_FLOW_WRONG_STATE; ret = GST_FLOW_FLUSHING;
goto unlock_done; goto unlock_done;
} }
flushing: flushing:
{ {
GST_DEBUG ("pad %s:%s is flushing", GST_DEBUG_PAD_NAME (pad)); GST_DEBUG ("pad %s:%s is flushing", GST_DEBUG_PAD_NAME (pad));
gst_collect_pads2_clear (pads, data); gst_collect_pads2_clear (pads, data);
ret = GST_FLOW_WRONG_STATE; ret = GST_FLOW_FLUSHING;
goto unlock_done; goto unlock_done;
} }
eos: eos:
......
...@@ -299,7 +299,7 @@ stopped: ...@@ -299,7 +299,7 @@ stopped:
{ {
GST_DEBUG_OBJECT (fdsink, "Select stopped"); GST_DEBUG_OBJECT (fdsink, "Select stopped");
gst_buffer_unmap (buffer, &info); gst_buffer_unmap (buffer, &info);
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
#endif #endif
......
...@@ -484,7 +484,7 @@ poll_error: ...@@ -484,7 +484,7 @@ poll_error:
stopped: stopped:
{ {
GST_DEBUG_OBJECT (psrc, "Poll stopped"); GST_DEBUG_OBJECT (psrc, "Poll stopped");
return GST_FLOW_WRONG_STATE; return GST_FLOW_FLUSHING;
} }
#endif #endif
alloc_failed: alloc_failed:
......
...@@ -721,7 +721,7 @@ flushing: ...@@ -721,7 +721,7 @@ flushing:
GST_DEBUG_OBJECT (pad, "We are flushing, discard buffer %p", buf); GST_DEBUG_OBJECT (pad, "We are flushing, discard buffer %p", buf);
GST_INPUT_SELECTOR_UNLOCK (sel); GST_INPUT_SELECTOR_UNLOCK (sel);
gst_buffer_unref (buf); gst_buffer_unref (buf);
res = GST_FLOW_WRONG_STATE; res = GST_FLOW_FLUSHING;
goto done; goto done;
} }
} }
......
...@@ -740,7 +740,7 @@ gst_single_queue_flush (GstMultiQueue * mq, GstSingleQueue * sq, gboolean flush) ...@@ -740,7 +740,7 @@ gst_single_queue_flush (GstMultiQueue * mq, GstSingleQueue * sq, gboolean flush)
sq->id); sq->id);
if (flush) { if (flush) {
sq->srcresult = GST_FLOW_WRONG_STATE; sq->srcresult = GST_FLOW_FLUSHING;
gst_data_queue_set_flushing (sq->queue, TRUE); gst_data_queue_set_flushing (sq->queue, TRUE);
sq->flushing = TRUE; sq->flushing = TRUE;
...@@ -1397,7 +1397,7 @@ gst_multi_queue_sink_activate_mode (GstPad * pad, GstObject * parent, ...@@ -1397,7 +1397,7 @@ gst_multi_queue_sink_activate_mode (GstPad * pad, GstObject * parent,
/* All pads start off linked until they push one buffer */ /* All pads start off linked until they push one buffer */
sq->srcresult = GST_FLOW_OK; sq->srcresult = GST_FLOW_OK;
} else { } else {
sq->srcresult = GST_FLOW_WRONG_STATE; sq->srcresult = GST_FLOW_FLUSHING;
gst_data_queue_flush (sq->queue); gst_data_queue_flush (sq->queue);
} }
res = TRUE; res = TRUE;
...@@ -1885,7 +1885,7 @@ gst_single_queue_new (GstMultiQueue * mqueue, guint id) ...@@ -1885,7 +1885,7 @@ gst_single_queue_new (GstMultiQueue * mqueue, guint id)
GST_DEBUG_OBJECT (mqueue, "Creating GstSingleQueue id:%d", sq->id); GST_DEBUG_OBJECT (mqueue, "Creating GstSingleQueue id:%d", sq->id);
sq->mqueue = mqueue; sq->mqueue = mqueue;
sq->srcresult = GST_FLOW_WRONG_STATE; sq->srcresult = GST_FLOW_FLUSHING;
sq->queue = gst_data_queue_new_full ((GstDataQueueCheckFullFunction) sq->queue = gst_data_queue_new_full ((GstDataQueueCheckFullFunction)
single_queue_check_full, single_queue_check_full,
(GstDataQueueFullCallback) single_queue_overrun_cb, (GstDataQueueFullCallback) single_queue_overrun_cb,
......
...@@ -420,7 +420,7 @@ gst_queue_init (GstQueue * queue) ...@@ -420,7 +420,7 @@ gst_queue_init (GstQueue * queue)
queue->head_needs_discont = queue->tail_needs_discont = FALSE; queue->head_needs_discont = queue->tail_needs_discont = FALSE;
queue->leaky = GST_QUEUE_NO_LEAK; queue->leaky = GST_QUEUE_NO_LEAK;
queue->srcresult = GST_FLOW_WRONG_STATE; queue->srcresult = GST_FLOW_FLUSHING;
g_mutex_init (&queue->qlock); g_mutex_init (&queue->qlock);
g_cond_init (&queue->item_add); g_cond_init (&queue->item_add);
...@@ -749,7 +749,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) ...@@ -749,7 +749,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
/* now unblock the chain function */ /* now unblock the chain function */
GST_QUEUE_MUTEX_LOCK (queue); GST_QUEUE_MUTEX_LOCK (queue);
queue->srcresult = GST_FLOW_WRONG_STATE; queue->srcresult = GST_FLOW_FLUSHING;
/* unblock the loop and chain functions */ /* unblock the loop and chain functions */
GST_QUEUE_SIGNAL_ADD (queue); GST_QUEUE_SIGNAL_ADD (queue);
GST_QUEUE_SIGNAL_DEL (queue); GST_QUEUE_SIGNAL_DEL (queue);
...@@ -1131,7 +1131,7 @@ no_item: ...@@ -1131,7 +1131,7 @@ no_item:
out_flushing: out_flushing:
{ {
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing");