Functions

egl_get_error_string (err)

egl_image_from_dmabuf (context, dmabuf, in_info, plane, offset)

egl_image_from_dmabuf_direct (context, fd, offset, in_info)

egl_image_from_dmabuf_direct_target (context, fd, offset, in_info, target)

egl_image_from_texture (context, gl_mem, attribs)

gl_memory_egl_init_once ()

is_gl_memory_egl (mem)

Details

GstGLEGL.egl_get_error_string(err)
Parameters:

err (int) – an EGL error code

Returns:

the short string representation of err

Return type:

str

GstGLEGL.egl_image_from_dmabuf(context, dmabuf, in_info, plane, offset)
Parameters:
Returns:

a GstGLEGL.EGLImage wrapping dmabuf or None on failure

Return type:

GstGLEGL.EGLImage or None

Creates an EGL image that imports the dmabuf FD. The dmabuf data is passed as RGBA data. Shaders later take this “RGBA” data and convert it from its true format (described by in_info) to actual RGBA output. For example, with I420, three EGL images are created, one for each plane, each EGL image with a single-channel R format. With NV12, two EGL images are created, one with R format, one with RG format etc.

GstGLEGL.egl_image_from_dmabuf_direct(context, fd, offset, in_info)
Parameters:
Returns:

a GstGLEGL.EGLImage wrapping dmabuf or None on failure

Return type:

GstGLEGL.EGLImage or None

Creates an EGL image that imports the dmabuf FD. The dmabuf data is passed directly as the format described in in_info. This is useful if the hardware is capable of performing color space conversions internally. The appropriate DRM format is picked, and the EGL image is created with this DRM format.

Another notable difference to GstGLEGL.EGLImage.from_dmabuf() is that this function creates one EGL image for all planes, not one for a single plane.

GstGLEGL.egl_image_from_dmabuf_direct_target(context, fd, offset, in_info, target)
Parameters:
Returns:

a GstGLEGL.EGLImage wrapping dmabuf or None on failure

Return type:

GstGLEGL.EGLImage or None

Creates an EGL image that imports the dmabuf FD. The dmabuf data is passed directly as the format described in in_info. This is useful if the hardware is capable of performing color space conversions internally. The appropriate DRM format is picked, and the EGL image is created with this DRM format.

Another notable difference to GstGLEGL.EGLImage.from_dmabuf() is that this function creates one EGL image for all planes, not one for a single plane.

New in version 1.18.

GstGLEGL.egl_image_from_texture(context, gl_mem, attribs)
Parameters:
Returns:

a GstGLEGL.EGLImage wrapping gl_mem or None on failure

Return type:

GstGLEGL.EGLImage or None

GstGLEGL.gl_memory_egl_init_once()

Initializes the GL Memory allocator. It is safe to call this function multiple times. This must be called before any other GstGLEGL.GLMemoryEGL operation.

New in version 1.10.

GstGLEGL.is_gl_memory_egl(mem)
Parameters:

mem (Gst.Memory) – a Gst.Memory to test

Returns:

whether mem is a GstGLEGL.GLMemoryEGL

Return type:

bool

New in version 1.10.