Show a patch.

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

{
    "id": 19563,
    "url": "https://patchwork.libcamera.org/api/patches/19563/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19563/",
    "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": "<20240227175336.560009-3-nicolas@ndufresne.ca>",
    "date": "2024-02-27T17:53:35",
    "name": "[v1,2/3] test: gstreamer: Simplify single stream test",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0afc00f7f0076fd84152b5073c5d72ee11d8b1c0",
    "submitter": {
        "id": 30,
        "url": "https://patchwork.libcamera.org/api/people/30/?format=api",
        "name": "Nicolas Dufresne",
        "email": "nicolas@ndufresne.ca"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19563/mbox/",
    "series": [
        {
            "id": 4190,
            "url": "https://patchwork.libcamera.org/api/series/4190/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4190",
            "date": "2024-02-27T17:53:33",
            "name": "gstreamer: Fix a crash when memory outlives the pipeline",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4190/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19563/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19563/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 47D5AC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Feb 2024 17:54:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5BC0D62877;\n\tTue, 27 Feb 2024 18:54:02 +0100 (CET)",
            "from madrid.collaboradmins.com (madrid.collaboradmins.com\n\t[IPv6:2a00:1098:ed:100::25])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 69DC762865\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Feb 2024 18:54:01 +0100 (CET)",
            "from nicolas-tpx395.lan (cola.collaboradmins.com [195.201.22.229])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: nicolas)\n\tby madrid.collaboradmins.com (Postfix) with ESMTPSA id CBFFF378000B; \n\tTue, 27 Feb 2024 17:54:00 +0000 (UTC)"
        ],
        "From": "Nicolas Dufresne <nicolas@ndufresne.ca>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v1 2/3] test: gstreamer: Simplify single stream test",
        "Date": "Tue, 27 Feb 2024 12:53:35 -0500",
        "Message-ID": "<20240227175336.560009-3-nicolas@ndufresne.ca>",
        "X-Mailer": "git-send-email 2.43.2",
        "In-Reply-To": "<20240227175336.560009-1-nicolas@ndufresne.ca>",
        "References": "<20240227175336.560009-1-nicolas@ndufresne.ca>",
        "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>",
        "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": "From: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n\nSigned-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n---\n .../gstreamer_single_stream_test.cpp          | 27 +++++++------------\n 1 file changed, 9 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\nindex 301e4a93..815c6609 100644\n--- a/test/gstreamer/gstreamer_single_stream_test.cpp\n+++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n@@ -29,30 +29,21 @@ protected:\n \t\tif (status_ != TestPass)\n \t\t\treturn status_;\n \n-\t\tconst gchar *streamDescription = \"fakesink\";\n-\t\tg_autoptr(GError) error0 = NULL;\n-\t\tstream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,\n-\t\t\t\t\t\tNULL,\n-\t\t\t\t\t\tGST_PARSE_FLAG_FATAL_ERRORS,\n-\t\t\t\t\t\t&error0);\n-\n-\t\tif (!stream0_) {\n-\t\t\tg_printerr(\"Bin could not be created (%s)\\n\", error0->message);\n+\t\tfakesink_ = gst_element_factory_make(\"fakesink\", nullptr);\n+\t\tif (!fakesink_) {\n+\t\t\tg_printerr(\"Your installation is missing 'fakesink'\\n\");\n \t\t\treturn TestFail;\n \t\t}\n-\t\tg_object_ref_sink(stream0_);\n-\n-\t\tif (createPipeline() != TestPass)\n-\t\t\treturn TestFail;\n+\t\tg_object_ref_sink(fakesink_);\n \n-\t\treturn TestPass;\n+\t\treturn createPipeline();\n \t}\n \n \tint run() override\n \t{\n \t\t/* Build the pipeline */\n-\t\tgst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_, stream0_, NULL);\n-\t\tif (gst_element_link(libcameraSrc_, stream0_) != TRUE) {\n+\t\tgst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_, fakesink_, nullptr);\n+\t\tif (!gst_element_link(libcameraSrc_, fakesink_)) {\n \t\t\tg_printerr(\"Elements could not be linked.\\n\");\n \t\t\treturn TestFail;\n \t\t}\n@@ -68,11 +59,11 @@ protected:\n \n \tvoid cleanup() override\n \t{\n-\t\tg_clear_object(&stream0_);\n+\t\tg_clear_object(&fakesink_);\n \t}\n \n private:\n-\tGstElement *stream0_;\n+\tGstElement *fakesink_;\n };\n \n TEST_REGISTER(GstreamerSingleStreamTest)\n",
    "prefixes": [
        "v1",
        "2/3"
    ]
}