summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@collabora.com>2015-03-04 16:08:16 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2015-05-09 15:05:50 +0100
commitd7c2f8603979462869141b0feb62bb10064ebbca (patch)
tree0940d3c0c20fa4529e9c5ead635b8d82c1efaeeb
parentf15e6e85634af0ae8ea7866d6d8c274365e68645 (diff)
downloadclutter-gst-d7c2f8603979462869141b0feb62bb10064ebbca.tar.gz
video-sink: advertize the GstVideoOverlayComposition feature in caps
https://bugzilla.gnome.org/show_bug.cgi?id=745611
-rw-r--r--clutter-gst/clutter-gst-video-sink.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index 640971d..5ee3f62 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -115,6 +115,8 @@ static const char clutter_gst_video_sink_caps_str[] =
MAKE_CAPS (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, BASE_SINK_CAPS)
#ifdef HAVE_GL_TEXTURE_UPLOAD
";"
+ MAKE_CAPS_COMPOSITON (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "{ RGBA }")
+ ";"
MAKE_CAPS (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "{ RGBA }")
#endif
";"
@@ -1764,9 +1766,23 @@ append_cap (gpointer data,
{
ClutterGstRenderer *renderer = (ClutterGstRenderer *) data;
GstCaps *caps = (GstCaps *) user_data;
+ guint i, count;
+ GstCapsFeatures *features;
GstCaps *writable_caps;
+ GstCaps *writable_caps_with_composition;
+
writable_caps =
gst_caps_make_writable (gst_static_caps_get (&renderer->caps));
+
+ writable_caps_with_composition = gst_caps_copy (writable_caps);
+ count = gst_caps_get_size (writable_caps_with_composition);
+
+ for (i = 0; i < count; i++) {
+ features = gst_caps_get_features (writable_caps_with_composition, i);
+ gst_caps_features_add (features, GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
+ }
+
+ gst_caps_append (caps, writable_caps_with_composition);
gst_caps_append (caps, writable_caps);
}