Show a patch.

GET /api/patches/1846/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1846,
    "url": "https://patchwork.libcamera.org/api/patches/1846/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1846/",
    "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": "<20190818011329.14499-10-laurent.pinchart@ideasonboard.com>",
    "date": "2019-08-18T01:13:24",
    "name": "[libcamera-devel,09/14] android: Pass Camera shared pointer to CameraDevice by const reference",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "632c881cbc329f93667f3d79871c834690b6faee",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": {
        "id": 14,
        "url": "https://patchwork.libcamera.org/api/users/14/?format=api",
        "username": "pinchartl",
        "first_name": "Laurent",
        "last_name": "Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/1846/mbox/",
    "series": [
        {
            "id": 464,
            "url": "https://patchwork.libcamera.org/api/series/464/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=464",
            "date": "2019-08-18T01:13:15",
            "name": "Assorted fixes for Android camera HAL",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/464/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1846/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1846/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D06C61927\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 18 Aug 2019 03:13:44 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8745651C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 18 Aug 2019 03:13:43 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1566090823;\n\tbh=9kg8EUxK5zBDKVa8ZhVkZ7QFPLtbsSMOGu7jdf198lU=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Fz2AdRFnufT3++GY4iBp4HV5+n9dXQOa8ktORofKQlFAQ8Wu2m2cA6OOCqYGuJ0rV\n\tPDOC7r5nJVoD92FxxJlklNw+BKVGaWJ8xmUeF6+dOjJntPufQ8UEzUuVGDmkiM6PTS\n\tVpPCPhGEqWKJBLAwwgr7OabohAvVkkNEWdLQfmGE=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sun, 18 Aug 2019 04:13:24 +0300",
        "Message-Id": "<20190818011329.14499-10-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190818011329.14499-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20190818011329.14499-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 09/14] android: Pass Camera shared pointer\n\tto CameraDevice by const reference",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Sun, 18 Aug 2019 01:13:44 -0000"
    },
    "content": "The CameraDevice is constructed with a Camera instance passed through a\nshared pointer. It makes an internal copy of the pointer, which can be\npassed by const reference instead of value. This optimises the\nconstructor slightly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp | 2 +-\n src/android/camera_device.h   | 2 +-\n src/android/camera_proxy.cpp  | 2 +-\n src/android/camera_proxy.h    | 2 +-\n 4 files changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 999c51e6ba4a..9acfed694abc 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n  * to the framework using the designated callbacks.\n  */\n \n-CameraDevice::CameraDevice(unsigned int id, std::shared_ptr<Camera> &camera)\n+CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n \t: running_(false), camera_(camera), staticMetadata_(nullptr),\n \t  requestTemplate_(nullptr)\n {\ndiff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex 4d834ceb08a5..7897ba9dc5c7 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -31,7 +31,7 @@ class ThreadRpc;\n class CameraDevice : public libcamera::Object\n {\n public:\n-\tCameraDevice(unsigned int id, std::shared_ptr<libcamera::Camera> &camera);\n+\tCameraDevice(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera);\n \t~CameraDevice();\n \n \tvoid call(ThreadRpc *rpc);\ndiff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\nindex 3eb2f9fbcffb..4f5c0a024903 100644\n--- a/src/android/camera_proxy.cpp\n+++ b/src/android/camera_proxy.cpp\n@@ -113,7 +113,7 @@ static camera3_device_ops hal_dev_ops = {\n \t.reserved = { nullptr },\n };\n \n-CameraProxy::CameraProxy(unsigned int id, std::shared_ptr<Camera> camera)\n+CameraProxy::CameraProxy(unsigned int id, const std::shared_ptr<Camera> &camera)\n \t: id_(id)\n {\n \tcameraDevice_ = new CameraDevice(id, camera);\ndiff --git a/src/android/camera_proxy.h b/src/android/camera_proxy.h\nindex da63bfa79fc9..7940eac4e376 100644\n--- a/src/android/camera_proxy.h\n+++ b/src/android/camera_proxy.h\n@@ -19,7 +19,7 @@ class ThreadRpc;\n class CameraProxy\n {\n public:\n-\tCameraProxy(unsigned int id, std::shared_ptr<libcamera::Camera> camera);\n+\tCameraProxy(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera);\n \t~CameraProxy();\n \n \tint open(const hw_module_t *hardwareModule);\n",
    "prefixes": [
        "libcamera-devel",
        "09/14"
    ]
}