Show a patch.

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

{
    "id": 2416,
    "url": "https://patchwork.libcamera.org/api/patches/2416/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2416/",
    "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": "<20191209163446.32381-6-jacopo@jmondi.org>",
    "date": "2019-12-09T16:34:41",
    "name": "[libcamera-devel,v3,05/10] libcamera: v4l2_controls: Store default value",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8594426f128f3e05f7216b290a9f894417f728d4",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/2416/mbox/",
    "series": [
        {
            "id": 586,
            "url": "https://patchwork.libcamera.org/api/series/586/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=586",
            "date": "2019-12-09T16:34:36",
            "name": "Introduce libcamera properties",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/586/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2416/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2416/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 037EA61D5A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Dec 2019 17:32:44 +0100 (CET)",
            "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2A9811C000E;\n\tMon,  9 Dec 2019 16:32:43 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.114.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  9 Dec 2019 17:34:41 +0100",
        "Message-Id": "<20191209163446.32381-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.24.0",
        "In-Reply-To": "<20191209163446.32381-1-jacopo@jmondi.org>",
        "References": "<20191209163446.32381-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 05/10] libcamera: v4l2_controls: Store\n\tdefault value",
        "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, 09 Dec 2019 16:32:44 -0000"
    },
    "content": "Store the default value for V4L2 controls as reported by the kernel when\ncreating ControlRange instances using information coming from\nv4l2_query_ext_ctrl.\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 src/libcamera/v4l2_controls.cpp | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp\nindex b6547a7c627c..7446c3880330 100644\n--- a/src/libcamera/v4l2_controls.cpp\n+++ b/src/libcamera/v4l2_controls.cpp\n@@ -121,17 +121,20 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl)\n \tswitch (ctrl.type) {\n \tcase V4L2_CTRL_TYPE_BOOLEAN:\n \t\tControlRange::operator=(ControlRange(static_cast<bool>(ctrl.minimum),\n-\t\t\t\t\t\t     static_cast<bool>(ctrl.maximum)));\n+\t\t\t\t\t\t     static_cast<bool>(ctrl.maximum),\n+\t\t\t\t\t\t     static_cast<bool>(ctrl.default_value)));\n \t\tbreak;\n \n \tcase V4L2_CTRL_TYPE_INTEGER64:\n \t\tControlRange::operator=(ControlRange(static_cast<int64_t>(ctrl.minimum),\n-\t\t\t\t\t\t     static_cast<int64_t>(ctrl.maximum)));\n+\t\t\t\t\t\t     static_cast<int64_t>(ctrl.maximum),\n+\t\t\t\t\t\t     static_cast<int64_t>(ctrl.default_value)));\n \t\tbreak;\n \n \tdefault:\n \t\tControlRange::operator=(ControlRange(static_cast<int32_t>(ctrl.minimum),\n-\t\t\t\t\t\t     static_cast<int32_t>(ctrl.maximum)));\n+\t\t\t\t\t\t     static_cast<int32_t>(ctrl.maximum),\n+\t\t\t\t\t\t     static_cast<int32_t>(ctrl.default_value)));\n \t\tbreak;\n \t}\n }\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "05/10"
    ]
}