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
This commit is contained in:
Matthew Waters 2014-11-27 01:27:19 +11:00
parent aeaf4a4388
commit 1d7c4f4344

View file

@ -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;