Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstGLEGL.egl_get_error_string(err)¶
- GstGLEGL.egl_image_can_emulate(context, format)¶
- Parameters:
context (
GstGL.GLContext) – aGstGL.GLContext(must be an EGL context)format (
GstVideo.VideoFormat) – aGstVideo.VideoFormat
- Returns:
Trueif format can be emulated- Return type:
Checks if the given context can emulate format using a limited subset of RGB texture formats. Such format is then suitable for importing using
GstGLEGL.EGLImage.from_dmabuf() even when GL supports the video format as external-only or not at all.New in version 1.26.
- 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.VideoInfoin dmabufplane (
int) – the plane in in_info to create andGstGLEGL.EGLImageforoffset (
int) – the byte-offset in the data
- Returns:
a
GstGLEGL.EGLImagewrapping dmabuf orNoneon 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.EGLImagewrapping dmabuf orNoneon 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.VideoInfotarget (
GstGL.GLTextureTarget) – GL texture target thisGstGLEGL.EGLImageis intended for
- Returns:
a
GstGLEGL.EGLImagewrapping dmabuf orNoneon 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.VideoInfoDmaDrmtarget (
GstGL.GLTextureTarget) – GL texture target thisGstGLEGL.EGLImageis intended for
- Returns:
a
GstGLEGL.EGLImagewrapping dmabuf orNoneon 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.GLMemoryattribs (
int) – additional attributes to add to the ``eglCreateImage``() call.
- Returns:
a
GstGLEGL.EGLImagewrapping gl_mem orNoneon 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.GLMemoryEGLoperation.New in version 1.10.
- GstGLEGL.is_gl_memory_egl(mem)¶
- Parameters:
mem (
Gst.Memory) – aGst.Memoryto test- Returns:
whether mem is a
GstGLEGL.GLMemoryEGL- Return type:
New in version 1.10.