summaryrefslogtreecommitdiff
path: root/gst/playback/gstdecodebin.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2007-05-01 18:45:36 +0000
committerTim-Philipp Müller <tim@centricular.net>2007-05-01 18:45:36 +0000
commit997621c9b9c4c6a6a5d41977ee756ae8737b42a1 (patch)
treed900d2be2e926b0899f911e93801bcda0107735d /gst/playback/gstdecodebin.c
parent7033e458ca112eea904064ffd46c45e8502f01b2 (diff)
gst/playback/: Better error message for text files.
Original commit message from CVS: * gst/playback/gstdecodebin.c: (type_found), (plugin_init): * gst/playback/gstdecodebin2.c: (plugin_init): Better error message for text files.
Diffstat (limited to 'gst/playback/gstdecodebin.c')
-rw-r--r--gst/playback/gstdecodebin.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c
index 804d03c89..f3ca71adb 100644
--- a/gst/playback/gstdecodebin.c
+++ b/gst/playback/gstdecodebin.c
@@ -21,6 +21,8 @@
#include "config.h"
#endif
+#include <gst/gst-i18n-plugin.h>
+
#include <string.h>
#include <gst/gst.h>
#include <gst/pbutils/pbutils.h>
@@ -1545,7 +1547,8 @@ type_found (GstElement * typefind, guint probability, GstCaps * caps,
gst_structure_has_name (gst_caps_get_structure (caps, 0), "text/plain")) {
gst_element_no_more_pads (GST_ELEMENT (decode_bin));
/* we can't handle this type of stream */
- GST_ELEMENT_ERROR (decode_bin, STREAM, WRONG_TYPE, (NULL),
+ GST_ELEMENT_ERROR (decode_bin, STREAM, WRONG_TYPE,
+ (_("This appears to be a text file")),
("decodebin cannot decode plain text files"));
goto shutting_down;
}
@@ -1727,6 +1730,12 @@ plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin", 0, "decoder bin");
+#ifdef ENABLE_NLS
+ GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+ LOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif /* ENABLE_NLS */
+
return gst_element_register (plugin, "decodebin", GST_RANK_NONE,
GST_TYPE_DECODE_BIN);
}