Show a patch.

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

{
    "id": 2623,
    "url": "https://patchwork.libcamera.org/api/patches/2623/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2623/",
    "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": "<20200113164245.52535-9-jacopo@jmondi.org>",
    "date": "2020-01-13T16:42:30",
    "name": "[libcamera-devel,08/23] libcamera: camera: Add Camera properties",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d42e42b88bcd970ed7d15984727774c91356bfe8",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2623/mbox/",
    "series": [
        {
            "id": 618,
            "url": "https://patchwork.libcamera.org/api/series/618/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=618",
            "date": "2020-01-13T16:42:22",
            "name": "Properties and compound controls",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/618/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2623/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2623/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA685606BD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jan 2020 17:40:30 +0100 (CET)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id F3D3510000A;\n\tMon, 13 Jan 2020 16:40:29 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 13 Jan 2020 17:42:30 +0100",
        "Message-Id": "<20200113164245.52535-9-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.24.0",
        "In-Reply-To": "<20200113164245.52535-1-jacopo@jmondi.org>",
        "References": "<20200113164245.52535-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 08/23] libcamera: camera: Add Camera\n\tproperties",
        "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>",
        "X-List-Received-Date": "Mon, 13 Jan 2020 16:40:31 -0000"
    },
    "content": "Add a method to the Camera class to retrieve the Camera properties\nregistered by the pipeline handler.\n\nWhile at it, reword the Camera::controls() operation documentation to\nspecify that the camera control information are constant during the\ncamera lifetime not their value, while the camera properties value are\nthe actually static information.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/camera.h |  1 +\n src/libcamera/camera.cpp   | 16 +++++++++++++++-\n 2 files changed, 16 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\nindex 6597ade83288..ad9ddaa5231a 100644\n--- a/include/libcamera/camera.h\n+++ b/include/libcamera/camera.h\n@@ -86,6 +86,7 @@ public:\n \tint release();\n \n \tconst ControlInfoMap &controls();\n+\tconst ControlList &properties();\n \n \tconst std::set<Stream *> &streams() const;\n \tstd::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles);\ndiff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 79a5f994f9bb..cd4e8f7ce855 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -547,7 +547,8 @@ int Camera::release()\n /**\n  * \\brief Retrieve the list of controls supported by the camera\n  *\n- * Camera controls remain constant through the lifetime of the camera.\n+ * The list of controls supported by the camera and their associated\n+ * constraints remain constant through the lifetime of the Camera object.\n  *\n  * \\return A ControlInfoMap listing the controls supported by the camera\n  */\n@@ -556,6 +557,19 @@ const ControlInfoMap &Camera::controls()\n \treturn pipe_->controls(this);\n }\n \n+/**\n+ * \\brief Retrieve the list of properties of the camera\n+ *\n+ * Camera properties are static information that describe the capabilities of\n+ * the camera. They remain constant through the lifetime of the Camera object.\n+ *\n+ * \\return A ControlList of properties supported by the camera\n+ */\n+const ControlList &Camera::properties()\n+{\n+\treturn pipe_->properties(this);\n+}\n+\n /**\n  * \\brief Retrieve all the camera's stream information\n  *\n",
    "prefixes": [
        "libcamera-devel",
        "08/23"
    ]
}