Patch Detail
Show a patch.
GET /api/1.1/patches/16568/?format=api
{ "id": 16568, "url": "https://patchwork.libcamera.org/api/1.1/patches/16568/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16568/", "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": "<20220707094402.28730-3-rishikeshdonadkar@gmail.com>", "date": "2022-07-07T09:44:00", "name": "[libcamera-devel,v2,2/4] gstreamer: Update the obtained colorimetry in caps.", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "9d98644c863f26dbe81cb788c26f95df91089e22", "submitter": { "id": 118, "url": "https://patchwork.libcamera.org/api/1.1/people/118/?format=api", "name": "Rishikesh Donadkar", "email": "rishikeshdonadkar@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16568/mbox/", "series": [ { "id": 3263, "url": "https://patchwork.libcamera.org/api/1.1/series/3263/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3263", "date": "2022-07-07T09:43:58", "name": "Add colorimetry support to libcamera gstreamer element.", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3263/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16568/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16568/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 7E0A3BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 7 Jul 2022 09:45:12 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A03063315;\n\tThu, 7 Jul 2022 11:45:12 +0200 (CEST)", "from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com\n\t[IPv6:2607:f8b0:4864:20::52d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 71AA160401\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 7 Jul 2022 11:45:11 +0200 (CEST)", "by mail-pg1-x52d.google.com with SMTP id o18so16312512pgu.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 07 Jul 2022 02:45:11 -0700 (PDT)", "from localhost.localdomain\n\t([2402:8100:30ae:d446:13ee:d079:112a:ac10])\n\tby smtp.googlemail.com with ESMTPSA id\n\tp2-20020a1709027ec200b00168f08d0d12sm24530712plb.89.2022.07.07.02.45.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 07 Jul 2022 02:45:09 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657187112;\n\tbh=cUgUPITQQWgiPlqqex4TkY/l3u2R4d9+4Lr45jZ1spg=;\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=SBXoerE+mOUk8lub8g4bLeo9L/S0DJoozLhHNqoffDUrZjbGes3DQZ1KQOK2GSnQg\n\tIuqrFzhsTZsz3aCdH+vDEqHF2RCXPEI+T2fyVE/vttPQW0CLG673SS8wRFSWVDH6Ec\n\tXSJHFoAntHlgN5mupyZNkTwNYDNfbg/mCmm5fxLwbCW7Bgz37GnO01gEBNtEJLeDTj\n\tp9arSBDxggNve6rLUn3c6GSRN1O4tNfCQux7EMAdmTP2xjXO9TUot8eFDU57OKy6PS\n\t1jx7w+fdr0mvy5uIR1GF52eOZK78MSpQJqthJYGL89Z6T5D/XswbmPw4DV7eiCxkqM\n\tr6Jr2jjZxq3gQ==", "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=bNl0sT3bbTAE09VbE3LX+X/cDVAeGq77EOfMbHTB+58=;\n\tb=jRwf0EeeuLaHONc8psY0Un9w5nT/3H7O+CFqt6k/3CDZASpMsu4h6DWNUBeYCOCkmz\n\tGpHs2LjGj9b+N8WAQ+IR7eZGwNfhmUG9VCvrVfhzKKbObPUHExEgoyp/cnBly5rtBm5J\n\tyncpjWzJL/EnAG+0ox7JHMVAIzMHhAjkvChvN4g8Gx745boXOsHHgGhN2zUa/pRhv7v2\n\tnRjbxFTcfi/P2ksgpyuELwj3+Z5wy7P5QW0heUlEBgSbkjxmKqXZg7YpVukjLsPAGouQ\n\tbtaH9ARba1PEWLhBVmqZ0+bIVTMAr3vjswjG7Rh+6NEuVDmYC1CSXIoGA8+Fao9Q5hZZ\n\t6VIg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"jRwf0Eee\"; 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=bNl0sT3bbTAE09VbE3LX+X/cDVAeGq77EOfMbHTB+58=;\n\tb=OqmEod3BKmwJZF/LNO2nmrQspJ1fAuG6MsNvu6OMwukq5s5Ca2sSN/SrHyWTIn2tjQ\n\t4HxhYReSGl0fxCBNs3qR0IrHF3qP2yQ2G9ZVyAgy8uBeYUkcNe2DFlI0Bqwba1QY775z\n\taCvpbhN2yR5lvqI+BpmYa3q03E2JGu6IdRXEC8hJcYxmF6ipX5Nvn66Yywpr18LPWHiM\n\tbFe+ssEenFf5BvOz2TYeOp1H5aBwbvZx5MJwj99CygK3p0L+YnvKyV9ed5fjMBkhsX5l\n\t4Nf/LNpKXKOPNonY3Nz5V9fcGAZ9jyJjgUygRkBMhSQqyOTNO26SroLNKnaFRPVfqvVN\n\tIHuw==", "X-Gm-Message-State": "AJIora8Q07Mp9EAEKJ0/U343oH38Zae90v/Sa3nwm7h4Ull6bqP8F4ap\n\tFhXxlstROaKyxUwpyZWt4CK/nJGEtRo=", "X-Google-Smtp-Source": "AGRyM1uwvGRUrbaQM/+FQECgO0/C+1CGXLx7pfgllazDZpbOVDfILcvyXWu1vVTMlf1bpF7dwQk3zA==", "X-Received": "by 2002:a63:b443:0:b0:40c:fbf9:8366 with SMTP id\n\tn3-20020a63b443000000b0040cfbf98366mr38156353pgu.308.1657187109909; \n\tThu, 07 Jul 2022 02:45:09 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 7 Jul 2022 15:14:00 +0530", "Message-Id": "<20220707094402.28730-3-rishikeshdonadkar@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220707094402.28730-1-rishikeshdonadkar@gmail.com>", "References": "<20220707094402.28730-1-rishikeshdonadkar@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 2/4] gstreamer: Update the obtained\n\tcolorimetry in caps.", "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": "If the colorspace is set in the StreamConfiguration, get the colorimetry as\na result of conversion from the previous patch and update it into the caps.\n\nIf the colorimetry corresponding to the colorspace set in the\nStreamConfiguration is not available in GStreamer set the colorimetry\nfield to nullptr in the caps (this will fail the negotiation).\n\nSigned-off-by: Rishikesh Donadkar <rishikeshdonadkar@gmail.com>\n---\n src/gstreamer/gstlibcamera-utils.cpp | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp\nindex 60ac8c8e..eb9c49da 100644\n--- a/src/gstreamer/gstlibcamera-utils.cpp\n+++ b/src/gstreamer/gstlibcamera-utils.cpp\n@@ -166,11 +166,26 @@ gst_libcamera_stream_configuration_to_caps(const StreamConfiguration &stream_cfg\n {\n \tGstCaps *caps = gst_caps_new_empty();\n \tGstStructure *s = bare_structure_from_format(stream_cfg.pixelFormat);\n+\tgchar *colorimetry = nullptr;\n+\tstd::optional<ColorSpace> colorspace = stream_cfg.colorSpace;\n \n \tgst_structure_set(s,\n \t\t\t \"width\", G_TYPE_INT, stream_cfg.size.width,\n \t\t\t \"height\", G_TYPE_INT, stream_cfg.size.height,\n \t\t\t nullptr);\n+\n+\tif (colorspace) {\n+\t\tcolorimetry = colorimerty_from_colorspace(colorspace);\n+\t\tif (colorimetry) {\n+\t\t\tgst_structure_set(s, \"colorimetry\", G_TYPE_STRING, colorimetry, nullptr);\n+\t\t} else {\n+\t\t\tgst_structure_set(s, \"colorimetry\", G_TYPE_STRING, nullptr, nullptr);\n+\t\t\tg_free(colorimetry);\n+\t\t}\n+\t} else {\n+\t\tg_free(colorimetry);\n+\t}\n+\n \tgst_caps_append_structure(caps, s);\n \n \treturn caps;\n", "prefixes": [ "libcamera-devel", "v2", "2/4" ] }