Show a patch.

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

{
    "id": 23943,
    "url": "https://patchwork.libcamera.org/api/patches/23943/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23943/",
    "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": "<20250724133343.353044-2-uajain@igalia.com>",
    "date": "2025-07-24T13:33:41",
    "name": "[v4,1/3] gstreamer: Split value_set_rectangle() GValue helper",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "97aac087d4541a4b40f1f6f4e77305daabe1e82b",
    "submitter": {
        "id": 232,
        "url": "https://patchwork.libcamera.org/api/people/232/?format=api",
        "name": "Umang Jain",
        "email": "uajain@igalia.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23943/mbox/",
    "series": [
        {
            "id": 5323,
            "url": "https://patchwork.libcamera.org/api/series/5323/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5323",
            "date": "2025-07-24T13:33:41",
            "name": "gstreamer: Report camera properties as device properties",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/5323/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23943/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23943/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 8337CC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Jul 2025 13:33:43 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F0BB6910D;\n\tThu, 24 Jul 2025 15:33:42 +0200 (CEST)",
            "from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5390F690F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jul 2025 15:33:39 +0200 (CEST)",
            "from [49.36.71.87] (helo=uajain) by fanzine2.igalia.com with\n\tesmtpsa \n\t(Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1uew4o-003CfR-Bw; Thu, 24 Jul 2025 15:33:38 +0200"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"mglNfkMm\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=LRaoZxts0rRfXXC/4wwLzCTAK4hhxDv5qrgLBgadjmM=;\n\tb=mglNfkMmE7D/K9JtJ+AmI8ISQn\n\tWiay/IktBTunLuYNgdLqaNy9PgsTYXSBVMjSnlhehFchsAfV79xIi+DCN5P1jOVoiqvcplYlu0GAz\n\tsrLMMEH0dl/5EuwCZDXEAx/at4tGtaco0oXEVcj9hqKjEzH/Y45CYpjOMbzWOljvza6jcZZPV0Rzs\n\tI7+RoiqZvbQYzv2LmhmX1Vp3N/exH5mdLcHtiAeeVG2ZxfnV9VtnCW9lkDgTtalWLHp5lK526LXuK\n\tnbAHBh/P3Jk5tHf9t6kaNMDMhPU1vcKRToQU02zd7g8Gzd008cv6/Q89tQfwmdTs8wx9ElmThvV+v\n\tzrp0k2eQ==;",
        "From": "Umang Jain <uajain@igalia.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jaslo Ziska <jaslo@ziska.de>,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tUmang Jain <uajain@igalia.com>",
        "Subject": "[PATCH v4 1/3] gstreamer: Split value_set_rectangle() GValue helper",
        "Date": "Thu, 24 Jul 2025 19:03:41 +0530",
        "Message-ID": "<20250724133343.353044-2-uajain@igalia.com>",
        "X-Mailer": "git-send-email 2.50.0",
        "In-Reply-To": "<20250724133343.353044-1-uajain@igalia.com>",
        "References": "<20250724133343.353044-1-uajain@igalia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Split the value_set_rectangle() GValue helper into further\nhelpers pertaining to libcamera::Point and libcamera::Size.\nThis would help to cover additional cases where helpers\nare needed for Point and Size individually (in subsequent commits).\n\nThe libcamera::Rectangle's GValue helper can be easily\nconstructed with the new Point and Size helpers. Hence,\nthis patch does not introduce any functional changes.\n\nSigned-off-by: Umang Jain <uajain@igalia.com>\n---\n src/gstreamer/gstlibcamera-controls.cpp.in | 18 ++++++++++++------\n 1 file changed, 12 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/gstreamer/gstlibcamera-controls.cpp.in b/src/gstreamer/gstlibcamera-controls.cpp.in\nindex 2a16b39a..1bc781cc 100644\n--- a/src/gstreamer/gstlibcamera-controls.cpp.in\n+++ b/src/gstreamer/gstlibcamera-controls.cpp.in\n@@ -17,21 +17,21 @@\n \n using namespace libcamera;\n \n-static void value_set_rectangle(GValue *value, const Rectangle &rect)\n+static void value_set_point(GValue *value, const Point &point)\n {\n-\tPoint top_left = rect.topLeft();\n-\tSize size = rect.size();\n-\n \tGValue x = G_VALUE_INIT;\n \tg_value_init(&x, G_TYPE_INT);\n-\tg_value_set_int(&x, top_left.x);\n+\tg_value_set_int(&x, point.x);\n \tgst_value_array_append_and_take_value(value, &x);\n \n \tGValue y = G_VALUE_INIT;\n \tg_value_init(&y, G_TYPE_INT);\n-\tg_value_set_int(&y, top_left.y);\n+\tg_value_set_int(&y, point.y);\n \tgst_value_array_append_and_take_value(value, &y);\n+}\n \n+static void value_set_size(GValue *value, const Size &size)\n+{\n \tGValue width = G_VALUE_INIT;\n \tg_value_init(&width, G_TYPE_INT);\n \tg_value_set_int(&width, size.width);\n@@ -43,6 +43,12 @@ static void value_set_rectangle(GValue *value, const Rectangle &rect)\n \tgst_value_array_append_and_take_value(value, &height);\n }\n \n+static void value_set_rectangle(GValue *value, const Rectangle &rect)\n+{\n+\tvalue_set_point(value, rect.topLeft());\n+\tvalue_set_size(value, rect.size());\n+}\n+\n static Rectangle value_get_rectangle(const GValue *value)\n {\n \tconst GValue *r;\n",
    "prefixes": [
        "v4",
        "1/3"
    ]
}