{"id":16591,"url":"https://patchwork.libcamera.org/api/patches/16591/?format=json","web_url":"https://patchwork.libcamera.org/patch/16591/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220711153711.36679-5-rishikeshdonadkar@gmail.com>","date":"2022-07-11T15:37:10","name":"[libcamera-devel,v3,4/5] gstreamer: Configure the colorSpace in the Stream configuration.","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b7ebf6aa2fde04228ca754e04541aa1354e9a62a","submitter":{"id":118,"url":"https://patchwork.libcamera.org/api/people/118/?format=json","name":"Rishikesh Donadkar","email":"rishikeshdonadkar@gmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16591/mbox/","series":[{"id":3270,"url":"https://patchwork.libcamera.org/api/series/3270/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3270","date":"2022-07-11T15:37:06","name":"Add colorimetry support to libcamera gstreamer element.","version":3,"mbox":"https://patchwork.libcamera.org/series/3270/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16591/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16591/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 5F5A2BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Jul 2022 15:38:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1FCCC6331D;\n\tMon, 11 Jul 2022 17:38:28 +0200 (CEST)","from mail-pg1-x530.google.com (mail-pg1-x530.google.com\n\t[IPv6:2607:f8b0:4864:20::530])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4DC176330B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jul 2022 17:38:27 +0200 (CEST)","by mail-pg1-x530.google.com with SMTP id 72so5088677pge.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jul 2022 08:38:27 -0700 (PDT)","from localhost.localdomain ([103.124.170.70])\n\tby smtp.googlemail.com with ESMTPSA id\n\tu18-20020a17090a891200b001ef87123615sm4891268pjn.37.2022.07.11.08.38.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 11 Jul 2022 08:38:25 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657553908;\n\tbh=crWHhz3Z/TyJBTdD9UfIlmkwgS1bUHOkBd+HziOtpWg=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=AxVM/KLSwUn3DXMnm5ueseAgHdpu0EQzUfSFJ75zK9vJ9RLiBO6xay5JQIbu7MQtY\n\tWx6kt3B4wOgYIeiy+NxrR/DWiVpJ0DBjOUc3EDt+oQNoAlCZ0OnGeToQPiSSB5m74a\n\tlDjqP625lHqCkzQ1nJxx3mYLNUzM+dv/6ZNytx/SGH2Pkm8LKKih+07zntEV6sYZ0A\n\teQh9Z8YxIQIB+tee1tQsfrCLOEnwgYoi2LUf7vyOc30gZRWx6ga62mLKohJO8uc0ac\n\tMd3qatH8JiBkUij4yWrtXLFLwhekMv/DmG/xar6cnS3DAdM5goFWj7deklodnXtzm5\n\tb5IR5rYa9i1kQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=74dT/n8SbP1yPRYZvYWmschUwxbjdspMpv5yNwnz6tw=;\n\tb=EtfxjAAQsqXaQBBt+mDvLIAKURueW3GtVSjYo4a76P4yPjgAglXkWeaT3QRqW1zIhr\n\thD6a4wklfQn9m9KiPCkQb2GSPvMjC4CDTmzm7SRJ6dXbk+FS5maivXtRQdcpFCvmuU0N\n\t8LI+k4PRL2PVn85jito41+pm0iSVZ09/OkpTkpcyLKT6Sk4VsI/obPsNLoOIti7sOUJF\n\ti0wGWqktmS+/5fAYqv4m1m5lCI3TVddt1IOljyw7qH/qv5Eg/XufDOQDVuqF2IOGzp8J\n\tBQggEGoumKsI8NNUuSxdbYs88Rp/Edgqs/ozHGbAm/o9e386yOCmHi6hN3fiYJQs1nrf\n\twAAw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"EtfxjAAQ\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=74dT/n8SbP1yPRYZvYWmschUwxbjdspMpv5yNwnz6tw=;\n\tb=5vHUrwfysKMAugsjQK6UqRyGu8+sGzKZgvvwBtGAvFlTuG9182SEGIWwQoDxd2W/u5\n\tTydYqsK9zEcA0AQ8zIP8hvh0KfWv2J7VyesKTTfbxIh8FbEw0k2jpgcQPXM10f60zFF7\n\tnbQzQPFAwdAoqQJgqXAtjkDJgOuxVlFHGOxnfzHkRYM8C5rXv01v+yzfafL4o5z+5Oos\n\tKUF8GovhbWXxQfTKz2rpYhi5tRpWAfart/MueydW+PA7e8wvNlt7ebGRWZOqPcPCc+e7\n\tve2i4U+CSJeLdIzlYpU475Ywu1cNMqlrCj3JFRIaonTVnSvBSfp0AJABbh0zvKIsYNOj\n\tMHwQ==","X-Gm-Message-State":"AJIora/cu2rB9PsX8titFGEMnzvo3fcCx4uT7LnvFzRt81loB2PNLdeP\n\tTlXJ+4J0sRKKnr0S/DeW/d/lxzRfVr8=","X-Google-Smtp-Source":"AGRyM1ufZNF84vi8NQYBdFGlUsE5/yew/InDOvnVvtCpK2Wx8xX5RPUWEV6qpto9s2P/hrTKiblqkQ==","X-Received":"by 2002:a63:4b20:0:b0:401:ae11:2593 with SMTP id\n\ty32-20020a634b20000000b00401ae112593mr16814568pga.375.1657553905289; \n\tMon, 11 Jul 2022 08:38:25 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 11 Jul 2022 21:07:10 +0530","Message-Id":"<20220711153711.36679-5-rishikeshdonadkar@gmail.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20220711153711.36679-1-rishikeshdonadkar@gmail.com>","References":"<20220711153711.36679-1-rishikeshdonadkar@gmail.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 4/5] gstreamer: Configure the\n\tcolorSpace in the Stream configuration.","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":"Rishikesh Donadkar via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Rishikesh Donadkar <rishikeshdonadkar@gmail.com>","Cc":"Rishikesh Donadkar <rishikeshdonadkar@gmail.com>,\n\tnicolas.dufresne@collabora.com, vedantparanjape160201@gmail.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Get the colorimetry if requested in the gstreamer pipeline and\nconvert it to colorspace using the function colorspace_from_colorimetry()\nSet the colorspace as a result of conversion in the StreamConfiguration.\n\nSigned-off-by: Rishikesh Donadkar <rishikeshdonadkar@gmail.com>\n---\n src/gstreamer/gstlibcamera-utils.cpp | 8 ++++++++\n 1 file changed, 8 insertions(+)","diff":"diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp\nindex 5b3bfd70..b3fc9ff4 100644\n--- a/src/gstreamer/gstlibcamera-utils.cpp\n+++ b/src/gstreamer/gstlibcamera-utils.cpp\n@@ -278,6 +278,14 @@ gst_libcamera_configure_stream_from_caps(StreamConfiguration &stream_cfg,\n \t\tg_critical(\"Unsupported media type: %s\", gst_structure_get_name(s));\n \t}\n \n+\t/* Configure colorSpace */\n+\tif (gst_structure_has_field(s, \"colorimetry\")) {\n+\t\tconst gchar *colorimetry_in_caps = gst_structure_get_string(s, \"colorimetry\");\n+\t\tstd::optional<ColorSpace> colorSpace = colorspace_from_colorimetry(colorimetry_in_caps);\n+\t\tif (colorSpace)\n+\t\t\tstream_cfg.colorSpace = colorSpace;\n+\t}\n+\n \tgint width, height;\n \tgst_structure_get_int(s, \"width\", &width);\n \tgst_structure_get_int(s, \"height\", &height);\n","prefixes":["libcamera-devel","v3","4/5"]}