New rebased patches are created

Signed-off-by: Ramprasad N <[email protected]>
---
 ...v4l2src-Increase-minimum-num-buffers-by-3.patch | 31 +++++++++++++++
 ...2src-Use-generic-dmabuf-import-in-v4l2src.patch | 45 ++++++++++++++++++++++
 .../gstreamer1.0-plugins-good_1.14.4.bbappend      |  8 ++++
 3 files changed, 84 insertions(+)
 create mode 100644 
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2src-Increase-minimum-num-buffers-by-3.patch
 create mode 100644 
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch
 create mode 100644 
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend

diff --git 
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2src-Increase-minimum-num-buffers-by-3.patch
 
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2src-Increase-minimum-num-buffers-by-3.patch
new file mode 100644
index 0000000..b1fd548
--- /dev/null
+++ 
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2src-Increase-minimum-num-buffers-by-3.patch
@@ -0,0 +1,31 @@
+From b87857b69e7707e04ce8c0cb97e316d37d7fd297 Mon Sep 17 00:00:00 2001
+From: Ramprasad N <[email protected]>
+Date: Mon, 28 Jan 2019 13:19:30 +0530
+Subject: [PATCH 1/2] v4l2src: Increase minimum num buffers by 3
+
+v4l2src plugin allocates 5 buffers for the pipeline.
+To capture video in realtime the pipeline without frameloss,
+four buffers are not sufficient. Increase the
+number of buffers by 3 more.
+
+Signed-off-by: Ramprasad N <[email protected]>
+---
+ sys/v4l2/gstv4l2object.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
+index 124c778..211f835 100644
+--- a/sys/v4l2/gstv4l2object.c
++++ b/sys/v4l2/gstv4l2object.c
+@@ -4385,7 +4385,7 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, 
GstQuery * query)
+      * held by the decoder. We account 2 buffers for v4l2 so when one is being
+      * pushed downstream the other one can already be queued for the next
+      * frame. */
+-    own_min = min + obj->min_buffers + 2;
++    own_min = min + obj->min_buffers + 5;
+ 
+     /* If no allocation parameters where provided, allow for a little more
+      * buffers and enable copy threshold */
+-- 
+1.9.1
+
diff --git 
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch
 
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch
new file mode 100644
index 0000000..eb07e18
--- /dev/null
+++ 
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch
@@ -0,0 +1,45 @@
+From 4b46918c475040ae4218f2474e564accd953847a Mon Sep 17 00:00:00 2001
+From: Ramprasad N <[email protected]>
+Date: Thu, 22 Mar 2018 12:02:59 +0530
+Subject: [PATCH 2/2] v4l2src: Use generic dmabuf import in v4l2src
+
+In Gstreamer 1.12.2 dmabuf interpreation has got
+changed and it doesn't consider DRM Fds as dmabuf since
+they are not allocated from dmabuf allocator.
+Because of this dmabuf_import will fail for the usecase
+wher v4l2src imports drm buffers allocated from ducati.
+
+With earlier Gstreamer versions, gst_mem_is_dmabuf()
+used to consider if mem_type is DMABUF or not.
+
+Since both dmabuf and drmallocator are derived from
+fdallocator, a generic fd mechanism is used in this patch.
+
+Signed-off-by: Ramprasad N <[email protected]>
+---
+ sys/v4l2/gstv4l2allocator.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c
+index 7e0e7c2..21edd36 100644
+--- a/sys/v4l2/gstv4l2allocator.c
++++ b/sys/v4l2/gstv4l2allocator.c
+@@ -1073,12 +1073,13 @@ gst_v4l2_allocator_import_dmabuf (GstV4l2Allocator * 
allocator,
+     gint dmafd;
+     gsize size, offset, maxsize;
+ 
+-    if (!gst_is_dmabuf_memory (dma_mem[i]))
++    if (!gst_is_dmabuf_memory (dma_mem[i]) &&
++        !gst_memory_is_type (dma_mem[i], GST_ALLOCATOR_DMABUF))
+       goto not_dmabuf;
+ 
+     size = gst_memory_get_sizes (dma_mem[i], &offset, &maxsize);
+ 
+-    if ((dmafd = dup (gst_dmabuf_memory_get_fd (dma_mem[i]))) < 0)
++    if ((dmafd = dup (gst_fd_memory_get_fd (dma_mem[i]))) < 0)
+       goto dup_failed;
+ 
+     GST_LOG_OBJECT (allocator, "imported DMABUF as fd %i plane %d", dmafd, i);
+-- 
+1.9.1
+
diff --git 
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend
 
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend
new file mode 100644
index 0000000..edffa28
--- /dev/null
+++ 
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend
@@ -0,0 +1,8 @@
+PR_append = ".arago0"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+      file://0001-v4l2src-Increase-minimum-num-buffers-by-3.patch \
+      file://0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch \
+      "
-- 
1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to