diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c index 57135a662e..2cdf46fb92 100644 --- a/ext/gl/gstglmixer.c +++ b/ext/gl/gstglmixer.c @@ -537,6 +537,10 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u", GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA") "; " +#if GST_GL_HAVE_PLATFORM_EGL + GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE, + "RGBA") "; " +#endif GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") @@ -727,10 +731,8 @@ gst_gl_mixer_query_caps (GstPad * pad, GstAggregator * agg, GstQuery * query) /* convert from current caps to GLMemory caps */ gl_caps = - gst_caps_merge (gst_caps_merge (gst_gl_mixer_set_caps_features - (current_caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY), - gst_gl_mixer_set_caps_features (current_caps, - GST_CAPS_FEATURE_MEMORY_EGL_IMAGE)), + gst_caps_merge (gst_gl_mixer_set_caps_features + (current_caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY), gst_gl_mixer_set_caps_features (current_caps, GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META)); retcaps = diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c index dcbbd1e9f3..b760a70ba3 100644 --- a/ext/gl/gstgltestsrc.c +++ b/ext/gl/gstgltestsrc.c @@ -72,10 +72,6 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA") "; " -#if GST_GL_HAVE_PLATFORM_EGL - GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_EGL_IMAGE, - "RGBA") "; " -#endif GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)) @@ -531,10 +527,8 @@ gst_gl_test_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter) GST_DEBUG_OBJECT (bsrc, "remove format returned caps %" GST_PTR_FORMAT, tmp); gl_caps = - gst_caps_merge (gst_caps_merge (gst_gl_test_src_set_caps_features (tmp, - GST_CAPS_FEATURE_MEMORY_GL_MEMORY), - gst_gl_test_src_set_caps_features (tmp, - GST_CAPS_FEATURE_MEMORY_EGL_IMAGE)), + gst_caps_merge (gst_gl_test_src_set_caps_features (tmp, + GST_CAPS_FEATURE_MEMORY_GL_MEMORY), gst_gl_test_src_set_caps_features (tmp, GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META)); result = diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 4069657fbe..3e6f8a604d 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -775,11 +775,8 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt, NULL); gst_caps_unref (tmp); } else { - GstCaps *gl_caps = - gst_caps_merge (gst_caps_merge (gst_gl_filter_set_caps_features (caps, - GST_CAPS_FEATURE_MEMORY_GL_MEMORY), - gst_gl_filter_set_caps_features (caps, - GST_CAPS_FEATURE_MEMORY_EGL_IMAGE)), + GstCaps *gl_caps = gst_caps_merge (gst_gl_filter_set_caps_features (caps, + GST_CAPS_FEATURE_MEMORY_GL_MEMORY), gst_gl_filter_set_caps_features (caps, GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META)); @@ -805,11 +802,8 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt, result = gst_gl_upload_transform_caps (filter->context, direction, tmp, NULL); } else { - GstCaps *gl_caps = - gst_caps_merge (gst_caps_merge (gst_gl_filter_set_caps_features (tmp, - GST_CAPS_FEATURE_MEMORY_GL_MEMORY), - gst_gl_filter_set_caps_features (tmp, - GST_CAPS_FEATURE_MEMORY_EGL_IMAGE)), + GstCaps *gl_caps = gst_caps_merge (gst_gl_filter_set_caps_features (tmp, + GST_CAPS_FEATURE_MEMORY_GL_MEMORY), gst_gl_filter_set_caps_features (tmp, GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META));