Show a patch.

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

{
    "id": 8512,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/8512/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8512/",
    "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": "<20200629163916.1815321-3-kieran.bingham@ideasonboard.com>",
    "date": "2020-06-29T16:39:14",
    "name": "[libcamera-devel,2/4] libcamera: camera: Return a reference to the new configuration when adding",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "64fb8bd8bf06fc55cdb6867b9dd69433b6266950",
    "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/8512/mbox/",
    "series": [
        {
            "id": 1060,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1060/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1060",
            "date": "2020-06-29T16:39:12",
            "name": "Android HAL multi-stream support",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1060/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8512/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8512/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 E3FB3BFFE2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Jun 2020 16:39:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B172160AF2;\n\tMon, 29 Jun 2020 18:39:25 +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 20B16609DB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Jun 2020 18:39:21 +0200 (CEST)",
            "from Q.local (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net\n\t[86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B41AEAF3;\n\tMon, 29 Jun 2020 18:39:20 +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=\"XoTlh50A\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593448760;\n\tbh=VvYQCSZDSdlBx3pYRD0FSJ2qtclPcmtvodBctcl9sDQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=XoTlh50A3KWlfH7oqXCHmOx+WBweFPFSlIkRG4cqxl8+QWhkN+jV3rLn1Ie80V1yE\n\tGkLLxvDo81BVa6qZv/AYVuRiOeqz7bBn8Z5XIqAKCrW2MqMhZ+vCq//n9wGwvh3KF+\n\tg1wS+c6ipG81Pab7a2JNx0lsXIwdg/sdLnVOmOKY=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Mon, 29 Jun 2020 17:39:14 +0100",
        "Message-Id": "<20200629163916.1815321-3-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200629163916.1815321-1-kieran.bingham@ideasonboard.com>",
        "References": "<20200629163916.1815321-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 2/4] libcamera: camera: Return a reference\n\tto the new configuration when adding",
        "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": "Facilitate easily referencing of the newly added StreamConfiguration\nas the source structure is copied, and not used after it has been added.\n\nThis simplifies the caller, and allows the caller to compare the\nstructure it passed to add, and the newly added configuration after\nvalidate() has been called.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/camera.h |  3 ++-\n src/libcamera/camera.cpp   | 10 +++++++++-\n 2 files changed, 11 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\nindex 4d1a4a9f52ec..aee3a69881fc 100644\n--- a/include/libcamera/camera.h\n+++ b/include/libcamera/camera.h\n@@ -38,7 +38,8 @@ public:\n \n \tvirtual ~CameraConfiguration();\n \n-\tvoid addConfiguration(const StreamConfiguration &cfg);\n+\tStreamConfiguration &addConfiguration(const StreamConfiguration &cfg);\n+\n \tvirtual Status validate() = 0;\n \n \tStreamConfiguration &at(unsigned int index);\ndiff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 69a1b4428e3f..a3b91cecc86d 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -104,10 +104,18 @@ CameraConfiguration::~CameraConfiguration()\n /**\n  * \\brief Add a stream configuration to the camera configuration\n  * \\param[in] cfg The stream configuration\n+ *\n+ * This method adds a new stream configuration to the CameraConfiguration using\n+ * the values given in cfg, which are copied. A reference to the destination\n+ * new StreamConfiguration is returned.\n+ *\n+ * \\return A reference to the newly added stream configuration\n  */\n-void CameraConfiguration::addConfiguration(const StreamConfiguration &cfg)\n+StreamConfiguration &CameraConfiguration::addConfiguration(const StreamConfiguration &cfg)\n {\n \tconfig_.push_back(cfg);\n+\n+\treturn config_.back();\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel",
        "2/4"
    ]
}