Top | ![]() |
![]() |
![]() |
![]() |
GstEGLImage * | gst_egl_image_from_dmabuf () |
GstEGLImage * | gst_egl_image_from_texture () |
gpointer | gst_egl_image_get_image () |
gboolean | gst_egl_image_export_dmabuf () |
GstEGLImage * | gst_egl_image_new_wrapped () |
GstEGLImage * | gst_egl_image_ref () |
void | gst_egl_image_unref () |
void | (*GstEGLImageDestroyNotify) () |
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.
GstEGLImage * gst_egl_image_from_dmabuf (GstGLContext *context
,gint dmabuf
,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.
context |
a GstGLContext (must be an EGL context) |
|
dmabuf |
the DMA-Buf file descriptor |
|
in_info |
the GstVideoInfo in |
|
plane |
the plane in |
|
offset |
the byte-offset in the data |
GstEGLImage * gst_egl_image_from_texture (GstGLContext *context
,GstGLMemory *gl_mem
,guintptr *attribs
);
context |
a GstGLContext (must be an EGL context) |
|
gl_mem |
||
attribs |
additional attributes to add to the |
gboolean gst_egl_image_export_dmabuf (GstEGLImage *image
,int *fd
,gint *stride
,gsize *offset
);
GstEGLImage * gst_egl_image_new_wrapped (GstGLContext *context
,gpointer image
,GstGLFormat format
,gpointer user_data
,GstEGLImageDestroyNotify user_data_destroy
);
context |
a GstGLContext (must be an EGL context) |
|
image |
the image to wrap |
|
format |
the GstGLFormat |
|
user_data |
user data |
|
user_data_destroy |
called when |
[destroy user_data] |
GstEGLImage *
gst_egl_image_ref (GstEGLImage *image
);
Increases the refcount of the given image by one.
void
gst_egl_image_unref (GstEGLImage *image
);
Decreases the refcount of the image. If the refcount reaches 0, the image with the associated metadata and memory will be freed.
void (*GstEGLImageDestroyNotify) (GstEGLImage *image
,gpointer data
);
Function to be called when the GstEGLImage is destroyed. It should free the associated EGLImage if necessary