From b0b4e286c8cde2e79a959a444a2c68e99c3f29c6 Mon Sep 17 00:00:00 2001 From: Josep Torra Date: Thu, 15 Sep 2011 09:23:54 +0200 Subject: [PATCH] playbin2: autoplug sink if stream is incompatible to the configured one Fixes regression since 0.10.33 where sinks that can cope with non raw caps or custom caps are not autoplugged if there's a sink configured with the properties video-sink and audio-sink which cannot handle the stream. This change checks for compatibility on the configured one and use it if success. Otherwhise it tries with the found factories. --- gst/playback/gstplaybin2.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index b057bbe5ad..22f43e1022 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -3050,17 +3050,6 @@ 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); @@ -3272,8 +3261,6 @@ 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");