} 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);
* 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;
}
/* 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) {
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;
}
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);
} 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);
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;
}
} 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) {
}
} 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) {
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);
}
}
}
} 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);
} 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;