mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
When driving the pipeline, also post an error when we get a not-linked flow return from downstream.
Original commit message from CVS: * ext/timidity/gsttimidity.c: (gst_timidity_loop): * ext/timidity/gstwildmidi.c: (gst_wildmidi_loop): * gst/tta/gstttaparse.c: (gst_tta_parse_loop): When driving the pipeline, also post an error when we get a not-linked flow return from downstream.
This commit is contained in:
parent
5210165feb
commit
0f7d9f156a
4 changed files with 44 additions and 21 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-06-08 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* ext/timidity/gsttimidity.c: (gst_timidity_loop):
|
||||
* ext/timidity/gstwildmidi.c: (gst_wildmidi_loop):
|
||||
* gst/tta/gstttaparse.c: (gst_tta_parse_loop):
|
||||
When driving the pipeline, also post an error when we get a
|
||||
not-linked flow return from downstream.
|
||||
|
||||
2007-06-08 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* docs/plugins/gst-plugins-bad-plugins.args:
|
||||
|
|
|
@ -697,18 +697,25 @@ gst_timidity_loop (GstPad * sinkpad)
|
|||
gst_buffer_set_caps (out, timidity->out_caps);
|
||||
ret = gst_pad_push (timidity->srcpad, out);
|
||||
|
||||
if (ret == GST_FLOW_OK)
|
||||
return;
|
||||
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED)
|
||||
goto error;
|
||||
|
||||
if (GST_FLOW_IS_FATAL (ret)) {
|
||||
GST_ELEMENT_ERROR (timidity, STREAM, FAILED,
|
||||
("Internal data stream error XXX"),
|
||||
("Streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||
}
|
||||
return;
|
||||
|
||||
paused:
|
||||
GST_LOG_OBJECT (timidity, "pausing task");
|
||||
gst_pad_pause_task (timidity->sinkpad);
|
||||
{
|
||||
GST_DEBUG_OBJECT (timidity, "pausing task");
|
||||
gst_pad_pause_task (timidity->sinkpad);
|
||||
return;
|
||||
}
|
||||
error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (timidity, STREAM, FAILED,
|
||||
("Internal data stream error"),
|
||||
("Streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||
gst_pad_push_event (timidity->srcpad, gst_event_new_eos ());
|
||||
goto paused;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
|
@ -672,18 +672,25 @@ gst_wildmidi_loop (GstPad * sinkpad)
|
|||
gst_buffer_set_caps (out, wildmidi->out_caps);
|
||||
ret = gst_pad_push (wildmidi->srcpad, out);
|
||||
|
||||
if (ret == GST_FLOW_OK)
|
||||
return;
|
||||
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED)
|
||||
goto error;
|
||||
|
||||
if (GST_FLOW_IS_FATAL (ret)) {
|
||||
GST_ELEMENT_ERROR (wildmidi, STREAM, FAILED,
|
||||
("Internal data stream error XXX"),
|
||||
("Streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||
}
|
||||
return;
|
||||
|
||||
paused:
|
||||
GST_LOG_OBJECT (wildmidi, "pausing task");
|
||||
gst_pad_pause_task (wildmidi->sinkpad);
|
||||
{
|
||||
GST_DEBUG_OBJECT (wildmidi, "pausing task");
|
||||
gst_pad_pause_task (wildmidi->sinkpad);
|
||||
return;
|
||||
}
|
||||
error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (wildmidi, STREAM, FAILED,
|
||||
("Internal data stream error"),
|
||||
("Streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||
gst_pad_push_event (wildmidi->srcpad, gst_event_new_eos ());
|
||||
goto paused;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
|
@ -464,11 +464,12 @@ gst_tta_parse_loop (GstTtaParse * ttaparse)
|
|||
return;
|
||||
|
||||
pause:
|
||||
GST_LOG_OBJECT (ttaparse, "pausing task %d", ret);
|
||||
GST_LOG_OBJECT (ttaparse, "pausing task, %s", gst_flow_get_name (ret));
|
||||
gst_pad_pause_task (ttaparse->sinkpad);
|
||||
if (GST_FLOW_IS_FATAL (ret)) {
|
||||
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
|
||||
GST_ELEMENT_ERROR (ttaparse, STREAM, FAILED,
|
||||
("Internal data stream error."), ("streaming stopped, reason %d", ret));
|
||||
("Internal data stream error."),
|
||||
("streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||
gst_pad_push_event (ttaparse->srcpad, gst_event_new_eos ());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue