Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstGLEGL.egl_get_error_string(err)¶
- GstGLEGL.egl_image_from_dmabuf(context, dmabuf, in_info, plane, offset)¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
(must be an EGL context)dmabuf (
int
) – the DMA-Buf file descriptorin_info (
GstVideo.VideoInfo
) – theGstVideo.VideoInfo
in dmabufplane (
int
) – the plane in in_info to create andGstGLEGL.EGLImage
foroffset (
int
) – the byte-offset in the data
- Returns:
a
GstGLEGL.EGLImage
wrapping dmabuf orNone
on failure- Return type:
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:
context (
GstGL.GLContext
) – aGstGL.GLContext
(must be an EGL context)fd (
int
) – Array of DMABuf file descriptorsoffset (
int
) – Array of offsets, relative to the DMABufin_info (
GstVideo.VideoInfo
) – theGstVideo.VideoInfo
- Returns:
a
GstGLEGL.EGLImage
wrapping dmabuf orNone
on failure- Return type:
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:
context (
GstGL.GLContext
) – aGstGL.GLContext
(must be an EGL context)fd (
int
) – Array of DMABuf file descriptorsoffset (
int
) – Array of offsets, relative to the DMABufin_info (
GstVideo.VideoInfo
) – theGstVideo.VideoInfo
target (
GstGL.GLTextureTarget
) – GL texture target thisGstGLEGL.EGLImage
is intended for
- Returns:
a
GstGLEGL.EGLImage
wrapping dmabuf orNone
on failure- Return type:
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_dmabuf_direct_target_with_dma_drm(context, n_planes, fd, offset, in_info_dma, target)¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
(must be an EGL context)n_planes (
int
) – number of planes (obtained from aGstVideo.VideoMeta
)fd (
int
) – Array of DMABuf file descriptorsoffset (
int
) – Array of offsets, relative to the DMABufin_info_dma (
GstVideo.VideoInfoDmaDrm
) – theGstVideo.VideoInfoDmaDrm
target (
GstGL.GLTextureTarget
) – GL texture target thisGstGLEGL.EGLImage
is intended for
- Returns:
a
GstGLEGL.EGLImage
wrapping dmabuf orNone
on failure- Return type:
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.
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.24.
- GstGLEGL.egl_image_from_texture(context, gl_mem, attribs)¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
(must be an EGL context)gl_mem (
GstGL.GLMemory
) – aGstGL.GLMemory
attribs (
int
) – additional attributes to add to the ``eglCreateImage``() call.
- Returns:
a
GstGLEGL.EGLImage
wrapping gl_mem orNone
on failure- Return type:
- 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
) – aGst.Memory
to test- Returns:
whether mem is a
GstGLEGL.GLMemoryEGL
- Return type:
New in version 1.10.