uridecodebin: Post a missing plugin message additional to the error message on unknown types

Fixes bug #591677.
This commit is contained in:
Sebastian Dröge 2009-08-13 15:48:00 +02:00
parent 4871cd9254
commit 504f8dc9c7

View file

@ -32,6 +32,8 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/gst-i18n-plugin.h> #include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/missing-plugins.h>
#include "gstfactorylists.h" #include "gstfactorylists.h"
#include "gstplay-marshal.h" #include "gstplay-marshal.h"
#include "gstplay-enum.h" #include "gstplay-enum.h"
@ -619,8 +621,12 @@ static void
unknown_type_cb (GstElement * element, GstPad * pad, GstCaps * caps, unknown_type_cb (GstElement * element, GstPad * pad, GstCaps * caps,
GstURIDecodeBin * decoder) GstURIDecodeBin * decoder)
{ {
GstMessage *msg;
gchar *capsstr; gchar *capsstr;
msg = gst_missing_decoder_message_new (GST_ELEMENT_CAST (decoder), caps);
gst_element_post_message (GST_ELEMENT_CAST (decoder), msg);
capsstr = gst_caps_to_string (caps); capsstr = gst_caps_to_string (caps);
GST_ELEMENT_WARNING (decoder, STREAM, WRONG_TYPE, GST_ELEMENT_WARNING (decoder, STREAM, WRONG_TYPE,
(_("No decoder available for type \'%s\'."), capsstr), (NULL)); (_("No decoder available for type \'%s\'."), capsstr), (NULL));