mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
omx: Mark OpenMAX buffers as EGLImage if they contain one
Needs special handling in some places, e.g. because nFilledLen will always be 0.
This commit is contained in:
parent
b9af5f4f31
commit
acf15e84a9
2 changed files with 6 additions and 0 deletions
|
@ -1575,14 +1575,17 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
|
|||
err =
|
||||
OMX_UseBuffer (comp->handle, &buf->omx_buf, port->index, buf,
|
||||
port->port_def.nBufferSize, l->data);
|
||||
buf->eglimage = FALSE;
|
||||
} else if (images) {
|
||||
err =
|
||||
OMX_UseEGLImage (comp->handle, &buf->omx_buf, port->index, buf,
|
||||
l->data);
|
||||
buf->eglimage = TRUE;
|
||||
} else {
|
||||
err =
|
||||
OMX_AllocateBuffer (comp->handle, &buf->omx_buf, port->index, buf,
|
||||
port->port_def.nBufferSize);
|
||||
buf->eglimage = FALSE;
|
||||
}
|
||||
|
||||
if (err != OMX_ErrorNone) {
|
||||
|
|
|
@ -241,6 +241,9 @@ struct _GstOMXBuffer {
|
|||
|
||||
/* Cookie of the settings when this buffer was allocated */
|
||||
gint settings_cookie;
|
||||
|
||||
/* TRUE if this is an EGLImage */
|
||||
gboolean eglimage;
|
||||
};
|
||||
|
||||
struct _GstOMXClassData {
|
||||
|
|
Loading…
Reference in a new issue