Commit graph

2 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
7a3b25884c libs: egl: surface: export EGLImage as DMABuf if GEM not supported
This code path is used when frames are rendered as textures through
GstVideoGLTextureUploadMeta with EGL, mainly under Wayland.

Originally the EGLImage was exported as GEM, which was handled by
Intel drivers, but Gallium ones cannot create VA surfaces from
GEM buffers, only DMABuf.

This patch checks the memory types supported by VA driver to choose
the render the EGLImages from GEM or DMABuf, because GEM is still
better where supported.

DMABuf is well handled either by intel-vaapi-driver and gallium.

Fixes: #137
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/122>
2020-08-14 12:43:20 +02:00
Gwenole Beauchesne
a9fe79610a egl: allow for EGLImage imports into VA Surfaces.
Add helpers to import EGLImage objects into VA surfaces. There are
two operational modes: (i) gst_vaapi_surface_new_from_egl_image(),
which allows for implicit conversion from EGLImage to a VA surface
in native video format, and (ii) gst_vaapi_surface_new_with_egl_image(),
which exactly wraps the source EGLImage, typically in RGBA format
with linear storage.

Note: in case of (i), the EGLImage can be disposed right after the
VA surface creation call, unlike in (ii) where the user shall ensure
that the EGLImage is live until the associated VA surface is no longer
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=743847
2015-02-24 15:20:03 +01:00