Commit graph

8 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
c080ee6dc9 libs: surface: egl: guard memory type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/384>
2020-08-18 08:11:27 +00:00
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
Víctor Manuel Jáquez Leal
8c08ef31a5 libs: surface: surfacepool: Add allocation flags in constructors. 2020-02-23 13:12:15 +01:00
He Junyan
608ce681e5 libs: surface: port to GstMiniObject
GstVaapiMiniObject and GstVaapiObject are deprecated.

This is the first step to remove them by porting GstVaapiSurface as
a GstMiniBuffer descendant.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2019-12-20 05:01:08 +00:00
Víctor Manuel Jáquez Leal
ae46b1a91a libs: filter: remove custom ref() and unref()
Replacing them by gst_object_ref() and gst_object_unref()

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Daniel van Vugt
e1f9959eb5 libs: surface: egl: add comment
Add a warning comment when using old intel-vaapi-drivers (>1.8.4),
where the creation of surfaces from GEM fd may fail.

https://bugzilla.gnome.org/show_bug.cgi?id=773453
2017-11-06 18:00:14 +01:00
Víctor Manuel Jáquez Leal
ea503ed085 libs: surface: egl: error message if no extension
Instead of silently fail to export the image if there is not available
the EGL_MESA_drm_image, log an error message. Also a code refactoring
was done.

https://bugzilla.gnome.org/show_bug.cgi?id=773453
2017-11-01 11:27:36 +01: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