mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
Make use of the new GST_ELEMENT_FLOW_ERROR API all around.
https://bugzilla.gnome.org/show_bug.cgi?id=770158
This commit is contained in:
parent
da73b89200
commit
4714ef2f8e
8 changed files with 11 additions and 37 deletions
|
@ -3605,8 +3605,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 (parse, STREAM, FAILED, (NULL),
|
||||
("streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||
GST_ELEMENT_FLOW_ERROR (parse, ret);
|
||||
push_eos = TRUE;
|
||||
}
|
||||
if (push_eos) {
|
||||
|
|
|
@ -4090,9 +4090,7 @@ paused:
|
|||
* flushing and posting an error message in that case is the
|
||||
* wrong thing to do, e.g. when basesrc is doing a flushing
|
||||
* seek. */
|
||||
GST_ELEMENT_ERROR (basesink, STREAM, FAILED,
|
||||
(_("Internal data stream error.")),
|
||||
("stream stopped, reason %s", gst_flow_get_name (result)));
|
||||
GST_ELEMENT_FLOW_ERROR (basesink, result);
|
||||
gst_base_sink_event (pad, parent, gst_event_new_eos ());
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -2947,9 +2947,7 @@ pause:
|
|||
* due to flushing and posting an error message because of
|
||||
* that is the wrong thing to do, e.g. when we're doing
|
||||
* a flushing seek. */
|
||||
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_pad_push_event (pad, event);
|
||||
}
|
||||
goto done;
|
||||
|
|
|
@ -1345,10 +1345,7 @@ out_flushing:
|
|||
* file. */
|
||||
gst_pad_push_event (dlbuf->srcpad, gst_event_new_eos ());
|
||||
} else if ((ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS)) {
|
||||
GST_ELEMENT_ERROR (dlbuf, STREAM, FAILED,
|
||||
(_("Internal data flow error.")),
|
||||
("streaming task paused, reason %s (%d)",
|
||||
gst_flow_get_name (ret), ret));
|
||||
GST_ELEMENT_FLOW_ERROR (dlbuf, ret);
|
||||
gst_pad_push_event (dlbuf->srcpad, gst_event_new_eos ());
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -1921,9 +1921,7 @@ out_flushing:
|
|||
* error upstream */
|
||||
if (sq->is_eos && sq->srcresult < GST_FLOW_EOS) {
|
||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
GST_ELEMENT_ERROR (mq, STREAM, FAILED,
|
||||
("Internal data stream error."),
|
||||
("streaming stopped, reason %s", gst_flow_get_name (sq->srcresult)));
|
||||
GST_ELEMENT_FLOW_ERROR (mq, sq->srcresult);
|
||||
} else {
|
||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
}
|
||||
|
@ -2204,10 +2202,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
* error upstream */
|
||||
if (sq->srcresult < GST_FLOW_EOS) {
|
||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
GST_ELEMENT_ERROR (mq, STREAM, FAILED,
|
||||
("Internal data stream error."),
|
||||
("streaming stopped, reason %s",
|
||||
gst_flow_get_name (sq->srcresult)));
|
||||
GST_ELEMENT_FLOW_ERROR (mq, sq->srcresult);
|
||||
} else {
|
||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
}
|
||||
|
|
|
@ -986,10 +986,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
if (queue->srcresult == GST_FLOW_NOT_LINKED
|
||||
|| queue->srcresult < GST_FLOW_EOS) {
|
||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
|
||||
(_("Internal data flow error.")),
|
||||
("streaming task paused, reason %s (%d)",
|
||||
gst_flow_get_name (queue->srcresult), queue->srcresult));
|
||||
GST_ELEMENT_FLOW_ERROR (queue, queue->srcresult);
|
||||
} else {
|
||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||
}
|
||||
|
@ -1535,10 +1532,7 @@ out_flushing:
|
|||
/* let app know about us giving up if upstream is not expected to do so */
|
||||
/* EOS is already taken care of elsewhere */
|
||||
if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS)) {
|
||||
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
|
||||
(_("Internal data flow error.")),
|
||||
("streaming task paused, reason %s (%d)",
|
||||
gst_flow_get_name (ret), ret));
|
||||
GST_ELEMENT_FLOW_ERROR (queue, ret);
|
||||
gst_pad_push_event (queue->srcpad, gst_event_new_eos ());
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -2567,10 +2567,7 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
|||
} else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||
if (queue->srcresult == GST_FLOW_NOT_LINKED
|
||||
|| queue->srcresult < GST_FLOW_EOS) {
|
||||
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
|
||||
(_("Internal data flow error.")),
|
||||
("streaming task paused, reason %s (%d)",
|
||||
gst_flow_get_name (queue->srcresult), queue->srcresult));
|
||||
GST_ELEMENT_FLOW_ERROR (queue, queue->srcresult);
|
||||
}
|
||||
goto out_flow_error;
|
||||
}
|
||||
|
@ -3059,10 +3056,7 @@ out_flushing:
|
|||
/* let app know about us giving up if upstream is not expected to do so */
|
||||
/* EOS is already taken care of elsewhere */
|
||||
if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS)) {
|
||||
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
|
||||
(_("Internal data flow error.")),
|
||||
("streaming task paused, reason %s (%d)",
|
||||
gst_flow_get_name (ret), ret));
|
||||
GST_ELEMENT_FLOW_ERROR (queue, ret);
|
||||
gst_pad_push_event (queue->srcpad, gst_event_new_eos ());
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -1216,8 +1216,7 @@ pause:
|
|||
}
|
||||
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
|
||||
/* for fatal errors we post an error message */
|
||||
GST_ELEMENT_ERROR (typefind, STREAM, FAILED, (NULL),
|
||||
("stream stopped, reason %s", reason));
|
||||
GST_ELEMENT_FLOW_ERROR (typefind, ret);
|
||||
push_eos = TRUE;
|
||||
}
|
||||
if (push_eos) {
|
||||
|
|
Loading…
Reference in a new issue