mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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:
parent
aeaf4a4388
commit
1d7c4f4344
1 changed files with 5 additions and 17 deletions
|
@ -760,16 +760,16 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
|
||||||
GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META);
|
GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META);
|
||||||
GstCaps *raw_caps =
|
GstCaps *raw_caps =
|
||||||
gst_caps_from_string (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS));
|
gst_caps_from_string (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS));
|
||||||
GstCapsFeatures *f;
|
|
||||||
|
|
||||||
tmp = gst_caps_new_empty ();
|
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
|
#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
|
#endif
|
||||||
tmp = gst_caps_merge (tmp, uploadcaps);
|
tmp =
|
||||||
tmp = gst_caps_merge (tmp, raw_caps);
|
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));
|
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;
|
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);
|
GST_DEBUG_OBJECT (bt, "returning caps: %" GST_PTR_FORMAT, result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue