remove prematurely added error category and clean up the instances

Original commit message from CVS:
remove prematurely added error category and clean up the instances
This commit is contained in:
Thomas Vander Stichele 2005-10-23 09:08:44 +00:00
parent 62cfdde715
commit 013e3acc3d
10 changed files with 43 additions and 29 deletions

View file

@ -1,3 +1,13 @@
2005-10-23 Thomas Vander Stichele <thomas at apestaart dot org>
* 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 <wim@fluendo.com>
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),

View file

@ -42,6 +42,7 @@
#include "gstbasesink.h"
#include <gst/gstmarshal.h>
#include <gst/gst-i18n-lib.h>
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 */

View file

@ -50,6 +50,7 @@
#include "gstbasesrc.h"
#include "gsttypefindhelper.h"
#include <gst/gstmarshal.h>
#include <gst/gst-i18n-lib.h>
#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;

View file

@ -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;

View file

@ -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;

View file

@ -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 ());
}

View file

@ -42,6 +42,7 @@
#include "gstbasesink.h"
#include <gst/gstmarshal.h>
#include <gst/gst-i18n-lib.h>
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 */

View file

@ -50,6 +50,7 @@
#include "gstbasesrc.h"
#include "gsttypefindhelper.h"
#include <gst/gstmarshal.h>
#include <gst/gst-i18n-lib.h>
#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;

View file

@ -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 ());
}

View file

@ -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