GstEGLImage
GstEGLImage represents and holds an EGLImage
handle.
A GstEGLImage can be created from a dmabuf with gst_egl_image_from_dmabuf,
or gst_egl_image_from_dmabuf_direct, or GstGLMemoryEGL provides a
GstAllocator to allocate EGLImage
's bound to and OpenGL texture.
Constructors
gst_egl_image_new_wrapped
GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context, gpointer image, GstGLFormat format, gpointer user_data, GstEGLImageDestroyNotify user_data_destroy)
Parameters:
context
–
a GstGLContext (must be an EGL context)
image
–
the image to wrap
format
–
the GstGLFormat
user_data
–
user data
user_data_destroy
(
[destroy user_data][scope async])
–
called when user_data is no longer needed
a new GstEGLImage wrapping image
GstGLEGL.EGLImage.prototype.new_wrapped
function GstGLEGL.EGLImage.prototype.new_wrapped(context: GstGL.GLContext, image: Object, format: GstGL.GLFormat, user_data_destroy: GstGLEGL.EGLImageDestroyNotify): {
// javascript wrapper for 'gst_egl_image_new_wrapped'
}
Parameters:
a GstGL.GLContext (must be an EGL context)
the image to wrap
the GstGL.GLFormat
called when user_data is no longer needed
a new GstGLEGL.EGLImage wrapping image
GstGLEGL.EGLImage.new_wrapped
def GstGLEGL.EGLImage.new_wrapped (context, image, format, user_data_destroy):
#python wrapper for 'gst_egl_image_new_wrapped'
Parameters:
a GstGL.GLContext (must be an EGL context)
the image to wrap
the GstGL.GLFormat
called when user_data is no longer needed
a new GstGLEGL.EGLImage wrapping image
Methods
gst_egl_image_export_dmabuf
gboolean gst_egl_image_export_dmabuf (GstEGLImage * image, int* fd, gint * stride, gsize * offset)
Parameters:
image
–
fd
–
stride
–
offset
–
GstGLEGL.EGLImage.prototype.export_dmabuf
function GstGLEGL.EGLImage.prototype.export_dmabuf(fd: Number, stride: Number, offset: Number): {
// javascript wrapper for 'gst_egl_image_export_dmabuf'
}
Parameters:
GstGLEGL.EGLImage.export_dmabuf
def GstGLEGL.EGLImage.export_dmabuf (self, fd, stride, offset):
#python wrapper for 'gst_egl_image_export_dmabuf'
Parameters:
gst_egl_image_get_image
gpointer gst_egl_image_get_image (GstEGLImage * image)
Parameters:
image
–
the EGLImage
of image
GstGLEGL.EGLImage.prototype.get_image
function GstGLEGL.EGLImage.prototype.get_image(): {
// javascript wrapper for 'gst_egl_image_get_image'
}
Parameters:
the EGLImage
of image
GstGLEGL.EGLImage.get_image
def GstGLEGL.EGLImage.get_image (self):
#python wrapper for 'gst_egl_image_get_image'
Parameters:
the EGLImage
of image
Functions
gst_egl_image_can_emulate
gboolean gst_egl_image_can_emulate (GstGLContext * context, GstVideoFormat format)
Checks if the given context can emulate format using a limited subset of RGB texture formats. Such format is then suitable for importing using gst_egl_image_from_dmabuf even when GL supports the video format as external-only or not at all.
TRUE if format can be emulated
Since : 1.26
GstGLEGL.EGLImage.prototype.can_emulate
function GstGLEGL.EGLImage.prototype.can_emulate(context: GstGL.GLContext, format: GstVideo.VideoFormat): {
// javascript wrapper for 'gst_egl_image_can_emulate'
}
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.prototype.from_dmabuf even when GL supports the video format as external-only or not at all.
Since : 1.26
GstGLEGL.EGLImage.can_emulate
def GstGLEGL.EGLImage.can_emulate (context, format):
#python wrapper for 'gst_egl_image_can_emulate'
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.
Since : 1.26
gst_egl_image_from_dmabuf
GstEGLImage * gst_egl_image_from_dmabuf (GstGLContext * context, gint dmabuf, const GstVideoInfo * in_info, gint plane, gsize offset)
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.
Parameters:
context
–
a GstGLContext (must be an EGL context)
dmabuf
–
the DMA-Buf file descriptor
in_info
–
the GstVideoInfo in dmabuf
plane
–
the plane in in_info to create and GstEGLImage for
offset
–
the byte-offset in the data
a GstEGLImage wrapping dmabuf or NULL on failure
GstGLEGL.EGLImage.prototype.from_dmabuf
function GstGLEGL.EGLImage.prototype.from_dmabuf(context: GstGL.GLContext, dmabuf: Number, in_info: GstVideo.VideoInfo, plane: Number, offset: Number): {
// javascript wrapper for 'gst_egl_image_from_dmabuf'
}
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.
Parameters:
a GstGL.GLContext (must be an EGL context)
the DMA-Buf file descriptor
the GstVideo.VideoInfo in dmabuf
the plane in in_info to create and GstGLEGL.EGLImage for
the byte-offset in the data
a GstGLEGL.EGLImage wrapping dmabuf or null on failure
GstGLEGL.EGLImage.from_dmabuf
def GstGLEGL.EGLImage.from_dmabuf (context, dmabuf, in_info, plane, offset):
#python wrapper for 'gst_egl_image_from_dmabuf'
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.
Parameters:
a GstGL.GLContext (must be an EGL context)
the DMA-Buf file descriptor
the GstVideo.VideoInfo in dmabuf
the plane in in_info to create and GstGLEGL.EGLImage for
the byte-offset in the data
a GstGLEGL.EGLImage wrapping dmabuf or None on failure
gst_egl_image_from_dmabuf_direct
GstEGLImage * gst_egl_image_from_dmabuf_direct (GstGLContext * context, gint * fd, const gsize * offset, const GstVideoInfo * in_info)
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 gst_egl_image_from_dmabuf is that this function creates one EGL image for all planes, not one for a single plane.
Parameters:
context
–
a GstGLContext (must be an EGL context)
fd
–
Array of DMABuf file descriptors
offset
–
Array of offsets, relative to the DMABuf
in_info
–
the GstVideoInfo
a GstEGLImage wrapping dmabuf or NULL on failure
GstGLEGL.EGLImage.prototype.from_dmabuf_direct
function GstGLEGL.EGLImage.prototype.from_dmabuf_direct(context: GstGL.GLContext, fd: Number, offset: Number, in_info: GstVideo.VideoInfo): {
// javascript wrapper for 'gst_egl_image_from_dmabuf_direct'
}
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.prototype.from_dmabuf is that this function creates one EGL image for all planes, not one for a single plane.
Parameters:
a GstGL.GLContext (must be an EGL context)
Array of DMABuf file descriptors
Array of offsets, relative to the DMABuf
a GstGLEGL.EGLImage wrapping dmabuf or null on failure
GstGLEGL.EGLImage.from_dmabuf_direct
def GstGLEGL.EGLImage.from_dmabuf_direct (context, fd, offset, in_info):
#python wrapper for 'gst_egl_image_from_dmabuf_direct'
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.
Parameters:
a GstGL.GLContext (must be an EGL context)
Array of DMABuf file descriptors
Array of offsets, relative to the DMABuf
a GstGLEGL.EGLImage wrapping dmabuf or None on failure
gst_egl_image_from_dmabuf_direct_target
GstEGLImage * gst_egl_image_from_dmabuf_direct_target (GstGLContext * context, gint * fd, const gsize * offset, const GstVideoInfo * in_info, GstGLTextureTarget target)
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 gst_egl_image_from_dmabuf is that this function creates one EGL image for all planes, not one for a single plane.
Parameters:
context
–
a GstGLContext (must be an EGL context)
fd
–
Array of DMABuf file descriptors
offset
–
Array of offsets, relative to the DMABuf
in_info
–
the GstVideoInfo
target
–
GL texture target this GstEGLImage is intended for
a GstEGLImage wrapping dmabuf or NULL on failure
Since : 1.18
GstGLEGL.EGLImage.prototype.from_dmabuf_direct_target
function GstGLEGL.EGLImage.prototype.from_dmabuf_direct_target(context: GstGL.GLContext, fd: Number, offset: Number, in_info: GstVideo.VideoInfo, target: GstGL.GLTextureTarget): {
// javascript wrapper for 'gst_egl_image_from_dmabuf_direct_target'
}
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.prototype.from_dmabuf is that this function creates one EGL image for all planes, not one for a single plane.
Parameters:
a GstGL.GLContext (must be an EGL context)
Array of DMABuf file descriptors
Array of offsets, relative to the DMABuf
GL texture target this GstEGLImage is intended for
a GstGLEGL.EGLImage wrapping dmabuf or null on failure
Since : 1.18
GstGLEGL.EGLImage.from_dmabuf_direct_target
def GstGLEGL.EGLImage.from_dmabuf_direct_target (context, fd, offset, in_info, target):
#python wrapper for 'gst_egl_image_from_dmabuf_direct_target'
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.
Parameters:
a GstGL.GLContext (must be an EGL context)
Array of DMABuf file descriptors
Array of offsets, relative to the DMABuf
GL texture target this GstEGLImage is intended for
a GstGLEGL.EGLImage wrapping dmabuf or None on failure
Since : 1.18
gst_egl_image_from_dmabuf_direct_target_with_dma_drm
GstEGLImage * gst_egl_image_from_dmabuf_direct_target_with_dma_drm (GstGLContext * context, guint n_planes, gint * fd, const gsize * offset, const GstVideoInfoDmaDrm * in_info_dma, GstGLTextureTarget target)
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 gst_egl_image_from_dmabuf is that this function creates one EGL image for all planes, not one for a single plane.
Parameters:
context
–
a GstGLContext (must be an EGL context)
n_planes
–
number of planes (obtained from a GstVideoMeta)
fd
–
Array of DMABuf file descriptors
offset
–
Array of offsets, relative to the DMABuf
in_info_dma
–
target
–
GL texture target this GstEGLImage is intended for
a GstEGLImage wrapping dmabuf or NULL on failure
Since : 1.24
GstGLEGL.EGLImage.prototype.from_dmabuf_direct_target_with_dma_drm
function GstGLEGL.EGLImage.prototype.from_dmabuf_direct_target_with_dma_drm(context: GstGL.GLContext, n_planes: Number, fd: Number, offset: Number, in_info_dma: GstVideo.VideoInfoDmaDrm, target: GstGL.GLTextureTarget): {
// javascript wrapper for 'gst_egl_image_from_dmabuf_direct_target_with_dma_drm'
}
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.prototype.from_dmabuf is that this function creates one EGL image for all planes, not one for a single plane.
Parameters:
a GstGL.GLContext (must be an EGL context)
number of planes (obtained from a GstVideo.VideoMeta)
Array of DMABuf file descriptors
Array of offsets, relative to the DMABuf
GL texture target this GstEGLImage is intended for
a GstGLEGL.EGLImage wrapping dmabuf or null on failure
Since : 1.24
GstGLEGL.EGLImage.from_dmabuf_direct_target_with_dma_drm
def GstGLEGL.EGLImage.from_dmabuf_direct_target_with_dma_drm (context, n_planes, fd, offset, in_info_dma, target):
#python wrapper for 'gst_egl_image_from_dmabuf_direct_target_with_dma_drm'
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.
Parameters:
a GstGL.GLContext (must be an EGL context)
number of planes (obtained from a GstVideo.VideoMeta)
Array of DMABuf file descriptors
Array of offsets, relative to the DMABuf
GL texture target this GstEGLImage is intended for
a GstGLEGL.EGLImage wrapping dmabuf or None on failure
Since : 1.24
gst_egl_image_from_texture
GstEGLImage * gst_egl_image_from_texture (GstGLContext * context, GstGLMemory * gl_mem, guintptr * attribs)
Parameters:
context
–
a GstGLContext (must be an EGL context)
gl_mem
–
attribs
–
additional attributes to add to the eglCreateImage
() call.
a GstEGLImage wrapping gl_mem or NULL on failure
GstGLEGL.EGLImage.prototype.from_texture
function GstGLEGL.EGLImage.prototype.from_texture(context: GstGL.GLContext, gl_mem: GstGL.GLMemory, attribs: Number): {
// javascript wrapper for 'gst_egl_image_from_texture'
}
Parameters:
a GstGL.GLContext (must be an EGL context)
additional attributes to add to the eglCreateImage
() call.
a GstGLEGL.EGLImage wrapping gl_mem or null on failure
GstGLEGL.EGLImage.from_texture
def GstGLEGL.EGLImage.from_texture (context, gl_mem, attribs):
#python wrapper for 'gst_egl_image_from_texture'
Parameters:
a GstGL.GLContext (must be an EGL context)
additional attributes to add to the eglCreateImage
() call.
a GstGLEGL.EGLImage wrapping gl_mem or None on failure
Function Macros
GST_EGL_IMAGE_CAST
#define GST_EGL_IMAGE_CAST(obj) ((GstEGLImage *)(obj))
Callbacks
GstEGLImageDestroyNotify
(*GstEGLImageDestroyNotify) (GstEGLImage * image, gpointer data)
Function to be called when the GstEGLImage is destroyed. It should free
the associated EGLImage
if necessary
GstGLEGL.EGLImageDestroyNotify
function GstGLEGL.EGLImageDestroyNotify(image: GstGLEGL.EGLImage, data: Object): {
// javascript wrapper for 'GstEGLImageDestroyNotify'
}
Function to be called when the GstEGLImage is destroyed. It should free
the associated EGLImage
if necessary
GstGLEGL.EGLImageDestroyNotify
def GstGLEGL.EGLImageDestroyNotify (image, data):
#python wrapper for 'GstEGLImageDestroyNotify'
Function to be called when the GstEGLImage is destroyed. It should free
the associated EGLImage
if necessary
The results of the search are