mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 14:02:26 +00:00
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.
This commit is contained in:
parent
7033e458ca
commit
997621c9b9
3 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-05-01 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* 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 <wim@fluendo.com>
|
2007-04-29 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_packet_add_rb):
|
* gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_packet_add_rb):
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst-i18n-plugin.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/pbutils/pbutils.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_structure_has_name (gst_caps_get_structure (caps, 0), "text/plain")) {
|
||||||
gst_element_no_more_pads (GST_ELEMENT (decode_bin));
|
gst_element_no_more_pads (GST_ELEMENT (decode_bin));
|
||||||
/* we can't handle this type of stream */
|
/* 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"));
|
("decodebin cannot decode plain text files"));
|
||||||
goto shutting_down;
|
goto shutting_down;
|
||||||
}
|
}
|
||||||
|
@ -1727,6 +1730,12 @@ plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin", 0, "decoder bin");
|
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,
|
return gst_element_register (plugin, "decodebin", GST_RANK_NONE,
|
||||||
GST_TYPE_DECODE_BIN);
|
GST_TYPE_DECODE_BIN);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst-i18n-plugin.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/pbutils/pbutils.h>
|
#include <gst/pbutils/pbutils.h>
|
||||||
|
@ -2113,6 +2115,12 @@ plugin_init (GstPlugin * plugin)
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin2", 0,
|
GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin2", 0,
|
||||||
"decoder bin");
|
"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,
|
return gst_element_register (plugin, "decodebin2", GST_RANK_NONE,
|
||||||
GST_TYPE_DECODE_BIN);
|
GST_TYPE_DECODE_BIN);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue