aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch
diff options
context:
space:
mode:
authorHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>2017-09-15 22:33:47 +0900
committerHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>2017-09-19 10:16:12 +0900
commitc3b43f6db27847fec4588e709d6d16f24065655c (patch)
tree83a39ac1791a99b597a6e746f2cc0f7be797dc0f /recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch
parent4c5676167f81a669d46379a66ba2efbd512b25cd (diff)
Add gst-recorder implementation for weston2.0.0
This commit support virtual display and gst-recorder function for weston2.0.0. It is update patch for weston 2.0.0 and based on 562c0c1bb2ef74ccbfda1bae4f84a61828119674 Virtual display is additional display like as offscreen buffer and it is created from drm-backend. The gst-recorder is a transfer system using H.264 streaming and Ethernet. Change-Id: I1e1b07701229d47ab6616e85d78c6aa039a0775b Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Diffstat (limited to 'recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch')
-rw-r--r--recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch b/recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch
new file mode 100644
index 000000000..8b0d44a17
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0004-gst-record-Specify-bytesused-and-length-of-VSP-input.patch
@@ -0,0 +1,61 @@
+From 90a51301038e492875ac02ed48fa86e699849e06 Mon Sep 17 00:00:00 2001
+From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
+Date: Tue, 9 May 2017 18:07:52 +0900
+Subject: [PATCH 4/4] gst-record: Specify bytesused and length of VSP input
+ buffer
+
+The bytesused=0 setting has been deprecated in newer kernels.
+---
+ libweston/gst-recorder.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libweston/gst-recorder.c b/libweston/gst-recorder.c
+index d2cf8dc..7dafd95 100644
+--- a/libweston/gst-recorder.c
++++ b/libweston/gst-recorder.c
+@@ -484,7 +484,7 @@ vsp_request_buffers(vsp_data_t *vsp, vsp_port_n port, unsigned int num)
+
+ /* ...enqueue dmafd buffer */
+ static int
+-vsp_input_buffer_queue_dmafd(vsp_data_t *vsp, int i, int dmafd)
++vsp_input_buffer_queue_dmafd(vsp_data_t *vsp, int i, int dmafd, int bytesused)
+ {
+ vsp_media_pad_t *pad = &vsp->input;
+ struct v4l2_buffer buf;
+@@ -499,6 +499,8 @@ vsp_input_buffer_queue_dmafd(vsp_data_t *vsp, int i, int dmafd)
+ buf.m.planes = planes;
+ buf.length = 1;
+ buf.m.planes[0].m.fd = dmafd;
++ buf.m.planes[0].bytesused = bytesused;
++ buf.m.planes[0].length = bytesused;
+
+ /* ...submit buffer */
+ if (ioctl(pad->fd, VIDIOC_QBUF, &buf) < 0) {
+@@ -1098,6 +1100,7 @@ gst_recorder_process_dmafd(struct gst_recorder *r, int fd, int stride)
+ GstMapInfo info;
+ int ysize;
+ int csize;
++ int rgbsize;
+
+ /* get GST buffer */
+ if (gst_recorder_omx_buffer_acquire(r, &buf, &info) < 0) {
+@@ -1111,6 +1114,7 @@ gst_recorder_process_dmafd(struct gst_recorder *r, int fd, int stride)
+ #else
+ csize = ysize / 2;
+ #endif
++ rgbsize = stride * r->set->height;
+
+ pthread_mutex_lock(&r->vsp->mutex);
+ /* setup vsp */
+@@ -1139,7 +1143,7 @@ gst_recorder_process_dmafd(struct gst_recorder *r, int fd, int stride)
+ }
+
+ /* queue input vsp buffer */
+- if (vsp_input_buffer_queue_dmafd(r->vsp, 0, fd) < 0) {
++ if (vsp_input_buffer_queue_dmafd(r->vsp, 0, fd, rgbsize) < 0) {
+ weston_log("VSP: failed to queue input buffer\n");
+ goto err_vsp;
+ }
+--
+2.9.2
+