diff --git a/ext/resindvd/Makefile.am b/ext/resindvd/Makefile.am index 89232a53e2..c5f758f275 100644 --- a/ext/resindvd/Makefile.am +++ b/ext/resindvd/Makefile.am @@ -21,6 +21,7 @@ libresindvd_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) $(DVDNAV_CFLAGS) libresindvd_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ -lgstinterfaces-$(GST_MAJORMINOR) -lgstvideo-$(GST_MAJORMINOR) \ +-lgstpbutils-$(GST_MAJORMINOR) \ $(GST_BASE_LIBS) $(GST_LIBS) $(DVDNAV_LIBS) libresindvd_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libresindvd_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c index 5f0d103035..bd04afe32e 100644 --- a/ext/resindvd/resindvdbin.c +++ b/ext/resindvd/resindvdbin.c @@ -24,6 +24,7 @@ #include #include +#include #include "resindvdbin.h" #include "resindvdsrc.h" @@ -753,9 +754,21 @@ demux_pad_added (GstElement * element, GstPad * pad, RsnDvdBin * dvdbin) gst_element_get_request_pad (dvdbin->pieces[DVD_ELEM_AUD_SELECT], "sink%d"); } else { - /* FIXME: Consider and fire a missing-element message here */ + GstStructure *s; + GST_DEBUG_OBJECT (dvdbin, "Ignoring unusable pad w/ caps %" GST_PTR_FORMAT, caps); + gst_element_post_message (GST_ELEMENT_CAST (dvdbin), + gst_missing_decoder_message_new (GST_ELEMENT_CAST (dvdbin), caps)); + + s = gst_caps_get_structure (caps, 0); + if (g_str_has_prefix ("video/", gst_structure_get_name (s))) { + GST_ELEMENT_ERROR (dvdbin, STREAM, CODEC_NOT_FOUND, (NULL), + ("No MPEG video decoder found")); + } else { + GST_ELEMENT_WARNING (dvdbin, STREAM, CODEC_NOT_FOUND, (NULL), + ("No MPEG video decoder found")); + } } gst_caps_unref (caps);