mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/playback/: Post nice/more useful error message if we don't have a decoder for the primary type.
Original commit message from CVS: * gst/playback/gstdecodebin.c: (close_pad_link), (type_found): * gst/playback/gstdecodebin2.c: (analyze_new_pad): Post nice/more useful error message if we don't have a decoder for the primary type.
This commit is contained in:
parent
b55c61c933
commit
4c0e44de0f
3 changed files with 33 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-10-30 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/playback/gstdecodebin.c: (close_pad_link), (type_found):
|
||||
* gst/playback/gstdecodebin2.c: (analyze_new_pad):
|
||||
Post nice/more useful error message if we don't have a decoder for
|
||||
the primary type.
|
||||
|
||||
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
||||
|
||||
* gst/playback/gstdecodebin2.c: (gst_decode_group_expose):
|
||||
|
|
|
@ -780,6 +780,19 @@ unknown_type:
|
|||
|
||||
gst_element_post_message (GST_ELEMENT_CAST (decode_bin),
|
||||
gst_missing_decoder_message_new (GST_ELEMENT_CAST (decode_bin), caps));
|
||||
|
||||
if (element == decode_bin->typefind) {
|
||||
gchar *desc;
|
||||
|
||||
desc = gst_pb_utils_get_decoder_description (caps);
|
||||
GST_ELEMENT_ERROR (decode_bin, STREAM, CODEC_NOT_FOUND,
|
||||
(_("A %s plugin is required to play this stream, but not installed."),
|
||||
desc),
|
||||
("No decoder to handle media type '%s'",
|
||||
gst_structure_get_name (gst_caps_get_structure (caps, 0))));
|
||||
g_free (desc);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
dont_know_yet:
|
||||
|
@ -1558,7 +1571,7 @@ type_found (GstElement * typefind, guint probability, GstCaps * caps,
|
|||
decode_bin->have_type = TRUE;
|
||||
|
||||
/* special-case text/plain: we only want to accept it as a raw type if it
|
||||
* comes from a subtitel parser element or a demuxer, but not if it is the
|
||||
* comes from a subtitle parser element or a demuxer, but not if it is the
|
||||
* type of the entire stream, in which case we just want to error out */
|
||||
if (typefind == decode_bin->typefind &&
|
||||
gst_structure_has_name (gst_caps_get_structure (caps, 0), "text/plain")) {
|
||||
|
|
|
@ -902,6 +902,18 @@ unknown_type:
|
|||
if (dbin->groups == NULL)
|
||||
remove_fakesink (dbin);
|
||||
|
||||
if (src == dbin->typefind) {
|
||||
gchar *desc;
|
||||
|
||||
desc = gst_pb_utils_get_decoder_description (caps);
|
||||
GST_ELEMENT_ERROR (dbin, STREAM, CODEC_NOT_FOUND,
|
||||
(_("A %s plugin is required to play this stream, but not installed."),
|
||||
desc),
|
||||
("No decoder to handle media type '%s'",
|
||||
gst_structure_get_name (gst_caps_get_structure (caps, 0))));
|
||||
g_free (desc);
|
||||
}
|
||||
|
||||
gst_element_post_message (GST_ELEMENT_CAST (dbin),
|
||||
gst_missing_decoder_message_new (GST_ELEMENT_CAST (dbin), caps));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue