Patch Detail
Show a patch.
GET /api/1.1/patches/14176/?format=api
{ "id": 14176, "url": "https://patchwork.libcamera.org/api/1.1/patches/14176/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14176/", "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-3-umang.jain@ideasonboard.com>", "date": "2021-10-19T11:47:52", "name": "[libcamera-devel,v2,02/12] android: camera_request: Turn struct into a class", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1624ae77972c6c7a6814b3e271a1464ee2188b25", "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/14176/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/14176/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14176/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 5DE62C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Oct 2021 11:48:16 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2A30C68F60;\n\tTue, 19 Oct 2021 13:48:16 +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 A87E5604FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Oct 2021 13:48:14 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [103.251.226.98])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5529212A;\n\tTue, 19 Oct 2021 13:48:12 +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=\"gpJh2n5Z\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634644094;\n\tbh=OuXtvyGtTPInpPDdLC4YZsaWGHSEYQbAcgVzmXN1tQ0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=gpJh2n5Zek9HNLsWvXw+AXJUwNgdAkc5FQ0UrwLgbgXEuJv3ftpbrJyV6ZAj8M27i\n\tjLM574TyBmm3fgir5D0Ezs7kH43eCaz6MstSWaxGQvOxrGx5eK6wI3q6cTSttz7cr7\n\tAGaYPgNA+vjPU/y7x0qQWamDBNNYuuY8sVuCJT0s=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 19 Oct 2021 17:17:52 +0530", "Message-Id": "<20211019114802.665980-3-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 02/12] android: camera_request: Turn\n\tstruct into a class", "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\nThe Camera3RequestDescriptor structure is growing into an object with\nmember functions. Turn it into a class, uninline the destructor to\nreduce code size, explicitly disable copy as requests are not copyable,\nand delete the default constructor to force all instances to be fully\nconstructed.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.h | 2 +-\n src/android/camera_request.cpp | 8 +++++---\n src/android/camera_request.h | 13 +++++++++----\n 3 files changed, 15 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex 86224aa1..863cf414 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -33,7 +33,7 @@\n #include \"camera_worker.h\"\n #include \"jpeg/encoder.h\"\n \n-struct Camera3RequestDescriptor;\n+class Camera3RequestDescriptor;\n struct CameraConfigData;\n \n class CameraDevice : protected libcamera::Loggable\ndiff --git a/src/android/camera_request.cpp b/src/android/camera_request.cpp\nindex 93e546bf..16a632b3 100644\n--- a/src/android/camera_request.cpp\n+++ b/src/android/camera_request.cpp\n@@ -10,10 +10,10 @@\n using namespace libcamera;\n \n /*\n- * \\struct Camera3RequestDescriptor\n+ * \\class Camera3RequestDescriptor\n *\n- * A utility structure that groups information about a capture request to be\n- * later re-used at request complete time to notify the framework.\n+ * A utility class that groups information about a capture request to be later\n+ * reused at request complete time to notify the framework.\n */\n \n Camera3RequestDescriptor::Camera3RequestDescriptor(\n@@ -43,3 +43,5 @@ Camera3RequestDescriptor::Camera3RequestDescriptor(\n \trequest_ = std::make_unique<CaptureRequest>(camera,\n \t\t\t\t\t\t reinterpret_cast<uint64_t>(this));\n }\n+\n+Camera3RequestDescriptor::~Camera3RequestDescriptor() = default;\ndiff --git a/src/android/camera_request.h b/src/android/camera_request.h\nindex 1346f6fa..79dfdb58 100644\n--- a/src/android/camera_request.h\n+++ b/src/android/camera_request.h\n@@ -10,6 +10,8 @@\n #include <memory>\n #include <vector>\n \n+#include <libcamera/base/class.h>\n+\n #include <libcamera/camera.h>\n #include <libcamera/framebuffer.h>\n \n@@ -18,18 +20,18 @@\n #include \"camera_metadata.h\"\n #include \"camera_worker.h\"\n \n-struct Camera3RequestDescriptor {\n+class Camera3RequestDescriptor\n+{\n+public:\n \tenum class Status {\n \t\tPending,\n \t\tSuccess,\n \t\tError,\n \t};\n \n-\tCamera3RequestDescriptor() = default;\n-\t~Camera3RequestDescriptor() = default;\n \tCamera3RequestDescriptor(libcamera::Camera *camera,\n \t\t\t\t const camera3_capture_request_t *camera3Request);\n-\tCamera3RequestDescriptor &operator=(Camera3RequestDescriptor &&) = default;\n+\t~Camera3RequestDescriptor();\n \n \tbool isPending() const { return status_ == Status::Pending; }\n \n@@ -41,6 +43,9 @@ struct Camera3RequestDescriptor {\n \n \tcamera3_capture_result_t captureResult_ = {};\n \tStatus status_ = Status::Pending;\n+\n+private:\n+\tLIBCAMERA_DISABLE_COPY(Camera3RequestDescriptor)\n };\n \n #endif /* __ANDROID_CAMERA_REQUEST_H__ */\n", "prefixes": [ "libcamera-devel", "v2", "02/12" ] }