Show a patch.

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

{
    "id": 23465,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23465/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23465/",
    "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": "<20250604130741.9228-5-laurent.pinchart@ideasonboard.com>",
    "date": "2025-06-04T13:07:38",
    "name": "[v2,4/7] gstreamer: Rename variable in gst_libcamera_create_video_pool()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "753cb3a13ec2ffc60a51a9930fb524202d4b79be",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23465/mbox/",
    "series": [
        {
            "id": 5204,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5204/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5204",
            "date": "2025-06-04T13:07:34",
            "name": "gstreamer: Miscellaneous cleanups + two fixes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5204/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23465/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23465/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 1EB05C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  4 Jun 2025 13:08:05 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 512D968DBF;\n\tWed,  4 Jun 2025 15:08:02 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EA92F68DBD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Jun 2025 15:07:56 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E233714C7;\n\tWed,  4 Jun 2025 15:07:53 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lIKBnG2C\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1749042474;\n\tbh=cHlXNgC6c6wPP2kbB9NZhy0+fGN3x5Sp5xrxbnbyiOM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lIKBnG2CQ7Ki1MJs/ms2tRjqJP6ojCBPOWRyOhsz6S2B+AGaRmJ6KdM0sKfyKUqLd\n\tDWJoiKI21Mr04TAfHrdjZftx/3nADHQpGrbPAabdynyif8FIKT9AinUzWuM1gAe5cn\n\tYVwRaEWBTEed3831y1Pm+HA6R+7m5e18SWecV3LE=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Hou Qi <qi.hou@nxp.com>,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>",
        "Subject": "[PATCH v2 4/7] gstreamer: Rename variable in\n\tgst_libcamera_create_video_pool()",
        "Date": "Wed,  4 Jun 2025 16:07:38 +0300",
        "Message-ID": "<20250604130741.9228-5-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250604130741.9228-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20250604130741.9228-1-laurent.pinchart@ideasonboard.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": "Now that the code is isolated in a function, the video_pool variable in\ngst_libcamera_create_video_pool() can be renamed to pool without\nclashing with another local variable. Do so to reduce line length.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex b907a5759740..9c0ee491ab63 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -543,7 +543,7 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self, GstPad *srcpad,\n {\n \tGstQuery *query = NULL;\n \tconst gboolean need_pool = true;\n-\tGstBufferPool *video_pool = NULL;\n+\tGstBufferPool *pool = NULL;\n \n \t/*\n \t * Get the peer allocation hints to check if it supports the meta API.\n@@ -564,22 +564,22 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self, GstPad *srcpad,\n \t * create a new pool.\n \t */\n \tif (gst_query_get_n_allocation_pools(query) > 0)\n-\t\tgst_query_parse_nth_allocation_pool(query, 0, &video_pool, NULL, NULL, NULL);\n+\t\tgst_query_parse_nth_allocation_pool(query, 0, &pool, NULL, NULL, NULL);\n \n-\tif (!video_pool) {\n+\tif (!pool) {\n \t\tGstStructure *config;\n \t\tguint min_buffers = 3;\n \n-\t\tvideo_pool = gst_video_buffer_pool_new();\n-\t\tconfig = gst_buffer_pool_get_config(video_pool);\n+\t\tpool = gst_video_buffer_pool_new();\n+\t\tconfig = gst_buffer_pool_get_config(pool);\n \t\tgst_buffer_pool_config_set_params(config, caps, info->size, min_buffers, 0);\n \n \t\tGST_DEBUG_OBJECT(self, \"Own pool config is %\" GST_PTR_FORMAT, config);\n \n-\t\tgst_buffer_pool_set_config(GST_BUFFER_POOL_CAST(video_pool), config);\n+\t\tgst_buffer_pool_set_config(GST_BUFFER_POOL_CAST(pool), config);\n \t}\n \n-\tif (!gst_buffer_pool_set_active(video_pool, true)) {\n+\tif (!gst_buffer_pool_set_active(pool, true)) {\n \t\tgst_caps_unref(caps);\n \t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n \t\t\t\t  (\"Failed to active buffer pool\"),\n@@ -588,7 +588,7 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self, GstPad *srcpad,\n \t}\n \n \tgst_query_unref(query);\n-\treturn { video_pool, 0 };\n+\treturn { pool, 0 };\n }\n \n /* Must be called with stream_lock held. */\n",
    "prefixes": [
        "v2",
        "4/7"
    ]
}