[{"id":24976,"web_url":"https://patchwork.libcamera.org/comment/24976/","msgid":"<166299260723.1925503.6174408166947661604@Monstersaurus>","date":"2022-09-12T14:23:27","subject":"Re: [libcamera-devel] [PATCH v2] gstreamer: Check gstreamer version\n\tbefore using newer macros","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Vedant Paranjape via libcamera-devel (2022-09-12 14:05:09)\n> GST_VIDEO_TRANSFER_BT601 and GST_VIDEO_TRANSFER_BT2020_10 macros are\n> defined in GST Version 1.18.0.\n> \n> Usage of these macros causes gstlibcamera compilation failure if\n> GST_VERSION < 1.18.0. These macros are used only if GST_VERSION >= 1.18.0.\n> Fix 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> \n> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n\n\nThese tags have been missed\n\nTested-by: Rishikesh Donadkar <rishikeshdonadkar@gmail.com>\nReviewed-by: Rishikesh Donadkar <rishikeshdonadkar@gmail.com>\n\nAnd these can be added.\n\nFixes: fc9783acc608 (\"gstreamer: Provide colorimetry <> ColorSpace mappings\")\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/gstreamer/gstlibcamera-utils.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp\n> index 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>         case GST_VIDEO_TRANSFER_SRGB:\n>                 colorspace->transferFunction = ColorSpace::TransferFunction::Srgb;\n>                 break;\n> +#if GST_CHECK_VERSION(1, 18, 0)\n>         case GST_VIDEO_TRANSFER_BT601:\n> -       case GST_VIDEO_TRANSFER_BT2020_12:\n>         case GST_VIDEO_TRANSFER_BT2020_10:\n> +#endif\n> +       case GST_VIDEO_TRANSFER_BT2020_12:\n>         case GST_VIDEO_TRANSFER_BT709:\n>                 colorspace->transferFunction = ColorSpace::TransferFunction::Rec709;\n>                 break;\n> -- \n> 2.25.1\n>","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 36AE7C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Sep 2022 14:23:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 46E4A61F96;\n\tMon, 12 Sep 2022 16:23:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 110D0609A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 16:23:31 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 71670415;\n\tMon, 12 Sep 2022 16:23:30 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662992612;\n\tbh=xtYk1/fyvvBNUYrm6jyBa8ZEEF20iuWfxiGK992NcFE=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=fKJH5pvd0too+ntn3oEL1DoPRPZejlRRS4/WC+LNVCXZbsxkcju1yoNyW7lEC58s7\n\tD0NkJA0kK1jxuDeyNlKhI/Ztfmf2KnWdFX9g7YeHfG1j4Ey6pdLgtqCFmFHXc8EpPA\n\tkUvosYbeW4b5ro8reSLNzOuWTIlRj09TaXSTAALoOZUiqZLVExjEwHkHtvjxjhKXOD\n\tyJZn/R9DV9hej6XxuzwSBxO1RYiNFv8Rs41NL5p7JxqLenD0M2ebMaA4T1ZZYLaQ0y\n\t3mXVx+v+LaSYSFkFkz/zf8QYQdgZcYUptzwwXpzUakVvNoL0kLjQHGc4pI+qswzq4W\n\tlZ6ko7jrsxOaw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662992610;\n\tbh=xtYk1/fyvvBNUYrm6jyBa8ZEEF20iuWfxiGK992NcFE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=sboMwdoogD7Np7NRUIHdOzyA9qwyG+Sy6N2eyn1q6yGygR+XXBffS5x/LsWM87jUJ\n\t6DqVxzBAl9nzbPgPava0n/vUyDtAfMI1ajTegPl2lfH55TJV2F3oQVPRKagIRoXjzA\n\tGAdhReD15poM1Tp+p/8TIhurpz8CNOOOkt9vE72E="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"sboMwdoo\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220912130509.184968-1-vedantparanjape160201@gmail.com>","References":"<20220912130509.184968-1-vedantparanjape160201@gmail.com>","To":"Vedant Paranjape <vedantparanjape160201@gmail.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 12 Sep 2022 15:23:27 +0100","Message-ID":"<166299260723.1925503.6174408166947661604@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24977,"web_url":"https://patchwork.libcamera.org/comment/24977/","msgid":"<Yx9CXwtt/MaTdZKq@pendragon.ideasonboard.com>","date":"2022-09-12T14:29:51","subject":"Re: [libcamera-devel] [PATCH v2] gstreamer: Check gstreamer version\n\tbefore using newer macros","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Vedant,\n\nThank you for the patch.\n\nOn Mon, Sep 12, 2022 at 06:35:09PM +0530, Vedant Paranjape via libcamera-devel wrote:\n> GST_VIDEO_TRANSFER_BT601 and GST_VIDEO_TRANSFER_BT2020_10 macros are\n> defined in GST Version 1.18.0.\n> \n> Usage of these macros causes gstlibcamera compilation failure if\n> GST_VERSION < 1.18.0. These macros are used only if GST_VERSION >= 1.18.0.\n> Fix 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> \n> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/gstreamer/gstlibcamera-utils.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp\n> index 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;","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 553AFC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Sep 2022 14:30:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A43E361F96;\n\tMon, 12 Sep 2022 16:30:08 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4008C609A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Sep 2022 16:30:07 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [89.101.193.67])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B22A7415;\n\tMon, 12 Sep 2022 16:30:06 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662993008;\n\tbh=fiuoqeds+aK39KOFkRA1hE7ullMLCwK02LqntS7nUqM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=YlIJzfod7wj8waBA8WqOHXbMW5fy1+UpeWENom22cMAVkoUX6SAshOHG4NAvxYV9J\n\t1X5LRl43axxs9pUOpSRleWReN1CxryeZf7XVPkVsdjZWR95EPnWPel4NMFAmGfS8Un\n\t1CRlO+2hIKfOQL3Xn2PxW30TCqF/OXRagu1Veqa5LSpLKHi9/HwkNZKf0YuTUv71cI\n\td3MqRf4EXRUTVYRNvixKJS70/O/Ecu+HjvTKfyhEIUcQVpzTcgqSAmgUx3wKiylqFd\n\t1YCPXUodqQao2E7kTNZYcTQAQTzNNbvqt9tbrJ1WjfHQlpEh7SJiS7H/BjlEeLzShu\n\tyb02tV/okuH4Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662993006;\n\tbh=fiuoqeds+aK39KOFkRA1hE7ullMLCwK02LqntS7nUqM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CPo5HZ5NjBITcbt+gvsJ+uLFt4iui7l2LHpZMMz9yVpy7L5zQ519bN7RiQoayh6OX\n\tJAzkLk6NsccjWhiaAdNuNv34tklpnRWkcVK4uYdJU8BAGIbPt/8VffOr9AWn+bEvjH\n\tFONxivtiR7X+tVG1GA/jEBIyixm40+s87I01Vs0Y="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CPo5HZ5N\"; dkim-atps=neutral","Date":"Mon, 12 Sep 2022 17:29:51 +0300","To":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Message-ID":"<Yx9CXwtt/MaTdZKq@pendragon.ideasonboard.com>","References":"<20220912130509.184968-1-vedantparanjape160201@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20220912130509.184968-1-vedantparanjape160201@gmail.com>","Subject":"Re: [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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]