GstGLEGL.EGLImage

Fields

Name

Type

Access

Description

context

GstGL.GLContext

r

destroy_data

object

r

destroy_notify

GstGLEGL.EGLImageDestroyNotify

r

format

GstGL.GLFormat

r

image

object

r

parent

Gst.MiniObject

r

Methods

class

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

class

from_dmabuf_direct (context, fd, offset, in_info)

class

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

class

from_texture (context, gl_mem, attribs)

class

new_wrapped (context, image, format, user_data_destroy)

export_dmabuf (fd, stride, offset)

get_image ()

Details

class GstGLEGL.EGLImage

GstGLEGL.EGLImage represents and holds an EGLImage handle.

A GstGLEGL.EGLImage can be created from a dmabuf with GstGLEGL.EGLImage.from_dmabuf(), or GstGLEGL.EGLImage.from_dmabuf_direct(), or GstGLEGL.GLMemoryEGL provides a Gst.Allocator to allocate EGLImage’s bound to and OpenGL texture.

classmethod 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.

classmethod 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.

classmethod 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.

classmethod from_texture(context, gl_mem, attribs)
Parameters:
Returns:

a GstGLEGL.EGLImage wrapping gl_mem or None on failure

Return type:

GstGLEGL.EGLImage or None

classmethod new_wrapped(context, image, format, user_data_destroy)
Parameters:
Returns:

a new GstGLEGL.EGLImage wrapping image

Return type:

GstGLEGL.EGLImage

export_dmabuf(fd, stride, offset)
Parameters:
  • fd (int) –

  • stride (int) –

  • offset (int) –

Return type:

bool

get_image()
Returns:

the EGLImage of self

Return type:

object or None