Patch Detail
Show a patch.
GET /api/patches/17364/?format=api
{ "id": 17364, "url": "https://patchwork.libcamera.org/api/patches/17364/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17364/", "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": "<20220912130509.184968-1-vedantparanjape160201@gmail.com>", "date": "2022-09-12T13:05:09", "name": "[libcamera-devel,v2] gstreamer: Check gstreamer version before using newer macros", "commit_ref": "046f83e8df1ec0d58bc6ed80f71dc2ce6d8f7c58", "pull_url": null, "state": "accepted", "archived": false, "hash": "2901fad26f621a507e2214a8977e311f9783daeb", "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/17364/mbox/", "series": [ { "id": 3483, "url": "https://patchwork.libcamera.org/api/series/3483/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3483", "date": "2022-09-12T13:05:09", "name": "[libcamera-devel,v2] gstreamer: Check gstreamer version before using newer macros", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3483/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17364/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17364/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 D9380C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Sep 2022 13:05:38 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3E7F761F96;\n\tMon, 12 Sep 2022 15:05:38 +0200 (CEST)", "from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com\n\t[IPv6:2607:f8b0:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 47079609A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 15:05:37 +0200 (CEST)", "by mail-pg1-x52b.google.com with SMTP id v4so8200716pgi.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 06:05:37 -0700 (PDT)", "from veware.localdomain ([111.125.221.181])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb7-20020a170903228700b0017509940418sm6012186plh.79.2022.09.12.06.05.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 12 Sep 2022 06:05:33 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662987938;\n\tbh=0uIeSjYr9cwJd0SgicyL7Z2GSdkdIPsxBjW8kqzcA2M=;\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=hJLvL6292oCK2T5VWgQxV4WHmJ/vF/syrNvabaILGhEeybrXsgYz6A7xxLjaQO8OM\n\tYPvs8gAOVlAABCak900TfMV5fhLwjF08gvD/eJ7JE5HzHfyeQr4CDnjnErTzIP68Dg\n\ts3m2HriyJJCidSyBmxShb6WRrLbwNmlFzDn+L56Le+Sc4SI0zWWXDuwQteVeK9U2nr\n\tvVnM9zSYpzKAX5LqbjWAjlVyF/mf2+lUwpGkZG8f7t7qRopA//exJeeepKjt0LxYZq\n\tBrb1Vx9VLXfPkaMG2RAdLLuc8706hGOnJHUH7T+3VDyQdnqSJG9jRAnakREPI65CKH\n\tFV6HyAkd57E0A==", "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=wMo5O4sCT7W9/K5qIrU5DCbveSDA8Ynv/ciawFU0+Zc=;\n\tb=lVW4PDDp2uMK03vCafk0DxV7TxsooA4RTtqa+SexW+g3JnXSi2mOPVfaINN5YP0hhL\n\tkFPhjy3vQGrnsoYf29Vtb64kBYzCdOy1LueM68hhm+Fy4GSaaYCndiYmWs/wDr5Z0t5X\n\tPHn+c9ihdy1RqT3SC6REe8eTkoYx2ncdYXNGRDXJrs7WZxeqLAjfry9H7bdbZkCsL9Yg\n\tzJJEHbALq5Ly8pu0d6XBGEI6+zcSVLLFJgPOTqocn2kfHSj4W0aeYQkUHFS14uKeNzKg\n\t7G7HuJjJBpfba68Yejl9uqP+zPDa3/MmFP7DTryi99Fjh8ThK6R1qtj6y/5OXl1jsn6H\n\tbt6A==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"lVW4PDDp\"; 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=wMo5O4sCT7W9/K5qIrU5DCbveSDA8Ynv/ciawFU0+Zc=;\n\tb=ytUQqUVTQ6aIjDY2AUVmBYddMhwSECt5ROwJ4YNvyYhWRQLib19kzYfHN1DnAg5JqT\n\t9daDWjJJxgYFBia6hNW7glzmf2VDOjS0vz8NeRYzYaIrZ7oflKYyubmG0TrCiRA1NpPq\n\t7C0wDup+LBVd0J5gFqanIMzEplI17ASbOqGDU27K6/eT9jlUnjJtkBymmsR3sN2HiIXm\n\tu/zQb4m0Hm8QmAdMxaWHD2OEf+4gDTvjYJwMQwfC/I3vqB9yqtd2I9ITj7xSyY/DIro5\n\tJeaLOKEwUTI1jKMgOhBj/lUvlKvpLXXq4kDoYKtpyCRC7cAWfNPhV3iY1qSiaky9xOJa\n\t/d1A==", "X-Gm-Message-State": "ACgBeo2y+NB5BXb5GshKg92n+zoQnLHW7PaoHlVO2EWcWWExswLmcJhV\n\tUZMXPxfmRghoae1UO3TVULRKSMQvqGTDIA==", "X-Google-Smtp-Source": "AA6agR4Bqd4/5twUCbzVO6NvZSeirpkkCGgVpLz6FYAVv6ROkrVfFboagQenwi1JEp4OA2ytN+S9oA==", "X-Received": "by 2002:a05:6a00:1704:b0:53b:b450:a51d with SMTP id\n\th4-20020a056a00170400b0053bb450a51dmr27550560pfc.79.1662987934659; \n\tMon, 12 Sep 2022 06:05:34 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 12 Sep 2022 18:35:09 +0530", "Message-Id": "<20220912130509.184968-1-vedantparanjape160201@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2] gstreamer: Check gstreamer version\n\tbefore using newer macros", "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": "GST_VIDEO_TRANSFER_BT601 and GST_VIDEO_TRANSFER_BT2020_10 macros are\ndefined in GST Version 1.18.0.\n\nUsage of these macros causes gstlibcamera compilation failure if\nGST_VERSION < 1.18.0. These macros are used only if GST_VERSION >= 1.18.0.\nFix the following compilation error:\n\n../src/gstreamer/gstlibcamera-utils.cpp:157:7: error: ‘GST_VIDEO_TRANSFER_BT601’ was not declared in this scope; did you mean ‘GST_VIDEO_TRANSFER_BT709’?\n 157 | case GST_VIDEO_TRANSFER_BT601:\n | ^~~~~~~~~~~~~~~~~~~~~~~~\n | GST_VIDEO_TRANSFER_BT709\n../src/gstreamer/gstlibcamera-utils.cpp:159:7: error: ‘GST_VIDEO_TRANSFER_BT2020_10’ was not declared in this scope; did you mean ‘GST_VIDEO_TRANSFER_BT2020_12’?\n 159 | case GST_VIDEO_TRANSFER_BT2020_10:\n | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\n | GST_VIDEO_TRANSFER_BT2020_12\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/gstreamer/gstlibcamera-utils.cpp | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp\nindex 4df5dd6c14fd..244a4a79845d 100644\n--- a/src/gstreamer/gstlibcamera-utils.cpp\n+++ b/src/gstreamer/gstlibcamera-utils.cpp\n@@ -154,9 +154,11 @@ colorspace_from_colorimetry(const GstVideoColorimetry &colorimetry)\n \tcase GST_VIDEO_TRANSFER_SRGB:\n \t\tcolorspace->transferFunction = ColorSpace::TransferFunction::Srgb;\n \t\tbreak;\n+#if GST_CHECK_VERSION(1, 18, 0)\n \tcase GST_VIDEO_TRANSFER_BT601:\n-\tcase GST_VIDEO_TRANSFER_BT2020_12:\n \tcase GST_VIDEO_TRANSFER_BT2020_10:\n+#endif\n+\tcase GST_VIDEO_TRANSFER_BT2020_12:\n \tcase GST_VIDEO_TRANSFER_BT709:\n \t\tcolorspace->transferFunction = ColorSpace::TransferFunction::Rec709;\n \t\tbreak;\n", "prefixes": [ "libcamera-devel", "v2" ] }