From 1d7c4f43447101be8942da57f948cd576f44a7ed Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 27 Nov 2014 01:27:19 +1100 Subject: [PATCH] glfilter: support fixed dimensions on both sides of the element Fixes: width=320,height=240 ! glfilter ! width=800,height=600 width=230,height=240 ! glfilter ! width=600 ... ! glfilter ! width=800 --- gst-libs/gst/gl/gstglfilter.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 42445e4513..0e6a7f52d3 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -760,16 +760,16 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt, GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META); GstCaps *raw_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)); - GstCapsFeatures *f; tmp = gst_caps_new_empty (); - tmp = gst_caps_merge (tmp, glcaps); + tmp = gst_caps_merge (tmp, gst_gl_filter_caps_remove_format_info (glcaps)); #if GST_GL_HAVE_PLATFORM_EGL - tmp = gst_caps_merge (tmp, eglcaps); + tmp = gst_caps_merge (tmp, gst_gl_filter_caps_remove_format_info (eglcaps)); #endif - tmp = gst_caps_merge (tmp, uploadcaps); - tmp = gst_caps_merge (tmp, raw_caps); + tmp = + gst_caps_merge (tmp, gst_gl_filter_caps_remove_format_info (uploadcaps)); + tmp = gst_caps_merge (tmp, gst_gl_filter_caps_remove_format_info (raw_caps)); tmp = gst_caps_merge (tmp, gst_gl_filter_caps_remove_format_info (caps)); @@ -780,18 +780,6 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt, result = tmp; } - if (gst_caps_get_size (caps) > 0) { - f = gst_caps_get_features (caps, 0); - /* if output still intersects input then prefer the intersection */ - - if (!gst_caps_features_is_any (f) - && !gst_caps_features_is_equal (f, - GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) { - tmp = gst_caps_intersect_full (result, caps, GST_CAPS_INTERSECT_FIRST); - result = gst_caps_merge (tmp, result); - } - } - GST_DEBUG_OBJECT (bt, "returning caps: %" GST_PTR_FORMAT, result); return result;