summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2016-08-19 11:11:03 -0700
committerThibault Saunier <tsaunier@gnome.org>2016-08-26 19:23:26 -0300
commit150edef83078b76890753833235ba4acc3070ad0 (patch)
treec01cecbde1224856de4ec298ee33528584579af0
parentd40f007d61b61712223640af7808a82127d03963 (diff)
Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
-rw-r--r--ext/dv/gstdvdemux.c3
-rw-r--r--ext/gdk_pixbuf/gstgdkpixbufdec.c3
-rw-r--r--gst/avi/gstavidemux.c4
-rw-r--r--gst/debugutils/rndbuffersize.c4
-rw-r--r--gst/flv/gstflvdemux.c4
-rw-r--r--gst/imagefreeze/gstimagefreeze.c4
-rw-r--r--gst/isomp4/qtdemux.c3
-rw-r--r--gst/matroska/matroska-demux.c3
-rw-r--r--gst/matroska/matroska-parse.c3
-rw-r--r--gst/multifile/gstsplitmuxsrc.c5
-rw-r--r--gst/rtsp/gstrtspsrc.c4
-rw-r--r--gst/wavparse/gstwavparse.c4
12 files changed, 12 insertions, 32 deletions
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index ca7491528..06e92978e 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -1892,8 +1892,7 @@ pause:
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
GstEvent *event = gst_event_new_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)));
+ GST_ELEMENT_FLOW_ERROR (dvdemux, ret);
if (dvdemux->segment_seqnum)
gst_event_set_seqnum (event, dvdemux->segment_seqnum);
gst_dvdemux_push_event (dvdemux, event);
diff --git a/ext/gdk_pixbuf/gstgdkpixbufdec.c b/ext/gdk_pixbuf/gstgdkpixbufdec.c
index 735f07951..1598c53be 100644
--- a/ext/gdk_pixbuf/gstgdkpixbufdec.c
+++ b/ext/gdk_pixbuf/gstgdkpixbufdec.c
@@ -417,8 +417,7 @@ gst_gdk_pixbuf_dec_sink_event (GstPad * pad, GstObject * parent,
* things failed */
if (res != GST_FLOW_OK && res != GST_FLOW_FLUSHING
&& res != GST_FLOW_EOS && res != GST_FLOW_NOT_LINKED) {
- GST_ELEMENT_ERROR (pixbuf, STREAM, FAILED, (NULL), ("Flow: %s",
- gst_flow_get_name (res)));
+ GST_ELEMENT_FLOW_ERROR (pixbuf, res);
forward = FALSE;
ret = FALSE;
}
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 1b42b817f..1fe3176f3 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -5695,9 +5695,7 @@ pause:{
/* for fatal errors we post an error message, wrong-state is
* not fatal because it happens due to flushes and only means
* that we should stop now. */
- GST_ELEMENT_ERROR (avi, STREAM, FAILED,
- (_("Internal data stream error.")),
- ("streaming stopped, reason %s", gst_flow_get_name (res)));
+ GST_ELEMENT_FLOW_ERROR (avi, res);
push_eos = TRUE;
}
if (push_eos) {
diff --git a/gst/debugutils/rndbuffersize.c b/gst/debugutils/rndbuffersize.c
index a5f1d69d3..d33a23c7c 100644
--- a/gst/debugutils/rndbuffersize.c
+++ b/gst/debugutils/rndbuffersize.c
@@ -515,9 +515,7 @@ push_failed:
GST_DEBUG_OBJECT (self, "eos");
gst_pad_push_event (self->srcpad, gst_event_new_eos ());
} else if (ret < GST_FLOW_EOS || ret == GST_FLOW_NOT_LINKED) {
- GST_ELEMENT_ERROR (self, STREAM, FAILED,
- ("Internal data stream error."),
- ("streaming stopped, reason: %s", gst_flow_get_name (ret)));
+ GST_ELEMENT_FLOW_ERROR (self, ret);
}
goto pause_task;
}
diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c
index 2593be872..e324b18fc 100644
--- a/gst/flv/gstflvdemux.c
+++ b/gst/flv/gstflvdemux.c
@@ -2729,9 +2729,7 @@ pause:
GST_WARNING_OBJECT (demux, "failed pushing EOS on streams");
}
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
- GST_ELEMENT_ERROR (demux, STREAM, FAILED,
- ("Internal data stream error."),
- ("stream stopped, reason %s", reason));
+ GST_ELEMENT_FLOW_ERROR (demux, ret);
gst_flv_demux_push_src_event (demux, gst_event_new_eos ());
}
gst_object_unref (demux);
diff --git a/gst/imagefreeze/gstimagefreeze.c b/gst/imagefreeze/gstimagefreeze.c
index 42a14e60f..f122645f1 100644
--- a/gst/imagefreeze/gstimagefreeze.c
+++ b/gst/imagefreeze/gstimagefreeze.c
@@ -846,9 +846,7 @@ pause_task:
} else if (flow_ret == GST_FLOW_NOT_LINKED || flow_ret < GST_FLOW_EOS) {
GstEvent *e = gst_event_new_eos ();
- GST_ELEMENT_ERROR (self, STREAM, FAILED,
- ("Internal data stream error."),
- ("stream stopped, reason %s", reason));
+ GST_ELEMENT_FLOW_ERROR (self, flow_ret);
if (self->seqnum)
gst_event_set_seqnum (e, self->seqnum);
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 93a1714d5..9768cc976 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -5766,8 +5766,7 @@ pause:
gst_qtdemux_push_event (qtdemux, event);
}
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
- GST_ELEMENT_ERROR (qtdemux, STREAM, FAILED,
- (NULL), ("streaming stopped, reason %s", reason));
+ GST_ELEMENT_FLOW_ERROR (qtdemux, ret);
gst_qtdemux_push_event (qtdemux, gst_event_new_eos ());
}
goto done;
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index ccfa04d9a..bceda520e 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -4756,8 +4756,7 @@ pause:
}
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors we post an error message */
- GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
- ("stream stopped, reason %s", reason));
+ GST_ELEMENT_FLOW_ERROR (demux, ret);
push_eos = TRUE;
}
if (push_eos) {
diff --git a/gst/matroska/matroska-parse.c b/gst/matroska/matroska-parse.c
index cc064b0c5..97c57e74c 100644
--- a/gst/matroska/matroska-parse.c
+++ b/gst/matroska/matroska-parse.c
@@ -2920,8 +2920,7 @@ pause:
}
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors we post an error message */
- GST_ELEMENT_ERROR (parse, STREAM, FAILED, (NULL),
- ("stream stopped, reason %s", reason));
+ GST_ELEMENT_FLOW_ERROR (parse, ret);
push_eos = TRUE;
}
if (push_eos) {
diff --git a/gst/multifile/gstsplitmuxsrc.c b/gst/multifile/gstsplitmuxsrc.c
index a37433baa..b710ca656 100644
--- a/gst/multifile/gstsplitmuxsrc.c
+++ b/gst/multifile/gstsplitmuxsrc.c
@@ -549,10 +549,7 @@ gst_splitmux_pad_loop (GstPad * pad)
GST_INFO_OBJECT (splitpad, "Stopping due to pad_push() result %d", ret);
gst_pad_pause_task (pad);
if (ret < GST_FLOW_EOS) {
- const gchar *reason = gst_flow_get_name (ret);
- GST_ELEMENT_ERROR (splitmux, STREAM, FAILED,
- (_("Internal data flow error.")),
- ("streaming task paused, reason %s (%d)", reason, ret));
+ GST_ELEMENT_FLOW_ERROR (splitmux, ret);
}
}
}
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index a080090a1..52fd7379d 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -5119,9 +5119,7 @@ pause:
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors we post an error message, post the error before the
* EOS so the app knows about the error first. */
- GST_ELEMENT_ERROR (src, STREAM, FAILED,
- ("Internal data flow error."),
- ("streaming task paused, reason %s (%d)", reason, ret));
+ GST_ELEMENT_FLOW_ERROR (src, ret);
gst_rtspsrc_push_event (src, gst_event_new_eos ());
}
gst_rtspsrc_loop_send_cmd (src, CMD_WAIT, CMD_LOOP);
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 82294d054..6650d183b 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -2246,9 +2246,7 @@ pause:
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors we post an error message, post the error
* first so the app knows about the error first. */
- GST_ELEMENT_ERROR (wav, STREAM, FAILED,
- (_("Internal data flow error.")),
- ("streaming task paused, reason %s (%d)", reason, ret));
+ GST_ELEMENT_FLOW_ERROR (wav, ret);
gst_pad_push_event (wav->srcpad, gst_event_new_eos ());
}
return;