Revert "playbin2: autoplug sink if stream is incompatible to the configured one"
This reverts commit b0b4e286c8cde2e79a959a444a2c68e99c3f29c6. We agreed that the previous (pre-.35) behaviour is broken and a bug and the current behaviour is correct, deterministic and allows the application to handle stuff properly while the old behaviour can't be handled properly by applications and just worked in some applications by luck. The solution to the problem that was solved by relying on the old, broken behaviour would be, to make decodebin2/playbin2 more aware of decoders and improve the autoplugging of decoders by considering the caps supported by the sink instead of just using something with the highest rank. See bug #656923.
This commit is contained in:
parent
b0b4e286c8
commit
bd52f00796
@ -3050,6 +3050,17 @@ autoplug_factories_cb (GstElement * decodebin, GstPad * pad,
|
||||
GstElementFactory *factory = GST_ELEMENT_FACTORY_CAST (tmp->data);
|
||||
GValue val = { 0, };
|
||||
|
||||
if (group->audio_sink && gst_element_factory_list_is_type (factory,
|
||||
GST_ELEMENT_FACTORY_TYPE_SINK |
|
||||
GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO)) {
|
||||
continue;
|
||||
}
|
||||
if (group->video_sink && gst_element_factory_list_is_type (factory,
|
||||
GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO
|
||||
| GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
g_value_init (&val, G_TYPE_OBJECT);
|
||||
g_value_set_object (&val, factory);
|
||||
g_value_array_append (result, &val);
|
||||
@ -3261,6 +3272,8 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad,
|
||||
"Existing sink '%s' does not accept caps: %" GST_PTR_FORMAT,
|
||||
GST_ELEMENT_NAME (sink), caps);
|
||||
gst_object_unref (sink);
|
||||
GST_SOURCE_GROUP_UNLOCK (group);
|
||||
return GST_AUTOPLUG_SELECT_SKIP;
|
||||
}
|
||||
}
|
||||
GST_DEBUG_OBJECT (playbin, "we have no pending sink, try to create one");
|
||||
|
Loading…
x
Reference in New Issue
Block a user