diff --git a/ChangeLog b/ChangeLog index c0bd284afe..9830b8f8fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-10-23 Thomas Vander Stichele + + * gst/base/gstbasesink.c: (gst_base_sink_handle_object): + * gst/base/gstbasesrc.c: (gst_base_src_loop): + * gst/gsterror.c: (_gst_stream_errors_init): + * gst/gsterror.h: + * gst/gstqueue.c: (gst_queue_loop): + * po/POTFILES.in: + remove prematurely added error category and clean up the instances + 2005-10-21 Wim Taymans * gst/base/gstbasesink.c: (gst_base_sink_commit_state), diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index f29ac6f5f4..ccbe5701d9 100644 --- a/gst/base/gstbasesink.c +++ b/gst/base/gstbasesink.c @@ -42,6 +42,7 @@ #include "gstbasesink.h" #include +#include GST_DEBUG_CATEGORY_STATIC (gst_base_sink_debug); #define GST_CAT_DEFAULT gst_base_sink_debug @@ -622,8 +623,8 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, GstBuffer *buf = GST_BUFFER (obj); if (!basesink->have_newsegment) { - GST_ELEMENT_WARNING (basesink, STREAM, STOPPED, - ("Received buffer without a new-segment. Cannot sync to clock."), + GST_ELEMENT_WARNING (basesink, STREAM, FAILED, + (_("Internal data flow problem.")), ("Received buffer without a new-segment. Cannot sync to clock.")); basesink->have_newsegment = TRUE; /* this means this sink will not be able to sync to the clock */ diff --git a/gst/base/gstbasesrc.c b/gst/base/gstbasesrc.c index 7f035a0041..7abdfab45e 100644 --- a/gst/base/gstbasesrc.c +++ b/gst/base/gstbasesrc.c @@ -50,6 +50,7 @@ #include "gstbasesrc.h" #include "gsttypefindhelper.h" #include +#include #define DEFAULT_BLOCKSIZE 4096 #define DEFAULT_NUM_BUFFERS -1 @@ -768,18 +769,17 @@ pause: gst_pad_pause_task (pad); if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { /* for fatal errors we post an error message */ - GST_ELEMENT_ERROR (src, STREAM, STOPPED, - ("streaming stopped, reason %s", gst_flow_get_name (ret)), - ("streaming stopped, reason %s", gst_flow_get_name (ret))); + GST_ELEMENT_ERROR (src, STREAM, FAILED, + (_("Internal data flow error.")), + ("streaming task paused, reason %s", gst_flow_get_name (ret))); gst_pad_push_event (pad, gst_event_new_eos ()); } return; } error: { - GST_ELEMENT_ERROR (src, STREAM, STOPPED, - ("internal: element returned NULL buffer"), - ("internal: element returned NULL buffer")); + GST_ELEMENT_ERROR (src, STREAM, FAILED, + (_("Internal data flow error.")), ("element returned NULL buffer")); gst_pad_pause_task (pad); gst_pad_push_event (pad, gst_event_new_eos ()); return; diff --git a/gst/gsterror.c b/gst/gsterror.c index 3b5d7f2f30..8820569e03 100644 --- a/gst/gsterror.c +++ b/gst/gsterror.c @@ -161,16 +161,14 @@ _gst_stream_errors_init (void) TABLE (t, STREAM, ENCODE, N_("Could not encode stream.")); TABLE (t, STREAM, DEMUX, N_("Could not demultiplex stream.")); TABLE (t, STREAM, MUX, N_("Could not multiplex stream.")); - TABLE (t, STREAM, FORMAT, N_("Stream is of the wrong format.")); - TABLE (t, STREAM, STOPPED, N_("Streaming stopped.")); return t; } -QUARK_FUNC (core) - QUARK_FUNC (library) - QUARK_FUNC (resource) - QUARK_FUNC (stream) +QUARK_FUNC (core); +QUARK_FUNC (library); +QUARK_FUNC (resource); +QUARK_FUNC (stream); /** * gst_error_get_message: @@ -182,7 +180,8 @@ QUARK_FUNC (core) * Returns: a newly allocated string describing the error message in the * current locale. */ - gchar *gst_error_get_message (GQuark domain, gint code) +gchar * +gst_error_get_message (GQuark domain, gint code) { static gchar **gst_core_errors = NULL; static gchar **gst_library_errors = NULL; diff --git a/gst/gsterror.h b/gst/gsterror.h index e22c35df08..41bd476c24 100644 --- a/gst/gsterror.h +++ b/gst/gsterror.h @@ -161,7 +161,6 @@ typedef enum * @GST_STREAM_ERROR_MUX: used when muxing fails. * @GST_STREAM_ERROR_FORMAT: used when the stream is of the wrong format * (for example, wrong caps). - * @GST_STREAM_ERROR_STOPPED: Streaming stopped. * @GST_STREAM_ERROR_NUM_ERRORS: the number of library error types. * * Stream errors are for anything related to the stream being processed: @@ -181,7 +180,6 @@ typedef enum GST_STREAM_ERROR_DEMUX, GST_STREAM_ERROR_MUX, GST_STREAM_ERROR_FORMAT, - GST_STREAM_ERROR_STOPPED, GST_STREAM_ERROR_NUM_ERRORS } GstStreamError; diff --git a/gst/gstqueue.c b/gst/gstqueue.c index 747c8905a0..6387bcf818 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -44,6 +44,7 @@ #include "gstinfo.h" #include "gsterror.h" #include "gstutils.h" +#include "gst-i18n-lib.h" static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -819,8 +820,8 @@ restart: queue->srcresult = result; if (GST_FLOW_IS_FATAL (result)) { - GST_ELEMENT_ERROR (queue, STREAM, STOPPED, - ("streaming stopped, reason %s", flowname), + GST_ELEMENT_ERROR (queue, STREAM, FAILED, + (_("Internal data flow error.")), ("streaming stopped, reason %s", flowname)); gst_pad_push_event (queue->srcpad, gst_event_new_eos ()); } diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index f29ac6f5f4..ccbe5701d9 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -42,6 +42,7 @@ #include "gstbasesink.h" #include +#include GST_DEBUG_CATEGORY_STATIC (gst_base_sink_debug); #define GST_CAT_DEFAULT gst_base_sink_debug @@ -622,8 +623,8 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, GstBuffer *buf = GST_BUFFER (obj); if (!basesink->have_newsegment) { - GST_ELEMENT_WARNING (basesink, STREAM, STOPPED, - ("Received buffer without a new-segment. Cannot sync to clock."), + GST_ELEMENT_WARNING (basesink, STREAM, FAILED, + (_("Internal data flow problem.")), ("Received buffer without a new-segment. Cannot sync to clock.")); basesink->have_newsegment = TRUE; /* this means this sink will not be able to sync to the clock */ diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 7f035a0041..7abdfab45e 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -50,6 +50,7 @@ #include "gstbasesrc.h" #include "gsttypefindhelper.h" #include +#include #define DEFAULT_BLOCKSIZE 4096 #define DEFAULT_NUM_BUFFERS -1 @@ -768,18 +769,17 @@ pause: gst_pad_pause_task (pad); if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { /* for fatal errors we post an error message */ - GST_ELEMENT_ERROR (src, STREAM, STOPPED, - ("streaming stopped, reason %s", gst_flow_get_name (ret)), - ("streaming stopped, reason %s", gst_flow_get_name (ret))); + GST_ELEMENT_ERROR (src, STREAM, FAILED, + (_("Internal data flow error.")), + ("streaming task paused, reason %s", gst_flow_get_name (ret))); gst_pad_push_event (pad, gst_event_new_eos ()); } return; } error: { - GST_ELEMENT_ERROR (src, STREAM, STOPPED, - ("internal: element returned NULL buffer"), - ("internal: element returned NULL buffer")); + GST_ELEMENT_ERROR (src, STREAM, FAILED, + (_("Internal data flow error.")), ("element returned NULL buffer")); gst_pad_pause_task (pad); gst_pad_push_event (pad, gst_event_new_eos ()); return; diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 747c8905a0..6387bcf818 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -44,6 +44,7 @@ #include "gstinfo.h" #include "gsterror.h" #include "gstutils.h" +#include "gst-i18n-lib.h" static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -819,8 +820,8 @@ restart: queue->srcresult = result; if (GST_FLOW_IS_FATAL (result)) { - GST_ELEMENT_ERROR (queue, STREAM, STOPPED, - ("streaming stopped, reason %s", flowname), + GST_ELEMENT_ERROR (queue, STREAM, FAILED, + (_("Internal data flow error.")), ("streaming stopped, reason %s", flowname)); gst_pad_push_event (queue->srcpad, gst_event_new_eos ()); } diff --git a/po/POTFILES.in b/po/POTFILES.in index 32decbe54a..ca9c254ab6 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -3,7 +3,10 @@ gst/gst.c gst/gstelement.c gst/gsterror.c +gst/gstqueue.c gst/gsttaglist.c +gst/base/gstbasesrc.c +gst/base/gstbasesink.c gst/elements/gstfakesink.c gst/elements/gstfilesink.c gst/elements/gstfilesrc.c