gtk: add the overlaycomposition feature to the template caps
authorMatthew Waters <matthew@centricular.com>
Tue, 10 Nov 2015 01:32:39 +0000 (12:32 +1100)
committerMatthew Waters <matthew@centricular.com>
Tue, 10 Nov 2015 04:40:25 +0000 (15:40 +1100)
There is a possibility that the _get_caps impl will be called with the
feature in the filter caps which when interecting with the template,
will return EMPTY and therefore fail negotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=757854

ext/gtk/gstgtkglsink.c

index ceba7bd..4d41f1a 100644 (file)
@@ -42,11 +42,14 @@ static GstCaps *gst_gtk_gl_sink_get_caps (GstBaseSink * bsink,
     GstCaps * filter);
 
 static GstStaticPadTemplate gst_gtk_gl_sink_template =
-GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
-        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")));
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA") "; "
+        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
+        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY ", "
+            GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, "RGBA")));
 
 #define gst_gtk_gl_sink_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink,