From f935b2c547e3ed91c2bf3301926273891bd110b5 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Sat, 15 Aug 2015 14:31:15 +0200 Subject: [PATCH] glsink: Enable sync meta on pools we offer As the upload is asynchronous, we need to enable the sync meta to gain correct rendering. The buffer pool receiver don't know about that. --- ext/gl/gstglimagesink.c | 2 ++ ext/gtk/gstgtkglsink.c | 3 +++ gst-libs/gst/gl/gstglupload.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index ae10c42..febad5d 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -1576,6 +1576,8 @@ gst_glimage_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) pool = gst_gl_buffer_pool_new (glimage_sink->context); config = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_set_params (config, caps, size, 0, 0); + gst_buffer_pool_config_add_option (config, + GST_BUFFER_POOL_OPTION_GL_SYNC_META); if (!gst_buffer_pool_set_config (pool, config)) { g_object_unref (pool); diff --git a/ext/gtk/gstgtkglsink.c b/ext/gtk/gstgtkglsink.c index 16797d3..d59880c 100644 --- a/ext/gtk/gstgtkglsink.c +++ b/ext/gtk/gstgtkglsink.c @@ -249,6 +249,9 @@ gst_gtk_gl_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) config = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_set_params (config, caps, size, 0, 0); + gst_buffer_pool_config_add_option (config, + GST_BUFFER_POOL_OPTION_GL_SYNC_META); + if (!gst_buffer_pool_set_config (pool, config)) goto config_failed; diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 9374c7a..9261914 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -231,6 +231,8 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query, /* the normal size of a frame */ size = info.size; gst_buffer_pool_config_set_params (config, caps, size, 0, 0); + gst_buffer_pool_config_add_option (config, + GST_BUFFER_POOL_OPTION_GL_SYNC_META); if (!gst_buffer_pool_set_config (pool, config)) { gst_object_unref (pool); -- 2.7.4