Show a patch.

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

{
    "id": 17358,
    "url": "https://patchwork.libcamera.org/api/patches/17358/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17358/",
    "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": "<20220910063742.957169-1-vedantparanjape160201@gmail.com>",
    "date": "2022-09-10T06:37:42",
    "name": "[libcamera-devel] test: gstreamer: Fix failure of gstreamer_multistream_test",
    "commit_ref": "46340ced12dfb3a050dcccb8f3ea8aca5a0e5987",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "83ed2ef605fd1f841faa85e0b8f087bc52d19fc3",
    "submitter": {
        "id": 85,
        "url": "https://patchwork.libcamera.org/api/people/85/?format=api",
        "name": "Vedant Paranjape",
        "email": "vedantparanjape160201@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17358/mbox/",
    "series": [
        {
            "id": 3479,
            "url": "https://patchwork.libcamera.org/api/series/3479/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3479",
            "date": "2022-09-10T06:37:42",
            "name": "[libcamera-devel] test: gstreamer: Fix failure of gstreamer_multistream_test",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3479/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17358/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17358/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 EA128C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 10 Sep 2022 06:38:06 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2D7D0620AF;\n\tSat, 10 Sep 2022 08:38:06 +0200 (CEST)",
            "from mail-pg1-x531.google.com (mail-pg1-x531.google.com\n\t[IPv6:2607:f8b0:4864:20::531])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B646961F95\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 10 Sep 2022 08:38:03 +0200 (CEST)",
            "by mail-pg1-x531.google.com with SMTP id g4so3537884pgc.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 09 Sep 2022 23:38:03 -0700 (PDT)",
            "from veware.localdomain ([111.125.221.115])\n\tby smtp.googlemail.com with ESMTPSA id\n\tr15-20020a63a54f000000b0043395af24f6sm1593628pgu.25.2022.09.09.23.37.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 09 Sep 2022 23:37:59 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662791886;\n\tbh=YAqYeSUXIYwQHkIiZEY2LGhqhETOD+npw7PFM5j71NY=;\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=slvJkM+ehCk6Lp6GJiGt7kZxNmZwupnFGMUOh18WU25nFmwtiOyfeyvXdlCELT8lQ\n\tqGhijkD8ugazkjNDUUKyId+Cjwx17wXC0aL/pDBW36Bzcj7VOcEzK7b3zep7oakUgA\n\tIOH0Vw+9J3dhgotrELrpf3q3DJmZOEJp13XkcFyME7eIXBHSk5sADUUOPPnvRzBqVU\n\tgwQueFDVhkeLD6R5d5UXCphPVQdsVKHfWv3T35B4HNj4S7RYJu+t+ySdsZMgZSGm2m\n\t561KGQ8Jl0SXL1Xk6IN/V+emuEI/numZCRzdIcUArRZbm42l//ZW/f5F/IwGvf7BDr\n\tzZqqpNHHIxe3A==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date;\n\tbh=WA0sKdqnk8N+1uVdJ/JiQO4ahrRKOcojUaN6o82co1c=;\n\tb=AvJFyJu0ihaRdCOijq8Gi8RXxXOx3ds9SM02upXMruH+pMpl0Wirvg0sOuJ/1kbZeh\n\tIViO3vFPCX4WVYRjo7XydRV/EcahYG+1FsbPrrspn0nhBrtotxcl8S3KCgzMCSwMgJkF\n\t2tmg7RFvvzAUt5ezkMR3914hfStjHed3gciNVGbdudMCP2bxKqgI/1Qtu8LGslbIm/1H\n\tJPmin9/IYwdgxA5e2uD53C/RoLgJUhHY2vZ93+OT7uktaTs0MLtCgeXm7M44B9rrmDk7\n\tcivXRUyXoCk9VkNAD95PsrB8XMaf2CR/3i7vVX7cX6YLuYChCxlO+jDtvj8UAr9t+6TL\n\tUbxg=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"AvJFyJu0\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date;\n\tbh=WA0sKdqnk8N+1uVdJ/JiQO4ahrRKOcojUaN6o82co1c=;\n\tb=N2k5Navdf4qo2eByeInsWZ5qYr8CZHmfV9pigyb5io+ogFk0Oncu8QFRLwQsnU8s3l\n\tmAsofcSqlBPqbd+DxTX+Y+i8+cuH/QIrSPAxhyGXKv0YL/PaZBiG6hwY3vkyoZyfmWxz\n\tcsJL+Id+0EDaZhf+5CuMLBrCV5iAqB6h9Eyy7Hkw6DQ/wm90cTFrN35VLCWmbARj9OWQ\n\tamNomnuWFLn9mXWBvk/CPdWDv+RzDRMofjXtrIikWgFcWIB1Jjlc4daPo5aaPMYc+B/B\n\tGVM23W+JHZRc5EY7DadwSBfT2HQ0qGUXQMmRwM8B3cYWNO7q/AQqYTOob+AUMr/wPgYU\n\thRbw==",
        "X-Gm-Message-State": "ACgBeo3UZVfQgSjbpNd1SJe7UXhS/q/yEtxvUGpefKA8wLhmQsx7sd11\n\t/Q0VflDN6dJNhHZXA5p1SmjYK/mma3d/xQ==",
        "X-Google-Smtp-Source": "AA6agR5AXv7e7rA3Q/9EtWbjQ1JvXJ5WOGX8N5GQOGCj7vDNcdTLnVuJYdwdTeyeGtIGMnH0VFZEHQ==",
        "X-Received": "by 2002:a05:6a00:1ad2:b0:53f:2455:17b9 with SMTP id\n\tf18-20020a056a001ad200b0053f245517b9mr13096151pfv.50.1662791880927; \n\tFri, 09 Sep 2022 23:38:00 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 10 Sep 2022 12:07:42 +0530",
        "Message-Id": "<20220910063742.957169-1-vedantparanjape160201@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] test: gstreamer: Fix failure of\n\tgstreamer_multistream_test",
        "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": "Vedant Paranjape via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Vedant Paranjape <vedantparanjape160201@gmail.com>",
        "Cc": "Vedant Paranjape <vedantparanjape160201@gmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Multistream test failed with the following logs, to run on Raspberry Pi 4 due\nto a bug introduced in one of the recent patches refactoring the code\nthat fails to set the camera-name property with a valid camera id\nstring.\n\n[5:04:05.990569833] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n[5:04:05.994751009] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n[5:04:06.058019483] [16752]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n[5:04:06.085169830] [16752]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n0:00:00.178829295 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:763:gst_libcamera_src_request_new_pad:<libcamera> new request pad created\n0:00:00.179392613 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:327:gst_libcamera_src_open:<libcamera> Opening camera device ...\n[5:04:06.094149760] [16751]  INFO IPAManager ipa_manager.cpp:141 libcamera is not installed. Adding '/home/libcamera/build/src/ipa' to the IPA search path\n[5:04:06.097366114] [16751]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3904-560ceb1e-dirty (2022-09-10T03:53:40+05:30)\n[5:04:06.152332645] [16755]  INFO IPAProxy ipa_proxy.cpp:130 libcamera is not installed. Loading IPA configuration from '/home/libcamera/src/ipa/raspberrypi/data'\n[5:04:06.173016319] [16755]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media4 and ISP device /dev/media1\n0:00:00.259832923 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: Could not find a camera named ''.\n0:00:00.259883405 16751  0x1d31e00 WARN            libcamerasrc gstlibcamerasrc.cpp:347:gst_libcamera_src_open:<libcamera> error: libcamera::CameraMananger::get() returned nullptr\nUnable to set the pipeline to the playing state.\n0:00:00.262787739 16751  0x1d31e00 DEBUG           libcamerasrc gstlibcamerasrc.cpp:786:gst_libcamera_src_release_pad:<libcamera> Pad <libcamera:libcamerapad0> being released\n\nThis patch assigns the camera->id() to the variable cameraName_ that is\nlater used to set element property \"camera-name\" needed to call the\nspecific camera which supports multistreams. Move the code to set\nelement property \"camera-name\" to base class GstreamerTest.\n\nFixes: 5646849b59fe (\"test: gstreamer: Check availability of cameras before running\")\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n---\n test/gstreamer/gstreamer_multi_stream_test.cpp | 3 ---\n test/gstreamer/gstreamer_test.cpp              | 6 ++++--\n test/gstreamer/gstreamer_test.h                | 3 ++-\n 3 files changed, 6 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/test/gstreamer/gstreamer_multi_stream_test.cpp b/test/gstreamer/gstreamer_multi_stream_test.cpp\nindex b8387c10c65e..cd669308d171 100644\n--- a/test/gstreamer/gstreamer_multi_stream_test.cpp\n+++ b/test/gstreamer/gstreamer_multi_stream_test.cpp\n@@ -70,8 +70,6 @@ protected:\n \n \tint run() override\n \t{\n-\t\tg_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n-\n \t\t/* Build the pipeline */\n \t\tgst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_,\n \t\t\t\t stream0_, stream1_, NULL);\n@@ -106,7 +104,6 @@ protected:\n \t}\n \n private:\n-\tstd::string cameraName_;\n \tGstElement *stream0_;\n \tGstElement *stream1_;\n };\ndiff --git a/test/gstreamer/gstreamer_test.cpp b/test/gstreamer/gstreamer_test.cpp\nindex 4947b7bb2977..fe8e8e157b5b 100644\n--- a/test/gstreamer/gstreamer_test.cpp\n+++ b/test/gstreamer/gstreamer_test.cpp\n@@ -73,7 +73,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n \t * Atleast one camera should be available with numStreams streams,\n \t * otherwise skip the test entirely.\n \t */\n-\tif (!checkMinCameraStreams(numStreams)) {\n+\tif (!checkMinCameraStreamsAndSetCameraName(numStreams)) {\n \t\tstatus_ = TestSkip;\n \t\treturn;\n \t}\n@@ -81,7 +81,7 @@ GstreamerTest::GstreamerTest(unsigned int numStreams)\n \tstatus_ = TestPass;\n }\n \n-bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n+bool GstreamerTest::checkMinCameraStreamsAndSetCameraName(unsigned int numStreams)\n {\n \tlibcamera::CameraManager cm;\n \tbool cameraFound = false;\n@@ -93,6 +93,7 @@ bool GstreamerTest::checkMinCameraStreams(unsigned int numStreams)\n \t\t\tcontinue;\n \n \t\tcameraFound = true;\n+\t\tcameraName_ = camera->id();\n \t\tbreak;\n \t}\n \n@@ -121,6 +122,7 @@ int GstreamerTest::createPipeline()\n \t\treturn TestFail;\n \t}\n \n+\tg_object_set(libcameraSrc_, \"camera-name\", cameraName_.c_str(), NULL);\n \tg_object_ref_sink(libcameraSrc_);\n \n \treturn TestPass;\ndiff --git a/test/gstreamer/gstreamer_test.h b/test/gstreamer/gstreamer_test.h\nindex 6f277cc5d8b2..aa2261e2dd5c 100644\n--- a/test/gstreamer/gstreamer_test.h\n+++ b/test/gstreamer/gstreamer_test.h\n@@ -24,10 +24,11 @@ protected:\n \tint processEvent();\n \tvoid printError(GstMessage *msg);\n \n+\tstd::string cameraName_;\n \tGstElement *pipeline_;\n \tGstElement *libcameraSrc_;\n \tint status_;\n \n private:\n-\tbool checkMinCameraStreams(unsigned int numStreams);\n+\tbool checkMinCameraStreamsAndSetCameraName(unsigned int numStreams);\n };\n",
    "prefixes": [
        "libcamera-devel"
    ]
}