Show a patch.

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

{
    "id": 13463,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13463/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13463/",
    "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": "<20210824142450.3157833-2-kieran.bingham@ideasonboard.com>",
    "date": "2021-08-24T14:24:47",
    "name": "[libcamera-devel,SimpleCam,1/4] simple-cam: Use a unique_ptr for the CameraManager",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5ba2f366e6e5bdb3c6d22a6363bad02151dc526b",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13463/mbox/",
    "series": [
        {
            "id": 2388,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2388/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2388",
            "date": "2021-08-24T14:24:46",
            "name": "Improve CameraManager usage and Doc",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2388/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13463/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13463/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 BA7A2C3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 Aug 2021 14:25:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A15268919;\n\tTue, 24 Aug 2021 16:25:00 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E13B688C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Aug 2021 16:24:56 +0200 (CEST)",
            "from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 172333F0;\n\tTue, 24 Aug 2021 16:24:55 +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=\"HgHdRASD\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629815095;\n\tbh=B3zrvpiFuR119fYKAR7dixmI8rpS7lMvWvhVNUsyPII=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=HgHdRASDekk8prZt4oR7elhWu2XDzS7OSuK3jLd1OL0w/fd/ux3gK8ya71frV7Wn/\n\tlzKoPm6jsOBoqNh96eoqQllo7uBh1Erfdnqfl2K+8R1935R7gj6XLtpkiJX4H4lJbe\n\tkO9WjKfJ2qUnYvXg10bnQ5Y3t3nHid3WjJuUhH/I=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Tue, 24 Aug 2021 15:24:47 +0100",
        "Message-Id": "<20210824142450.3157833-2-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210824142450.3157833-1-kieran.bingham@ideasonboard.com>",
        "References": "<20210824142450.3157833-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [SimpleCam PATCH 1/4] simple-cam: Use a\n\tunique_ptr for the CameraManager",
        "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": "The CameraManager should be released when it is no longer used. A\nunique_ptr will handle this automatically, and convey the lifetime of\nthe object.\n\nUpdate simple-cam to show that managing the lifetime of the\nCameraManager is recommended practice.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n simple-cam.cpp | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/simple-cam.cpp b/simple-cam.cpp\nindex 8f7012b83b6c..5c16db67700c 100644\n--- a/simple-cam.cpp\n+++ b/simple-cam.cpp\n@@ -131,8 +131,15 @@ int main()\n \t *\n \t * The CameraManager provides a list of available Cameras that\n \t * applications can operate on.\n+\t *\n+\t * When the CameraManager is no longer to be used, it should be deleted.\n+\t * We use a unique_ptr here to manage the lifetime automatically during\n+\t * the scope of this function.\n+\t *\n+\t * There can only be a single CameraManager constructed within any\n+\t * process space.\n \t */\n-\tCameraManager *cm = new CameraManager();\n+\tstd::unique_ptr<CameraManager> cm = std::make_unique<CameraManager>();\n \tcm->start();\n \n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "SimpleCam",
        "1/4"
    ]
}