diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c index 28400c6734..3719b9feed 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -1826,3 +1826,23 @@ beach: #endif return FALSE; } + +/** + * gst_gl_context_egl_supports_modifier: (skip) + * @context: an EGL #GStGLContext + * + * Returns: %TRUE if the @context supports the modifiers. + * + * Since: 1.24 + */ +gboolean +gst_gl_context_egl_supports_modifier (GstGLContext * context) +{ +#if GST_GL_HAVE_DMABUF + g_return_val_if_fail (GST_IS_GL_CONTEXT_EGL (context), FALSE); + + return gst_gl_context_egl_fetch_dma_formats (context); +#else + return FALSE; +#endif +} diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.h b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.h index 72385170dc..7732885b76 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.h @@ -113,6 +113,8 @@ G_GNUC_INTERNAL gboolean gst_gl_context_egl_get_format_modifiers (GstGLContext * context, gint fourcc, const GArray ** modifiers); +G_GNUC_INTERNAL +gboolean gst_gl_context_egl_supports_modifier (GstGLContext * context); G_END_DECLS #endif /* __GST_GL_CONTEXT_EGL_H__ */