fix up error domains, error strings, and use of translation

Original commit message from CVS:
2006-01-20  Thomas Vander Stichele  <thomas at apestaart dot org>

* ext/dvdnav/dvdnavsrc.c: (if):
* ext/dvdread/stream_labels.c:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_segment):
* gst/realmedia/rmdemux.c: (gst_rmdemux_loop):
fix up error domains, error strings, and use of translation
* po/POTFILES.in:
fix up this file, even though none of them are actually marked
for build yet.
This commit is contained in:
Thomas Vander Stichele 2006-01-20 14:18:20 +00:00
parent b34e7d995b
commit e8805d7869
6 changed files with 29 additions and 14 deletions

View file

@ -1,3 +1,14 @@
2006-01-20 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/dvdnav/dvdnavsrc.c: (if):
* ext/dvdread/stream_labels.c:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_segment):
* gst/realmedia/rmdemux.c: (gst_rmdemux_loop):
fix up error domains, error strings, and use of translation
* po/POTFILES.in:
fix up this file, even though none of them are actually marked
for build yet.
2006-01-19 Martin Soto <martinsoto@users.sourceforge.net> 2006-01-19 Martin Soto <martinsoto@users.sourceforge.net>
* gst/mpegstream/gstmpegparse.h (struct _GstMPEGParse): * gst/mpegstream/gstmpegparse.h (struct _GstMPEGParse):

View file

@ -53,11 +53,10 @@ GST_DEBUG_CATEGORY_STATIC (dvdnavsrc_debug);
#define DVDNAV_RAWCALL(func, params, elem, action) \ #define DVDNAV_RAWCALL(func, params, elem, action) \
if (func params != DVDNAV_STATUS_OK) { \ if (func params != DVDNAV_STATUS_OK) { \
GST_ELEMENT_ERROR (elem, LIBRARY, FAILED, \ GST_ELEMENT_ERROR (elem, LIBRARY, FAILED, \
(_("Error invoking \"%s\": %s."), \ (_("Library call failed.")), \
#func, dvdnav_err_to_string ((elem)->dvdnav)), \ ("Error invoking \"%s\": %s.", \
GST_ERROR_SYSTEM); \ #func, dvdnav_err_to_string ((elem)->dvdnav)));
action \ action}
}
/* Call a dvdnav function and, it it fails, report an error and return /* Call a dvdnav function and, it it fails, report an error and return
from the current procedure. */ from the current procedure. */
@ -1527,7 +1526,7 @@ dvdnavsrc_open (DVDNavSrc * src)
g_return_val_if_fail (src->location != NULL, FALSE); g_return_val_if_fail (src->location != NULL, FALSE);
if (dvdnav_open (&src->dvdnav, (char *) src->location) != DVDNAV_STATUS_OK) { if (dvdnav_open (&src->dvdnav, (char *) src->location) != DVDNAV_STATUS_OK) {
GST_ELEMENT_ERROR (src, LIBRARY, FAILED, GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Failed to open DVD device '%s'."), src->location), (_("Failed to open DVD device '%s'."), src->location),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;

View file

@ -23,7 +23,7 @@
#include "dvdreadsrc.h" #include "dvdreadsrc.h"
#include "stream_labels.h" #include "stream_labels.h"
#include "gst/gst-i18n-plugin.h" #include <gst/gst-i18n-plugin.h>
GHashTable * GHashTable *
dvdreadsrc_init_languagelist (void) dvdreadsrc_init_languagelist (void)

View file

@ -26,6 +26,8 @@
#include <gst/riff/riff-media.h> #include <gst/riff/riff-media.h>
#include <string.h> #include <string.h>
#include <gst/gst-i18n-plugin.h>
#include "gstasfdemux.h" #include "gstasfdemux.h"
#include "asfheaders.h" #include "asfheaders.h"
@ -928,8 +930,8 @@ gst_asf_demux_process_segment (GstASFDemux * asf_demux,
if (segment_info.chunk_size < frag_size) if (segment_info.chunk_size < frag_size)
frag_size -= segment_info.chunk_size + 1; frag_size -= segment_info.chunk_size + 1;
else { else {
GST_ELEMENT_ERROR (asf_demux, STREAM, TOO_LAZY, GST_ELEMENT_ERROR (asf_demux, STREAM, DEMUX,
("Invalid data in stream"), (_("Invalid data in stream")),
("Invalid fragment size indicator in segment")); ("Invalid fragment size indicator in segment"));
return FALSE; return FALSE;
} }

View file

@ -876,11 +876,9 @@ need_pause:
gst_pad_pause_task (pad); gst_pad_pause_task (pad);
if (GST_FLOW_IS_FATAL (ret)) { if (GST_FLOW_IS_FATAL (ret)) {
gst_rmdemux_send_event (rmdemux, gst_event_new_eos ()); gst_rmdemux_send_event (rmdemux, gst_event_new_eos ());
/* FIXME: add translations */
if (ret != GST_FLOW_UNEXPECTED) { if (ret != GST_FLOW_UNEXPECTED) {
GST_ELEMENT_ERROR (rmdemux, STREAM, FAILED, GST_ELEMENT_ERROR (rmdemux, CORE, EVENT, (NULL),
(("Internal data stream error.")), ("gst_rmdemux_send_event() failed with return value %d", ret));
("stream stopped, reason %d", ret));
} }
} }
return; return;

View file

@ -1 +1,6 @@
gst/realmedia/rmdemux.c # not activated yet:
# ext/dvdread/stream_labels.c
# ext/dvdnav/dvdnavsrc.c
# not activated yet:
# gst/asfdemux/gstasfdemux.c