Show a patch.

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

{
    "id": 13321,
    "url": "https://patchwork.libcamera.org/api/patches/13321/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13321/",
    "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": "<20210811232625.17280-14-laurent.pinchart@ideasonboard.com>",
    "date": "2021-08-11T23:26:24",
    "name": "[libcamera-devel,v3,13/14] libcamera: pipeline_handler: Drop controls() and properties() functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9c3847d975b9cc4f67e77873aa6b4bc1a712401b",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13321/mbox/",
    "series": [
        {
            "id": 2341,
            "url": "https://patchwork.libcamera.org/api/series/2341/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2341",
            "date": "2021-08-11T23:26:11",
            "name": "libcamera: Replace CameraData with Camera::Private",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2341/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13321/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13321/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 D5716C3248\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 11 Aug 2021 23:26:46 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7BD16688E5;\n\tThu, 12 Aug 2021 01:26:46 +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 3BC1E688AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 01:26:37 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D8EB34A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 01:26:36 +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=\"XCiBQxkk\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628724397;\n\tbh=pMqhPl6racZhTK89jsnbWM/yhKRswAXCp4lVqRJosuM=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=XCiBQxkkJsCEi/brf8AnXCeDIfRTkce4efBnXFR+TJQ7CkOyeKIhf5b67PV5j2Ihr\n\tcni7p0iFtm6QA9uhm0xdvOWKALKVuIGCt7waQfz+wQ9fHHAIa/H5bOhlf9GlQa5P+T\n\tGt19istgNnTyHvpwrGBFgFdKFLb8cFcU834jVIDw=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 12 Aug 2021 02:26:24 +0300",
        "Message-Id": "<20210811232625.17280-14-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210811232625.17280-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20210811232625.17280-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 13/14] libcamera: pipeline_handler:\n\tDrop controls() and properties() functions",
        "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 PipelineHandler controls() and properties() functions are only used\nby the Camera class. Now that the controls and properties are stored in\nthe Camera::Private class, we can drop those functions and access the\nprivate data directly in Camera::controls() and Camera::properties().\n\nSuggested-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/pipeline_handler.h |  3 ---\n src/libcamera/camera.cpp                      |  4 ++--\n src/libcamera/pipeline_handler.cpp            | 21 -------------------\n 3 files changed, 2 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\nindex 1e48f7076d18..41cba44d990f 100644\n--- a/include/libcamera/internal/pipeline_handler.h\n+++ b/include/libcamera/internal/pipeline_handler.h\n@@ -46,9 +46,6 @@ public:\n \tbool lock();\n \tvoid unlock();\n \n-\tconst ControlInfoMap &controls(const Camera *camera) const;\n-\tconst ControlList &properties(const Camera *camera) const;\n-\n \tvirtual CameraConfiguration *generateConfiguration(Camera *camera,\n \t\tconst StreamRoles &roles) = 0;\n \tvirtual int configure(Camera *camera, CameraConfiguration *config) = 0;\ndiff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex a22cc7b8e49d..c20e05014fb9 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -800,7 +800,7 @@ int Camera::release()\n  */\n const ControlInfoMap &Camera::controls() const\n {\n-\treturn _d()->pipe_->controls(this);\n+\treturn _d()->controlInfo_;\n }\n \n /**\n@@ -813,7 +813,7 @@ const ControlInfoMap &Camera::controls() const\n  */\n const ControlList &Camera::properties() const\n {\n-\treturn _d()->pipe_->properties(this);\n+\treturn _d()->properties_;\n }\n \n /**\ndiff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex 62d29cbeff02..597d4c6a578a 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -176,27 +176,6 @@ void PipelineHandler::unlock()\n \t\tmedia->unlock();\n }\n \n-/**\n- * \\brief Retrieve the list of controls for a camera\n- * \\param[in] camera The camera\n- * \\context This function is \\threadsafe.\n- * \\return A ControlInfoMap listing the controls support by \\a camera\n- */\n-const ControlInfoMap &PipelineHandler::controls(const Camera *camera) const\n-{\n-\treturn camera->_d()->controlInfo_;\n-}\n-\n-/**\n- * \\brief Retrieve the list of properties for a camera\n- * \\param[in] camera The camera\n- * \\return A ControlList of properties supported by \\a camera\n- */\n-const ControlList &PipelineHandler::properties(const Camera *camera) const\n-{\n-\treturn camera->_d()->properties_;\n-}\n-\n /**\n  * \\fn PipelineHandler::generateConfiguration()\n  * \\brief Generate a camera configuration for a specified camera\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "13/14"
    ]
}