decodebin2: First post a missing-plugin message, then emit the unkown-type signal

This makes sure that there *always* is a missing plugin message in the bus
before any errors or warning messages.
This commit is contained in:
Sebastian Dröge 2010-02-15 08:26:05 +01:00
parent 9677ca5037
commit cdf53e5e86

View file

@ -1367,9 +1367,7 @@ expose_pad:
} }
unknown_type: unknown_type:
{ {
GST_LOG_OBJECT (pad, "Unknown type, firing signal"); GST_LOG_OBJECT (pad, "Unknown type, posting message and firing signal");
g_signal_emit (G_OBJECT (dbin),
gst_decode_bin_signals[SIGNAL_UNKNOWN_TYPE], 0, pad, caps);
chain->deadend = TRUE; chain->deadend = TRUE;
chain->endcaps = gst_caps_ref (caps); chain->endcaps = gst_caps_ref (caps);
@ -1377,6 +1375,9 @@ unknown_type:
gst_element_post_message (GST_ELEMENT_CAST (dbin), gst_element_post_message (GST_ELEMENT_CAST (dbin),
gst_missing_decoder_message_new (GST_ELEMENT_CAST (dbin), caps)); gst_missing_decoder_message_new (GST_ELEMENT_CAST (dbin), caps));
g_signal_emit (G_OBJECT (dbin),
gst_decode_bin_signals[SIGNAL_UNKNOWN_TYPE], 0, pad, caps);
/* Try to expose anything */ /* Try to expose anything */
EXPOSE_LOCK (dbin); EXPOSE_LOCK (dbin);
if (gst_decode_chain_is_complete (dbin->decode_chain)) { if (gst_decode_chain_is_complete (dbin->decode_chain)) {