From c5f2c56fe2006a63afcd018502b04a7457b6e9c3 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 10 Nov 2015 13:52:30 +1100 Subject: [PATCH] glviewconvert: remove set_format We need the caps to be able to 1. check the caps features 2. get the requested texture-target on input/output --- ext/gl/gstglstereomix.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/gl/gstglstereomix.c b/ext/gl/gstglstereomix.c index 7b24739..c342a23 100644 --- a/ext/gl/gstglstereomix.c +++ b/ext/gl/gstglstereomix.c @@ -483,6 +483,7 @@ static gboolean _negotiated_caps (GstVideoAggregator * vagg, GstCaps * caps) { GstGLStereoMix *mix = GST_GL_STEREO_MIX (vagg); + GstCaps *in_caps; GST_LOG_OBJECT (mix, "Configured output caps %" GST_PTR_FORMAT, caps); @@ -498,11 +499,16 @@ _negotiated_caps (GstVideoAggregator * vagg, GstCaps * caps) /* We can configure the view_converter now */ gst_gl_view_convert_set_context (mix->viewconvert, GST_GL_BASE_MIXER (mix)->context); - gst_gl_view_convert_set_format (mix->viewconvert, &mix->mix_info, - &mix->out_info); - return TRUE; + in_caps = gst_video_info_to_caps (&mix->mix_info); + gst_caps_set_features (in_caps, 0, + gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_set_simple (in_caps, "texture-target", G_TYPE_STRING, + GST_GL_TEXTURE_TARGET_2D_STR, NULL); + gst_gl_view_convert_set_caps (mix->viewconvert, in_caps, caps); + + return TRUE; } static gboolean -- 2.7.4