From 997621c9b9c4c6a6a5d41977ee756ae8737b42a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 1 May 2007 18:45:36 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ gst/playback/gstdecodebin.c | 11 ++++++++++- gst/playback/gstdecodebin2.c | 8 ++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f63f2a1..f2ec139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-01 Tim-Philipp Müller + + * gst/playback/gstdecodebin.c: (type_found), (plugin_init): + * gst/playback/gstdecodebin2.c: (plugin_init): + Better error message for text files. + 2007-04-29 Wim Taymans * gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_packet_add_rb): diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 804d03c..f3ca71a 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -21,6 +21,8 @@ #include "config.h" #endif +#include + #include #include #include @@ -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); } diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 5d9420a..383a86c 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -36,6 +36,8 @@ #include "config.h" #endif +#include + #include #include #include @@ -2113,6 +2115,12 @@ plugin_init (GstPlugin * plugin) GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin2", 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, "decodebin2", GST_RANK_NONE, GST_TYPE_DECODE_BIN); } -- 2.7.4