[0.11] gst-plugins-good: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS

Wim Taymans wtay at kemper.freedesktop.org
Wed Jan 4 01:02:34 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: 47a1da9076a6124659084497dfb079d64cd5b050
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=47a1da9076a6124659084497dfb079d64cd5b050

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Wed Jan  4 10:01:48 2012 +0100

GST_FLOW_UNEXPECTED -> GST_FLOW_EOS

---

 ext/cairo/gsttextoverlay.c       |    2 +-
 ext/dv/gstdvdemux.c              |    6 +++---
 ext/libpng/gstpngdec.c           |   10 +++++-----
 ext/raw1394/gstdv1394src.c       |    2 +-
 ext/raw1394/gsthdv1394src.c      |    2 +-
 ext/wavpack/gstwavpackparse.c    |   11 +++++------
 gst/imagefreeze/gstimagefreeze.c |    6 +++---
 gst/interleave/interleave.c      |    2 +-
 gst/videomixer/videomixer2.c     |    4 ++--
 9 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/ext/cairo/gsttextoverlay.c b/ext/cairo/gsttextoverlay.c
index 839d9da..7d79f98 100644
--- a/ext/cairo/gsttextoverlay.c
+++ b/ext/cairo/gsttextoverlay.c
@@ -853,7 +853,7 @@ gst_text_overlay_collected (GstCollectPads * pads, gpointer data)
           overlay->text_collect_data);
     }
     gst_pad_push_event (overlay->srcpad, gst_event_new_eos ());
-    ret = GST_FLOW_UNEXPECTED;
+    ret = GST_FLOW_EOS;
     goto done;
   }
 
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 1eef31e..d236c3f 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -1517,7 +1517,7 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
 
   /* check for the end of the segment */
   if (dvdemux->time_segment.stop != -1 && next_ts > dvdemux->time_segment.stop)
-    ret = GST_FLOW_UNEXPECTED;
+    ret = GST_FLOW_EOS;
   else
     ret = GST_FLOW_OK;
 
@@ -1785,7 +1785,7 @@ pause:
     GST_INFO_OBJECT (dvdemux, "pausing task, %s", gst_flow_get_name (ret));
     dvdemux->running = FALSE;
     gst_pad_pause_task (dvdemux->sinkpad);
-    if (ret == GST_FLOW_UNEXPECTED) {
+    if (ret == GST_FLOW_EOS) {
       GST_LOG_OBJECT (dvdemux, "got eos");
       /* perform EOS logic */
       if (dvdemux->time_segment.flags & GST_SEEK_FLAG_SEGMENT) {
@@ -1795,7 +1795,7 @@ pause:
       } else {
         gst_dvdemux_push_event (dvdemux, gst_event_new_eos ());
       }
-    } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
+    } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
       /* for fatal errors or not-linked we post an error message */
       GST_ELEMENT_ERROR (dvdemux, STREAM, FAILED,
           (NULL), ("streaming stopped, reason %s", gst_flow_get_name (ret)));
diff --git a/ext/libpng/gstpngdec.c b/ext/libpng/gstpngdec.c
index 9653100..a67ad1d 100644
--- a/ext/libpng/gstpngdec.c
+++ b/ext/libpng/gstpngdec.c
@@ -336,9 +336,9 @@ pause:
     GST_INFO_OBJECT (pngdec, "pausing task, reason %s",
         gst_flow_get_name (ret));
     gst_pad_pause_task (pngdec->sinkpad);
