Show a patch.

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

{
    "id": 19382,
    "url": "https://patchwork.libcamera.org/api/patches/19382/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19382/",
    "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": "<20240109143017.21783-1-laurent.pinchart@ideasonboard.com>",
    "date": "2024-01-09T14:30:17",
    "name": "[libcamera-devel] gstreamer: Support for pre-1.16 GstEvent",
    "commit_ref": "0e0043053fb2ced0f7e271df04256091642ea6e6",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5268de7a3dbbe9ef1c13fb8bb8328d8c463fd449",
    "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/19382/mbox/",
    "series": [
        {
            "id": 4138,
            "url": "https://patchwork.libcamera.org/api/series/4138/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4138",
            "date": "2024-01-09T14:30:17",
            "name": "[libcamera-devel] gstreamer: Support for pre-1.16 GstEvent",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4138/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19382/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19382/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 692DFBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 14:30:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2DDBA62B41;\n\tTue,  9 Jan 2024 15:30:11 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3651062B32\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 15:30:09 +0100 (CET)",
            "from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A416552;\n\tTue,  9 Jan 2024 15:29:04 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704810611;\n\tbh=8sSCqT07WNK3cV3srutZqAi634bzx+oBXKe6kvn+xPk=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=JCpcj6UfMjUL6iFrC6VfOIL3VJ8yuJ0+Klk0aHWMNStuEYhsRNxJSZ5ZaulRHOHbz\n\tvMc2Ky5OjsiljgoZ8MBrdzM9gZQF8x8cHLHa4QXjSfLZk2AhSmmziEzxYVm0Iw2SZC\n\t5jiXc8JkwERz3YH8b8tz7r2W496ETppAjx47B1Ag62jqlM4YV2lZLfV5oNJd8U65JD\n\tD3K1G0WrszdYdThqJizqstvqQ2nO/4ilZUUDSmSVVCUxlhUMCrot1Gc35PM0AVkb9a\n\t6qlwN2s5PE6ifD+gW1aN7ZRy86NeP9/wYPxoVAzfYcwBRmcgIHYggxnLxx9sHIELhb\n\tuaK3FNcO/sg4w==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704810545;\n\tbh=8sSCqT07WNK3cV3srutZqAi634bzx+oBXKe6kvn+xPk=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=B4mVI7OjSE9bkxaFND4/OFyZqZJiTKDd1K8auENxGmxvcDTizaZ2gEcarBj6F+/kj\n\tnqZ/KIr9yVXWxn7xSQl/O1GGIbz3DDct/jTUefMYCXjhCJUpL8/X8UrFYjVbvLXXGI\n\tEtkCnaQMOZiToleE3Y0c5nfUMVeQ4XjEgFepIaK0="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"B4mVI7Oj\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  9 Jan 2024 16:30:17 +0200",
        "Message-ID": "<20240109143017.21783-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] gstreamer: Support for pre-1.16 GstEvent",
        "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>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Cc": "Nicolas Dufresne <nicolas.dufresne@collabora.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The gst_clear_event() function used by libcamerasrc has been introduced\nin GStreamer 1.16, while libcamera claims to need 1.14 or newer. This\ncauses a compilation error. Fix it by copying the gst_clear_event()\nimplementation to gstlibcamera-utils.h when compiling with older\nGStreamer version.\n\nThe version check makes it clear that the workaround is needed with\nolder versions only, flagging it for removal when the minimum GStreamer\nversion requirement will be bumped.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/gstlibcamera-utils.h | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/src/gstreamer/gstlibcamera-utils.h b/src/gstreamer/gstlibcamera-utils.h\nindex fd304a8bae15..6adeab0eb35a 100644\n--- a/src/gstreamer/gstlibcamera-utils.h\n+++ b/src/gstreamer/gstlibcamera-utils.h\n@@ -25,6 +25,13 @@ void gst_libcamera_clamp_and_set_frameduration(libcamera::ControlList &controls,\n \t\t\t\t\t       GstStructure *element_caps);\n void gst_libcamera_framerate_to_caps(GstCaps *caps, const GstStructure *element_caps);\n \n+#if !GST_CHECK_VERSION(1, 16, 0)\n+static inline void gst_clear_event(GstEvent **event_ptr)\n+{\n+\tg_clear_pointer(event_ptr, gst_mini_object_unref);\n+}\n+#endif\n+\n #if !GST_CHECK_VERSION(1, 17, 1)\n gboolean gst_task_resume(GstTask *task);\n #endif\n",
    "prefixes": [
        "libcamera-devel"
    ]
}