From: Sreerenj Balachandran Date: Wed, 17 Jun 2015 11:20:37 +0000 (+0300) Subject: vaapisink: Fix the capsfeature advertisement in padtemplate X-Git-Tag: 1.19.3~503^2~1741 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28e50ad40788735bcfaa0d5f33abcd942d678b09;p=platform%2Fupstream%2Fgstreamer.git vaapisink: Fix the capsfeature advertisement in padtemplate This fixes the regression introduced in 64acc74. If a pad supports multiple set of capsfeatures, it needs to add multiple equal structures with different feature sets to the caps. Because caps structures with the same name but with a non-equal set of caps features are not compatible. Without this patch, playbin will autoplug xvimagesink instead of vaapisink. https://bugzilla.gnome.org/show_bug.cgi?id=750095 --- diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c index 26ea5bf4c1..5c78a0b26c 100644 --- a/gst/vaapi/gstvaapisink.c +++ b/gst/vaapi/gstvaapisink.c @@ -58,17 +58,19 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink); /* *INDENT-OFF* */ static const char gst_vaapisink_sink_caps_str[] = GST_VIDEO_CAPS_MAKE_WITH_FEATURES ( - GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE + GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, + "{ ENCODED, NV12, I420, YV12 }") ";" #if GST_CHECK_VERSION(1,3,1) - "," GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION + GST_VIDEO_CAPS_MAKE_WITH_FEATURES ( + GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE "," + GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, + "{ ENCODED, NV12, I420, YV12 }") ";" #endif - ,"{ ENCODED, NV12, I420, YV12 }") ";" + GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ";" #if GST_CHECK_VERSION(1,3,1) GST_VIDEO_CAPS_MAKE_WITH_FEATURES ( GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, GST_VIDEO_FORMATS_ALL); -#else - GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL); #endif /* *INDENT-ON* */