summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch
diff options
context:
space:
mode:
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2017-01-18 11:32:11 +0900
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2017-01-18 11:32:43 +0900
commit793d8d01d0377dad21f4e1a330f00d822eced086 (patch)
tree002df733dc532616ede3f90a6392ebc5ce0f316b /meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch
parentd53759600dc1e97ce47ba7b0f7958b105012386a (diff)
parent2420779506844c8b8cf2f50d8f08b622dc6468f6 (diff)
Merge branch 'chinook_fixed' into chinook
This merge is needed to support cluster combination of AGL CES2017 Demo. Change-Id: Iad92027680273ac0ad931a916fe2c3cafa91d600 Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch')
-rw-r--r--meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch b/meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch
new file mode 100644
index 0000000..c6b5c36
--- /dev/null
+++ b/meta-rcar-gen2/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-gssomxbufferpool-add-exported-flag.patch
@@ -0,0 +1,75 @@
+From c4e86a58041cd4408d283444dcba6f532a80697c Mon Sep 17 00:00:00 2001
+From: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
+Date: Thu, 1 Sep 2016 17:33:44 +0300
+Subject: [PATCH 05/10] gssomxbufferpool: add exported flag
+
+This flag indicates that buffer are used outside of OMX component
+
+Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
+---
+ omx/gstomx.c | 1 +
+ omx/gstomx.h | 5 +++++
+ omx/gstomxbufferpool.c | 5 ++++-
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/omx/gstomx.c b/omx/gstomx.c
+index c018e72..5a916dc 100644
+--- a/omx/gstomx.c
++++ b/omx/gstomx.c
+@@ -1663,6 +1663,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port,
+ buf = g_slice_new0 (GstOMXBuffer);
+ buf->port = port;
+ buf->used = FALSE;
++ buf->exported = FALSE;
+ buf->settings_cookie = port->settings_cookie;
+ g_ptr_array_add (port->buffers, buf);
+
+diff --git a/omx/gstomx.h b/omx/gstomx.h
+index 84980f3..27cb2a9 100644
+--- a/omx/gstomx.h
++++ b/omx/gstomx.h
+@@ -279,6 +279,11 @@ struct _GstOMXBuffer {
+ */
+ gboolean used;
+
++ /* TRUE if the buffer exported outside the component,
++ * i.e. someone acquired this buffer
++ */
++ gboolean exported;
++
+ /* Cookie of the settings when this buffer was allocated */
+ gint settings_cookie;
+
+diff --git a/omx/gstomxbufferpool.c b/omx/gstomxbufferpool.c
+index b9fa769..1e0a14c 100644
+--- a/omx/gstomxbufferpool.c
++++ b/omx/gstomxbufferpool.c
+@@ -695,7 +695,7 @@ gst_omx_buffer_pool_acquire_buffer (GstBufferPool * bpool,
+ pool->enc_buffer_index = 0;
+
+ count += 1;
+- } while (omx_buf->used == TRUE &&
++ } while (omx_buf->exported == TRUE &&
+ count < pool->port->port_def.nBufferCountActual * 3);
+
+ if (count == pool->port->port_def.nBufferCountActual * 3) {
+@@ -703,6 +703,7 @@ gst_omx_buffer_pool_acquire_buffer (GstBufferPool * bpool,
+ GST_ERROR_OBJECT (pool,
+ "Can not acquire buffer after 3 times searching");
+ } else {
++ omx_buf->exported = TRUE;
+ *buffer = buf;
+ ret = GST_FLOW_OK;
+ }
+@@ -731,6 +732,8 @@ gst_omx_buffer_pool_release_buffer (GstBufferPool * bpool, GstBuffer * buffer)
+ omx_buf =
+ gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (buffer),
+ gst_omx_buffer_data_quark);
++ if (GST_IS_OMX_VIDEO_ENC (pool->element))
++ omx_buf->exported = FALSE;
+ if (pool->port->port_def.eDir == OMX_DirOutput && !omx_buf->used) {
+ /* Release back to the port, can be filled again */
+ err = gst_omx_port_release_buffer (pool->port, omx_buf);
+--
+1.7.10.4
+