-    if (ret == GST_FLOW_UNEXPECTED) {
+    if (ret == GST_FLOW_EOS) {
       gst_pad_push_event (pngdec->srcpad, gst_event_new_eos ());
-    } else if (ret < GST_FLOW_UNEXPECTED || ret == GST_FLOW_NOT_LINKED) {
+    } else if (ret < GST_FLOW_EOS || ret == GST_FLOW_NOT_LINKED) {
       GST_ELEMENT_ERROR (pngdec, STREAM, FAILED,
           (_("Internal data stream error.")),
           ("stream stopped, reason %s", gst_flow_get_name (ret)));
@@ -546,9 +546,9 @@ pause:
     GST_INFO_OBJECT (pngdec, "pausing task, reason %s",
         gst_flow_get_name (ret));
     gst_pad_pause_task (pngdec->sinkpad);
-    if (ret == GST_FLOW_UNEXPECTED) {
+    if (ret == GST_FLOW_EOS) {
       gst_pad_push_event (pngdec->srcpad, gst_event_new_eos ());
-    } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
+    } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
       GST_ELEMENT_ERROR (pngdec, STREAM, FAILED,
           (_("Internal data stream error.")),
           ("stream stopped, reason %s", gst_flow_get_name (ret)));
@@ -699,7 +699,7 @@ gst_pngdec_sink_event (GstPad * pad, GstEvent * event)
     {
       GST_LOG_OBJECT (pngdec, "EOS");
       gst_pngdec_libpng_clear (pngdec);
-      pngdec->ret = GST_FLOW_UNEXPECTED;
+      pngdec->ret = GST_FLOW_EOS;
       res = gst_pad_push_event (pngdec->srcpad, event);
       break;
     }
diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c
index a175b62..86b22ec 100644
--- a/ext/raw1394/gstdv1394src.c
+++ b/ext/raw1394/gstdv1394src.c
@@ -720,7 +720,7 @@ gst_dv1394src_create (GstPushSrc * psrc, GstBuffer ** buf)
 error_while_polling:
   {
     GST_ELEMENT_ERROR (dv1394src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
-    return GST_FLOW_UNEXPECTED;
+    return GST_FLOW_EOS;
   }
 told_to_stop:
   {
diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c
index 70b602b..b667891 100644
--- a/ext/raw1394/gsthdv1394src.c
+++ b/ext/raw1394/gsthdv1394src.c
@@ -455,7 +455,7 @@ gst_hdv1394src_create (GstPushSrc * psrc, GstBuffer ** buf)
 error_while_polling:
   {
     GST_ELEMENT_ERROR (dv1394src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
-    return GST_FLOW_UNEXPECTED;
+    return GST_FLOW_EOS;
   }
 told_to_stop:
   {
diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c
index 2d9fac4..50e1df9 100644
--- a/ext/wavpack/gstwavpackparse.c
+++ b/ext/wavpack/gstwavpackparse.c
@@ -801,7 +801,7 @@ gst_wavpack_parse_pull_buffer (GstWavpackParse * wvparse, gint64 offset,
     if (offset + size > wvparse->upstream_length) {
       GST_DEBUG_OBJECT (wvparse, "EOS: %" G_GINT64_FORMAT " + %u > %"
           G_GINT64_FORMAT, offset, size, wvparse->upstream_length);
-      flow_ret = GST_FLOW_UNEXPECTED;
+      flow_ret = GST_FLOW_EOS;
       goto done;
     }
   }
@@ -820,7 +820,7 @@ gst_wavpack_parse_pull_buffer (GstWavpackParse * wvparse, gint64 offset,
         ", got only %u of %u bytes", offset, GST_BUFFER_SIZE (buf), size);
     gst_buffer_unref (buf);
     buf = NULL;
-    flow_ret = GST_FLOW_UNEXPECTED;
+    flow_ret = GST_FLOW_EOS;
   }
 
 done:
@@ -1037,7 +1037,7 @@ gst_wavpack_parse_find_marker (guint8 * buf, guint size)
 static GstFlowReturn
 gst_wavpack_parse_resync_loop (GstWavpackParse * parse, WavpackHeader * header)
 {
-  GstFlowReturn flow_ret = GST_FLOW_UNEXPECTED;
+  GstFlowReturn flow_ret = GST_FLOW_EOS;
 
   GstBuffer *buf = NULL;
 
@@ -1148,7 +1148,7 @@ pause:
     GST_LOG_OBJECT (parse, "pausing task, reason %s", reason);
     gst_pad_pause_task (parse->sinkpad);
 
-    if (flow_ret == GST_FLOW_UNEXPECTED && parse->srcpad) {
+    if (flow_ret == GST_FLOW_EOS && parse->srcpad) {
       if (parse->segment.flags & GST_SEEK_FLAG_SEGMENT) {
         GstClockTime stop;
 
@@ -1164,8 +1164,7 @@ pause:
         GST_LOG_OBJECT (parse, "Sending EOS, at end of stream");
         gst_pad_push_event (parse->srcpad, gst_event_new_eos ());
       }
-    } else if (flow_ret == GST_FLOW_NOT_LINKED
-        || flow_ret < GST_FLOW_UNEXPECTED) {
+    } else if (flow_ret == GST_FLOW_NOT_LINKED || flow_ret < GST_FLOW_EOS) {
       GST_ELEMENT_ERROR (parse, STREAM, FAILED,
           (_("Internal data stream error.")), ("stream stopped, reason %s",
               reason));
diff --git a/gst/imagefreeze/gstimagefreeze.c b/gst/imagefreeze/gstimagefreeze.c
index 3e122ad..f4c67c7 100644
--- a/gst/imagefreeze/gstimagefreeze.c
+++ b/gst/imagefreeze/gstimagefreeze.c
@@ -351,7 +351,7 @@ gst_image_freeze_sink_bufferalloc (GstPad * pad, guint64 offset, guint size,
           gst_flow_get_name (ret));
   } else {
     /* Let upstream go EOS if we already have a buffer */
-    ret = GST_FLOW_UNEXPECTED;
+    ret = GST_FLOW_EOS;
   }
 
   gst_object_unref (self);
@@ -608,7 +608,7 @@ gst_image_freeze_src_event (GstPad * pad, GstEvent * event)
           &stop_type, &stop);
       gst_event_unref (event);
 
-      flush = !!(flags & GST_SEEK_FLAG_FLUSH);
+      flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
 
       if (format != GST_FORMAT_TIME && format != GST_FORMAT_DEFAULT) {
         GST_ERROR_OBJECT (pad, "Seek in invalid format: %s",
@@ -727,7 +727,7 @@ gst_image_freeze_sink_chain (GstPad * pad, GstBuffer * buffer)
     GST_DEBUG_OBJECT (pad, "Already have a buffer, dropping");
     gst_buffer_unref (buffer);
     g_mutex_unlock (self->lock);
-    return GST_FLOW_UNEXPECTED;
+    return GST_FLOW_EOS;
   }
 
   self->buffer = buffer;
diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c
index f5d6004..c2cc2db 100644
--- a/gst/interleave/interleave.c
+++ b/gst/interleave/interleave.c
@@ -1304,6 +1304,6 @@ eos:
     GST_DEBUG_OBJECT (self, "no data available, must be EOS");
     gst_buffer_unref (outbuf);
     gst_pad_push_event (self->src, gst_event_new_eos ());
-    return GST_FLOW_UNEXPECTED;
+    return GST_FLOW_EOS;
   }
 }
diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c
index 4223d70..4595cb8 100644
--- a/gst/videomixer/videomixer2.c
+++ b/gst/videomixer/videomixer2.c
@@ -960,7 +960,7 @@ gst_videomixer2_collected (GstCollectPads2 * pads, GstVideoMixer2 * mix)
   if (output_start_time >= mix->segment.stop) {
     GST_DEBUG_OBJECT (mix, "Segment done");
     gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
-    ret = GST_FLOW_UNEXPECTED;
+    ret = GST_FLOW_EOS;
     goto done;
   }
 
@@ -979,7 +979,7 @@ gst_videomixer2_collected (GstCollectPads2 * pads, GstVideoMixer2 * mix)
   } else if (res == -1) {
     GST_DEBUG_OBJECT (mix, "All sinkpads are EOS -- forwarding");
     gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
-    ret = GST_FLOW_UNEXPECTED;
+    ret = GST_FLOW_EOS;
     goto done;
   } else if (res == -2) {
     GST_ERROR_OBJECT (mix, "Error collecting buffers");



More information about the gstreamer-commits mailing list