Patch Detail
Show a patch.
GET /api/1.1/patches/14180/?format=api
{ "id": 14180, "url": "https://patchwork.libcamera.org/api/1.1/patches/14180/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14180/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20211019114802.665980-7-umang.jain@ideasonboard.com>", "date": "2021-10-19T11:47:56", "name": "[libcamera-devel,v2,06/12] android: camera_stream: Pass StreamBuffer to process()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "049892333227daa56a745858d3b8b679357955be", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": { "id": 12, "url": "https://patchwork.libcamera.org/api/1.1/users/12/?format=api", "username": "uajain", "first_name": "Umang", "last_name": "Jain", "email": "umang.jain@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/14180/mbox/", "series": [ { "id": 2638, "url": "https://patchwork.libcamera.org/api/1.1/series/2638/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2638", "date": "2021-10-19T11:47:50", "name": "android: Overhaul request handling", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2638/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14180/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14180/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E2845C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Oct 2021 11:48:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B24C268F5C;\n\tTue, 19 Oct 2021 13:48:25 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF83A604FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Oct 2021 13:48:23 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [103.251.226.98])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4755312A;\n\tTue, 19 Oct 2021 13:48:22 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"fI0vX8kF\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634644103;\n\tbh=YaOHftBnk6tAz7bEpv0cd6CGz0h22Q1fXu3gpWatf04=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=fI0vX8kFU4XWnUxKEPivuLbHRP+37rJrF/KkaS3T7c4xYnT4sB5JA3KcgpSJ6Htfl\n\tEXjXGlpJHnbCA7WYw1TsMhvXZNSiFIbE9g6EODWKB3fD5l0ycWmwKJ0UGphkxWDoPN\n\trjufSi8jj6JVo6LB7Rb9VpXLR5qNr0fbYFDjcL5I=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 19 Oct 2021 17:17:56 +0530", "Message-Id": "<20211019114802.665980-7-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "In-Reply-To": "<20211019114802.665980-1-umang.jain@ideasonboard.com>", "References": "<20211019114802.665980-1-umang.jain@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 06/12] android: camera_stream: Pass\n\tStreamBuffer to process()", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nNow that we have a proper structure to model a stream buffer, pass it to\nCameraStream::process() instead of the camera3_stream_buffer_t. This\nwill allow accessing other members of StreamBuffer in subsequent\ncommits.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp | 2 +-\n src/android/camera_stream.cpp | 14 +++++++-------\n src/android/camera_stream.h | 5 +++--\n 3 files changed, 11 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 74d9b952..80e11d4b 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1152,7 +1152,7 @@ void CameraDevice::requestComplete(Request *request)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tint ret = cameraStream->process(*src, buffer.buffer, descriptor);\n+\t\tint ret = cameraStream->process(*src, buffer, descriptor);\n \n \t\t/*\n \t\t * Return the FrameBuffer to the CameraStream now that we're\ndiff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 8f47e4d8..f3cc77e7 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -143,15 +143,15 @@ int CameraStream::waitFence(int fence)\n }\n \n int CameraStream::process(const FrameBuffer &source,\n-\t\t\t camera3_stream_buffer_t &camera3Dest,\n+\t\t\t Camera3RequestDescriptor::StreamBuffer &dest,\n \t\t\t Camera3RequestDescriptor *request)\n {\n \t/* Handle waiting on fences on the destination buffer. */\n-\tint fence = camera3Dest.acquire_fence;\n+\tint fence = dest.buffer.acquire_fence;\n \tif (fence != -1) {\n \t\tint ret = waitFence(fence);\n \t\t::close(fence);\n-\t\tcamera3Dest.acquire_fence = -1;\n+\t\tdest.buffer.acquire_fence = -1;\n \t\tif (ret < 0) {\n \t\t\tLOG(HAL, Error) << \"Failed waiting for fence: \"\n \t\t\t\t\t<< fence << \": \" << strerror(-ret);\n@@ -167,14 +167,14 @@ int CameraStream::process(const FrameBuffer &source,\n \t * separate thread.\n \t */\n \tconst StreamConfiguration &output = configuration();\n-\tCameraBuffer dest(*camera3Dest.buffer, output.pixelFormat, output.size,\n-\t\t\t PROT_READ | PROT_WRITE);\n-\tif (!dest.isValid()) {\n+\tCameraBuffer destBuffer(*dest.buffer.buffer, output.pixelFormat,\n+\t\t\t\toutput.size, PROT_READ | PROT_WRITE);\n+\tif (!destBuffer.isValid()) {\n \t\tLOG(HAL, Error) << \"Failed to create destination buffer\";\n \t\treturn -EINVAL;\n \t}\n \n-\treturn postProcessor_->process(source, &dest, request);\n+\treturn postProcessor_->process(source, &destBuffer, request);\n }\n \n FrameBuffer *CameraStream::getBuffer()\ndiff --git a/src/android/camera_stream.h b/src/android/camera_stream.h\nindex 405b232d..197bd995 100644\n--- a/src/android/camera_stream.h\n+++ b/src/android/camera_stream.h\n@@ -19,7 +19,8 @@\n #include <libcamera/geometry.h>\n #include <libcamera/pixel_format.h>\n \n-class Camera3RequestDescriptor;\n+#include \"camera_request.h\"\n+\n class CameraDevice;\n class PostProcessor;\n \n@@ -119,7 +120,7 @@ public:\n \n \tint configure();\n \tint process(const libcamera::FrameBuffer &source,\n-\t\t camera3_stream_buffer_t &camera3Buffer,\n+\t\t Camera3RequestDescriptor::StreamBuffer &dest,\n \t\t Camera3RequestDescriptor *request);\n \tlibcamera::FrameBuffer *getBuffer();\n \tvoid putBuffer(libcamera::FrameBuffer *buffer);\n", "prefixes": [ "libcamera-devel", "v2", "06/12" ] }