Patch Detail
Show a patch.
GET /api/1.1/patches/11649/?format=api
{ "id": 11649, "url": "https://patchwork.libcamera.org/api/1.1/patches/11649/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11649/", "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": "<20210323014226.3211412-5-hiroh@chromium.org>", "date": "2021-03-23T01:42:22", "name": "[libcamera-devel,4/8] android: CameraDevice: Take shared_ptr in constructor", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c9cabdc4cec65650078effb7301de3562eb1126f", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11649/mbox/", "series": [ { "id": 1817, "url": "https://patchwork.libcamera.org/api/1.1/series/1817/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1817", "date": "2021-03-23T01:42:18", "name": "Improve pointer types in android HAL adaptation layer", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1817/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11649/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11649/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 17BACC32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 01:42:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BB4BC68D66;\n\tTue, 23 Mar 2021 02:42:45 +0100 (CET)", "from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com\n\t[IPv6:2607:f8b0:4864:20::1031])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5041A6084F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 02:42:43 +0100 (CET)", "by mail-pj1-x1031.google.com with SMTP id w8so9372532pjf.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Mar 2021 18:42:43 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:8115:e5cc:747b:64de])\n\tby smtp.gmail.com with ESMTPSA id\n\th13sm590527pjv.52.2021.03.22.18.42.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 22 Mar 2021 18:42:41 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"avg53zh9\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=9SsannRWX5zE+DBPjpFdYVxvGcaefXukUFwOVlU+/EA=;\n\tb=avg53zh96onRkxS6ny1mMHN0pYgjwImD5tCglZHwDG3Ezg7MZf2VLNbT3NXagg2hcL\n\tz0WkLY37p2RMY6BCcFSTGirYxxY4LW6WkM1tE5k6Nf3oYQv/sxz/Gh75VtpHqhneR6Y/\n\t1ZojvAoTDb3FoO2GTh1pmUPTppmcMYESrtErM=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=9SsannRWX5zE+DBPjpFdYVxvGcaefXukUFwOVlU+/EA=;\n\tb=K2dr7cRUJc3e6RXuLHZ2paasQn7+AQkrNUEtc9+h9hvlIYXWaenuc2uRRzqWaQt6oL\n\tEGlmvNypT74YK1XGOObsWKFkLkm3TnHuTv3dTg6oaQ9Dql6EYZ0DH523Db6R9RbLDnx9\n\tj9dbBQD6k81AR1wyirmmkhJc8trnHZ0zcHiDxTirq2Sra4GcgLxvrWowuJuBdCfgPXnX\n\tk3LOnWJW5DQKcw1BqsN2xGSh9V1iA2ufG7i1bimzyHXn5iiMHtW5eqGW7wdSnf+dmNNV\n\tjbbGZCP7eSyQvjnJ4EWMl4er8D/xkYfz/WDNcx0IngwtbbMYM1yiVDQ1Q7M52ab8H+Zf\n\tRxPA==", "X-Gm-Message-State": "AOAM532vdtkPEAuBXdOdNTJFWmClcRt4qv0jCMrEa4YYtl1JbtEsz2bE\n\twpbAuwcMwjiNP7d1Gy5OGJDtzy5bUIi4IQ==", "X-Google-Smtp-Source": "ABdhPJwQ5W1S6LkZh8yagkiGusvLma9LvY7d2p94QwHN/9JzkAkhAZHiaL5kHXEu20PIROJKvap81g==", "X-Received": "by 2002:a17:90a:a414:: with SMTP id\n\ty20mr1860919pjp.77.1616463761774; \n\tMon, 22 Mar 2021 18:42:41 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 23 Mar 2021 10:42:22 +0900", "Message-Id": "<20210323014226.3211412-5-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.31.0.rc2.261.g7f71774620-goog", "In-Reply-To": "<20210323014226.3211412-1-hiroh@chromium.org>", "References": "<20210323014226.3211412-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 4/8] android: CameraDevice: Take\n\tshared_ptr in constructor", "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>", "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": "CameraDevice takes the ownership of Camera. Therefore,\nshared_ptr would rather be used than const shared_ptr&.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n\n---\n src/android/camera_device.cpp | 12 +++++++-----\n src/android/camera_device.h | 4 ++--\n 2 files changed, 9 insertions(+), 7 deletions(-)\n\n--\n2.31.0.rc2.261.g7f71774620-goog", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex d0955de7..c0630e53 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -312,9 +312,10 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n * back to the framework using the designated callbacks.\n */\n\n-CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n-\t: id_(id), running_(false), camera_(camera), staticMetadata_(nullptr),\n-\t facing_(CAMERA_FACING_FRONT), orientation_(0)\n+CameraDevice::CameraDevice(unsigned int id, std::shared_ptr<Camera> camera)\n+\t: id_(id), running_(false), camera_(std::move(camera)),\n+\t staticMetadata_(nullptr), facing_(CAMERA_FACING_FRONT),\n+\t orientation_(0)\n {\n \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n\n@@ -351,9 +352,10 @@ CameraDevice::~CameraDevice()\n }\n\n std::unique_ptr<CameraDevice> CameraDevice::create(unsigned int id,\n-\t\t\t\t\t\t const std::shared_ptr<Camera> &cam)\n+\t\t\t\t\t\t std::shared_ptr<Camera> cam)\n {\n-\treturn std::unique_ptr<CameraDevice>(new CameraDevice(id, cam));\n+\treturn std::unique_ptr<CameraDevice>(\n+\t\tnew CameraDevice(id, std::move(cam)));\n }\n\n /*\ndiff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex 8be7f305..555b33e7 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -33,7 +33,7 @@ class CameraDevice : protected libcamera::Loggable\n {\n public:\n \tstatic std::unique_ptr<CameraDevice> create(unsigned int id,\n-\t\t\t\t\t\t const std::shared_ptr<libcamera::Camera> &cam);\n+\t\t\t\t\t\t std::shared_ptr<libcamera::Camera> cam);\n \t~CameraDevice();\n\n \tint initialize();\n@@ -66,7 +66,7 @@ protected:\n \tstd::string logPrefix() const override;\n\n private:\n-\tCameraDevice(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera);\n+\tCameraDevice(unsigned int id, std::shared_ptr<libcamera::Camera> camera);\n\n \tstruct Camera3RequestDescriptor {\n \t\tCamera3RequestDescriptor(libcamera::Camera *camera,\n", "prefixes": [ "libcamera-devel", "4/8" ] }