Show a patch.

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

{
    "id": 12472,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12472/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12472/",
    "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": "<20210528210011.154346-1-vedantparanjape160201@gmail.com>",
    "date": "2021-05-28T21:00:11",
    "name": "[libcamera-devel,v1] Fix todo in gst_libcamera_src_task_enter()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "2cf89f4e5f4c2aeeb62dcff9eb8eb68d4a3e6ec6",
    "submitter": {
        "id": 85,
        "url": "https://patchwork.libcamera.org/api/1.1/people/85/?format=api",
        "name": "Vedant Paranjape",
        "email": "vedantparanjape160201@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12472/mbox/",
    "series": [
        {
            "id": 2093,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2093/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2093",
            "date": "2021-05-28T21:00:11",
            "name": "[libcamera-devel,v1] Fix todo in gst_libcamera_src_task_enter()",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2093/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12472/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12472/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 DACCCC3206\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 May 2021 21:00:42 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E26068921;\n\tFri, 28 May 2021 23:00:42 +0200 (CEST)",
            "from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com\n\t[IPv6:2607:f8b0:4864:20::52e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D90CB602AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 May 2021 23:00:40 +0200 (CEST)",
            "by mail-pg1-x52e.google.com with SMTP id j12so3432754pgh.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 May 2021 14:00:40 -0700 (PDT)",
            "from localhost.localdomain ([1.186.78.76])\n\tby smtp.googlemail.com with ESMTPSA id\n\te6sm5234832pjt.1.2021.05.28.14.00.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 28 May 2021 14:00:38 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"V80d7L5o\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=+/HsCWEjqMck/2/ZH4LoxrLozttKr+zwFrdc1Sr+2YA=;\n\tb=V80d7L5oQCiy2mxFBgBsnhG7CsFm6bfocMGQ8vzL/UGAWawvhr1eAqgEwYXLWI+bBj\n\tSnMYAiWsYgYhuuBn1ykY6RT5th0ACapujipL7VYhh/m+sMkSgItx2BFDBHjXdIg7uH9s\n\tXhcJDdwb0TLP6b+Ed2G7fZlNH1vjBd7c0DgBtDLYpx8rZaR4dGBKFaufD9y+Or2cOmhg\n\tBW7TyplBz1zGprDLj6ZtDDDQTMsEWD/xAF5jBET/TeRJpmVjRx/Y4Rzm1oJywKE++HFT\n\tUsBOQ+kNB0+/jLZmH7XGh2nvz+8QICOzvKeQxUyDSQCOvW+jj215OxwwhT+nsU9b8jVj\n\tAn4A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=+/HsCWEjqMck/2/ZH4LoxrLozttKr+zwFrdc1Sr+2YA=;\n\tb=C7+T6pWsFfwYEGteayNiGNgQBq7IY7DKbGNmx5nLoxxr+B7PsAChuSxH54/JF0usPj\n\tTL1iRhKqx0goguNKo6W1ZVcte4p36veuxbT28mW1hl8wyHAr86C6TKOUKdxjOHCW/TZV\n\tpy71m4kA3Wh2L8exbN63JKvSSs7n8M/kal0utkh0VquJ2fqK10zv0SF73mfcWdXT3yz9\n\tduOlnUB2/g7bqUeAJwWX53Up2Ym10piljApRFcA6lM5k5dmzrjHDdPIYlciLWcoUhRuB\n\triOzURfOSablUnmXL2zD1rKXdWlpBDWNTAfoynVA2sCsDJeQwQ9yZQJS393ZicCVranm\n\tRmTw==",
        "X-Gm-Message-State": "AOAM533CTxBAWjmjTO/AJcwH1aCBtrXWxTs0xjDwSW5uOsXsohXqERj2\n\tKA6DuJR6vpPrejFlEz/nYS1wpwl7CPX76lQe",
        "X-Google-Smtp-Source": "ABdhPJyLS4+ze3K4Xf6jP7TOMLIwmgH4mpEIdN2Y92eutpTn9Cv9Vk8UZgEF5jg8hKacNR8pIyx0Aw==",
        "X-Received": "by 2002:a63:58f:: with SMTP id\n\t137mr10823569pgf.241.1622235638758; \n\tFri, 28 May 2021 14:00:38 -0700 (PDT)",
        "From": "Vedant Paranjape <vedantparanjape160201@gmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 29 May 2021 02:30:11 +0530",
        "Message-Id": "<20210528210011.154346-1-vedantparanjape160201@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1] Fix todo in\n\tgst_libcamera_src_task_enter()",
        "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": "Vedant Paranjape <vedantparanjape160201@gmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Error checking the output from generateConfiguration() was missing in\nthe code. Only assert was added as a guard which checked if the\ngenerated camera config are equal to the roles passed to it. But since,\nif generateConfiguration() is passed a invalid role, it returns a\nnullptr. Added error checking so that it checks the return value, and\nsends an error message on GstBus.\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 87246b40..8b6057df 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -375,11 +375,13 @@ gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread,\n \n \t/* Generate the stream configurations, there should be one per pad. */\n \tstate->config_ = state->cam_->generateConfiguration(roles);\n-\t/*\n-\t * \\todo Check if camera may increase or decrease the number of streams\n-\t * regardless of the number of roles.\n-\t */\n-\tg_assert(state->config_->size() == state->srcpads_.size());\n+\tif (state->config_ == nullptr) {\n+\t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n+\t\t\t\t  (\"Failed to generate camera configuration from roles\"),\n+\t\t\t\t  (\"Camera::generateConfiguration() returned nullptr\"));\n+\t\tgst_task_stop(task);\n+\t\treturn;\n+\t}\n \n \tfor (gsize i = 0; i < state->srcpads_.size(); i++) {\n \t\tGstPad *srcpad = state->srcpads_[i];\n",
    "prefixes": [
        "libcamera-devel",
        "v1"
    ]
}