GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 8 Feb 2012 15:34:00 +0000 (16:34 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 8 Feb 2012 15:43:30 +0000 (16:43 +0100)
20 files changed:
ext/gdk_pixbuf/gstgdkpixbuf.c
ext/jpeg/gstjpegdec.c
ext/libpng/gstpngdec.c
ext/raw1394/gstdv1394src.c
ext/raw1394/gsthdv1394src.c
ext/wavpack/gstwavpackenc.c
gst/effectv/gstquark.c
gst/flv/gstflvdemux.c
gst/imagefreeze/gstimagefreeze.c
gst/isomp4/qtdemux.c
gst/multifile/gstsplitfilesrc.c
gst/replaygain/gstrganalysis.c
gst/rtpmanager/gstrtpjitterbuffer.c
gst/rtsp/gstrtspsrc.c
gst/shapewipe/gstshapewipe.c
gst/udp/gstudpsrc.c
gst/wavenc/gstwavenc.c
sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2object.c
sys/ximage/gstximagesrc.c

index 51c24a1..a65d2e8 100644 (file)
@@ -326,7 +326,7 @@ gst_gdk_pixbuf_sink_event (GstPad * pad, GstEvent * event)
         /* 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)));
         }
index 8301214..4e071e1 100644 (file)
@@ -1656,7 +1656,7 @@ alloc_failed:
     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);
index 496160a..9ad3679 100644 (file)
@@ -677,7 +677,7 @@ beach:
 not_configured:
   {
     GST_LOG_OBJECT (pngdec, "we are not configured yet");
-    ret = GST_FLOW_WRONG_STATE;
+    ret = GST_FLOW_FLUSHING;
     goto beach;
   }
 }
index 86b22ec..f74c247 100644 (file)
@@ -725,7 +725,7 @@ error_while_polling:
 told_to_stop:
   {
     GST_DEBUG_OBJECT (dv1394src, "told to stop, shutting down");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 }
 
index b667891..fcd8824 100644 (file)
@@ -460,7 +460,7 @@ error_while_polling:
 told_to_stop:
   {
     GST_DEBUG_OBJECT (dv1394src, "told to stop, shutting down");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 }
 
index 91af97c..c871772 100644 (file)
@@ -799,9 +799,9 @@ gst_wavpack_enc_chain (GstPad * pad, GstBuffer * buf)
     } 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"));
index 81998fe..abd597a 100644 (file)
@@ -116,7 +116,7 @@ gst_quarktv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
     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);
index f454a5e..ea3f355 100644 (file)
@@ -1837,7 +1837,7 @@ parse:
 
   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;
   }
 
index 81d7c8e..d96954f 100644 (file)
@@ -343,8 +343,7 @@ gst_image_freeze_sink_bufferalloc (GstPad * pad, guint64 offset, guint size,
       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);
 
index dce6626..6eaff11 100644 (file)
@@ -5278,7 +5278,7 @@ parse_failed:
 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 {
index 3ad3079..f9fee82 100644 (file)
@@ -600,6 +600,6 @@ cancelled:
     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;
   }
 }
index 9747ccd..03149ad 100644 (file)
@@ -463,7 +463,7 @@ gst_rg_analysis_transform_ip (GstBaseTransform * base, GstBuffer * buf)
   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)
index eefc28c..4939623 100644 (file)
@@ -845,7 +845,7 @@ gst_rtp_jitter_buffer_flush_start (GstRtpJitterBuffer * jitterbuffer)
 
   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);
@@ -1152,7 +1152,7 @@ gst_rtp_jitter_buffer_sink_rtcp_event (GstPad * pad, GstObject * parent,
 /*
  * 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
@@ -1201,7 +1201,7 @@ no_caps:
 out_flushing:
   {
     GST_DEBUG_OBJECT (jitterbuffer, "we are flushing");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 parse_failed:
   {
@@ -1299,7 +1299,7 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
   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))
index 9eb7466..1b44a68 100644 (file)
@@ -3685,7 +3685,7 @@ interrupt:
     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:
   {
@@ -3812,7 +3812,7 @@ interrupt:
     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:
   {
@@ -3826,7 +3826,7 @@ connect_error:
       g_free (str);
       ret = GST_FLOW_ERROR;
     } else {
-      ret = GST_FLOW_WRONG_STATE;
+      ret = GST_FLOW_FLUSHING;
     }
     return ret;
   }
@@ -3851,7 +3851,7 @@ handle_request_failed:
       g_free (str);
       ret = GST_FLOW_ERROR;
     } else {
-      ret = GST_FLOW_WRONG_STATE;
+      ret = GST_FLOW_FLUSHING;
     }
     return ret;
   }
@@ -4084,7 +4084,7 @@ gst_rtspsrc_loop (GstRTSPSrc * src)
 no_connection:
   {
     GST_WARNING_OBJECT (src, "we are not connected");
-    ret = GST_FLOW_WRONG_STATE;
+    ret = GST_FLOW_FLUSHING;
     goto pause;
   }
 pause:
index b177126..6b06909 100644 (file)
@@ -929,7 +929,7 @@ shutdown:
   {
     GST_DEBUG_OBJECT (self, "Shutting down");
     gst_buffer_unref (buffer);
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 qos:
   {
index 2bf55b4..e6595b6 100644 (file)
@@ -485,7 +485,7 @@ select_error:
 stopped:
   {
     GST_DEBUG ("stop called");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 get_available_error:
   {
@@ -500,7 +500,7 @@ receive_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));
index 56c7eb9..ccf1071 100644 (file)
@@ -652,7 +652,7 @@ gst_wavenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
   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
index f052aad..bc0838d 100644 (file)
@@ -501,7 +501,7 @@ gst_v4l2_object_poll (GstV4l2Object * v4l2object)
 stopped:
   {
     GST_DEBUG ("stop called");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 select_error:
   {
@@ -741,7 +741,7 @@ gst_v4l2_buffer_pool_acquire_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
 flushing:
   {
     GST_DEBUG_OBJECT (pool, "We are flushing");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 }
 
index 82600ad..8924ea1 100644 (file)
@@ -2557,7 +2557,7 @@ gst_v4l2_object_get_mmap (GstV4l2Object * v4l2object, GstBuffer ** buf)
 no_buffer_pool:
   {
     GST_DEBUG_OBJECT (v4l2object->element, "no buffer pool");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 poll_error:
   {
index 774314f..ef24e71 100644 (file)
@@ -838,7 +838,7 @@ gst_ximage_src_create (GstPushSrc * bs, GstBuffer ** buf)
     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);