mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Revert "playbin2: autoplug sink if stream is incompatible to the configured one"
This reverts commit b0b4e286c8
.
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
1 changed files with 13 additions and 0 deletions
|
@ -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…
Reference in a new issue