diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-03-13 10:29:23 +0100 |
---|---|---|
committer | Josep Torra <n770galaxy@gmail.com> | 2013-03-16 15:54:11 +0100 |
commit | c0e0a1224d5ac809c1c1df11778656cbfe100e53 (patch) | |
tree | 4bf576fceaf34673f640603a1f15ad41041a70c1 | |
parent | fa9f567974c5a9eb55cc48b2f8a33d457738cb18 (diff) | |
download | gst-omx-c0e0a1224d5ac809c1c1df11778656cbfe100e53.tar.gz |
omx: Mark OpenMAX buffers as EGLImage if they contain one
Needs special handling in some places, e.g. because nFilledLen
will always be 0.
-rw-r--r-- | omx/gstomx.c | 3 | ||||
-rw-r--r-- | omx/gstomx.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c index 8738470..c119168 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -1659,14 +1659,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) { diff --git a/omx/gstomx.h b/omx/gstomx.h index 1c5c5ff..5cb06ca 100644 --- a/omx/gstomx.h +++ b/omx/gstomx.h @@ -264,6 +264,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 { |