summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-13 10:29:23 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-13 13:10:28 +0100
commitacf15e84a9526e6f1f1d7008d33e4e21c20ba52e (patch)
treee452bead3f51378a2abc4de3d313d2acc901bf97
parentb9af5f4f31f844023231ce42ad4b7795a616612d (diff)
downloadgst-omx-acf15e84a9526e6f1f1d7008d33e4e21c20ba52e.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.c3
-rw-r--r--omx/gstomx.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 71a9b61..84bac15 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -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) {
diff --git a/omx/gstomx.h b/omx/gstomx.h
index eeb2e66..eedb9ef 100644
--- a/omx/gstomx.h
+++ b/omx/gstomx.h
@@ -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 {