+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):
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:
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")) {
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;