mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
gl: add a method to check whether DMA modifier is supported in EGL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3524>
This commit is contained in:
parent
05cffc19dd
commit
22bb3107d7
2 changed files with 22 additions and 0 deletions
|
@ -1826,3 +1826,23 @@ beach:
|
||||||
#endif
|
#endif
|
||||||
return FALSE;
|
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
|
||||||
|
}
|
||||||
|
|
|
@ -113,6 +113,8 @@ G_GNUC_INTERNAL
|
||||||
gboolean gst_gl_context_egl_get_format_modifiers (GstGLContext * context,
|
gboolean gst_gl_context_egl_get_format_modifiers (GstGLContext * context,
|
||||||
gint fourcc,
|
gint fourcc,
|
||||||
const GArray ** modifiers);
|
const GArray ** modifiers);
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
gboolean gst_gl_context_egl_supports_modifier (GstGLContext * context);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_GL_CONTEXT_EGL_H__ */
|
#endif /* __GST_GL_CONTEXT_EGL_H__ */
|
||||||
|
|
Loading…
Reference in a new issue