Patch Detail
Show a patch.
GET /api/patches/11451/?format=api
{ "id": 11451, "url": "https://patchwork.libcamera.org/api/patches/11451/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11451/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20210302141844.126634-5-jacopo@jmondi.org>", "date": "2021-03-02T14:18:37", "name": "[libcamera-devel,v4,04/11] android: camera_device: Rename buffer fields", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d0561cd8050b2aac69a438e94e10ff602ccb4989", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11451/mbox/", "series": [ { "id": 1740, "url": "https://patchwork.libcamera.org/api/series/1740/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1740", "date": "2021-03-02T14:18:33", "name": "android: Supports memory backends", "version": 4, "mbox": "https://patchwork.libcamera.org/series/1740/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11451/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11451/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 9B92ABD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 2 Mar 2021 14:18:28 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7647168A9A;\n\tTue, 2 Mar 2021 15:18:28 +0100 (CET)", "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F89B68A7E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 2 Mar 2021 15:18:27 +0100 (CET)", "from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 80D22200004;\n\tTue, 2 Mar 2021 14:18:25 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 2 Mar 2021 15:18:37 +0100", "Message-Id": "<20210302141844.126634-5-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20210302141844.126634-1-jacopo@jmondi.org>", "References": "<20210302141844.126634-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v4 04/11] android: camera_device: Rename\n\tbuffer fields", "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>", "Cc": "Han-lin Chen <hanlinchen@chromium.org>,\n\tDaniel Hung-yu Wu <hywu@google.com>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The buffers passed to the post processor are currently named 'buffer'\nand 'mapped', names that do not convey their role.\n\nUse 'src' and 'dest' instead.\n\nCosmetic change only.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex f47f28b8c7ee..1c3b0f56ed28 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1851,8 +1851,8 @@ void CameraDevice::requestComplete(Request *request)\n \t\tif (cameraStream->camera3Stream().format != HAL_PIXEL_FORMAT_BLOB)\n \t\t\tcontinue;\n \n-\t\tFrameBuffer *buffer = request->findBuffer(cameraStream->stream());\n-\t\tif (!buffer) {\n+\t\tFrameBuffer *src = request->findBuffer(cameraStream->stream());\n+\t\tif (!src) {\n \t\t\tLOG(HAL, Error) << \"Failed to find a source stream buffer\";\n \t\t\tcontinue;\n \t\t}\n@@ -1862,14 +1862,14 @@ void CameraDevice::requestComplete(Request *request)\n \t\t * separate thread.\n \t\t */\n \n-\t\tCameraBuffer mapped(*descriptor->buffers_[i].buffer,\n-\t\t\t\t PROT_READ | PROT_WRITE);\n-\t\tif (!mapped.isValid()) {\n-\t\t\tLOG(HAL, Error) << \"Failed to mmap android blob buffer\";\n+\t\tCameraBuffer dest(*descriptor->buffers_[i].buffer,\n+\t\t\t\t PROT_READ | PROT_WRITE);\n+\t\tif (!dest.isValid()) {\n+\t\t\tLOG(HAL, Error) << \"Failed to map android blob buffer\";\n \t\t\tcontinue;\n \t\t}\n \n-\t\tint ret = cameraStream->process(*buffer, &mapped,\n+\t\tint ret = cameraStream->process(*src, &dest,\n \t\t\t\t\t\tdescriptor->settings_,\n \t\t\t\t\t\tresultMetadata.get());\n \t\tif (ret) {\n@@ -1882,7 +1882,7 @@ void CameraDevice::requestComplete(Request *request)\n \t\t * done processing it.\n \t\t */\n \t\tif (cameraStream->type() == CameraStream::Type::Internal)\n-\t\t\tcameraStream->putBuffer(buffer);\n+\t\t\tcameraStream->putBuffer(src);\n \t}\n \n \t/* Prepare to call back the Android camera stack. */\n", "prefixes": [ "libcamera-devel", "v4", "04/11" ] }