[{"id":33994,"web_url":"https://patchwork.libcamera.org/comment/33994/","msgid":"<3b7b679b0343dce81d7b180a5be12677876a6730.camel@ndufresne.ca>","date":"2025-04-22T15:50:28","subject":"Re: [PATCH 2/3] gstreamer: Add support for read- and write-only\n\tcontrols","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le mardi 22 avril 2025 à 16:25 +0200, Jaslo Ziska a écrit :\n> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n> ---\n>  src/gstreamer/gstlibcamera-controls.cpp.in | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/src/gstreamer/gstlibcamera-controls.cpp.in b/src/gstreamer/gstlibcamera-controls.cpp.in\n> index 28604a3c..b38038ca 100644\n> --- a/src/gstreamer/gstlibcamera-controls.cpp.in\n> +++ b/src/gstreamer/gstlibcamera-controls.cpp.in\n> @@ -126,7 +126,13 @@ g_param_spec_{{ ctrl.gtype }}(\n>  {%- endif %}\n>  \t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n>  \t\t       GST_PARAM_CONTROLLABLE |\n> +{%- if ctrl.direction == 'ControlId::Direction::In' %}\n> +\t\t       G_PARAM_WRITABLE |\n> +{%- elif ctrl.direction == 'ControlId::Direction::Out' %}\n> +\t\t       G_PARAM_READABLE |\n> +{%- else %}\n>  \t\t       G_PARAM_READWRITE |\n> +{%- endif %}\n>  \t\t       G_PARAM_STATIC_STRINGS)\n>  )\n>  {%- endset %}\n> @@ -142,7 +148,13 @@ g_param_spec_{{ ctrl.gtype }}(\n>  \t\t\t{{ spec|indent_str('\\t\\t\\t') }},\n>  \t\t\t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n>  \t\t\t\t       GST_PARAM_CONTROLLABLE |\n> +{%- if ctrl.direction == 'ControlId::Direction::In' %}\n> +\t\t\t\t       G_PARAM_WRITABLE |\n> +{%- elif ctrl.direction == 'ControlId::Direction::Out' %}\n> +\t\t\t\t       G_PARAM_READABLE |\n> +{%- else %}\n>  \t\t\t\t       G_PARAM_READWRITE |\n> +{%- endif %}\n>  \t\t\t\t       G_PARAM_STATIC_STRINGS)\n>  \t\t)\n>  {%- else %}\n\nLooks good to me, just wondering though why is that duplicated ?\n\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>","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 B87FFBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 15:50:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09EF068ACD;\n\tTue, 22 Apr 2025 17:50:33 +0200 (CEST)","from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com\n\t[IPv6:2607:f8b0:4864:20::72f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 528AA617E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 17:50:31 +0200 (CEST)","by mail-qk1-x72f.google.com with SMTP id\n\taf79cd13be357-7c5a88b34a6so499205485a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 08:50:31 -0700 (PDT)","from ?IPv6:2606:6d00:15:9913::5ac? ([2606:6d00:15:9913::5ac])\n\tby smtp.gmail.com with ESMTPSA id\n\taf79cd13be357-7c925b510d7sm574249585a.76.2025.04.22.08.50.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Apr 2025 08:50:29 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ndufresne-ca.20230601.gappssmtp.com\n\theader.i=@ndufresne-ca.20230601.gappssmtp.com\n\theader.b=\"SeM06FUM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1745337030;\n\tx=1745941830; darn=lists.libcamera.org; \n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=cKD0phkj4XGoGqhXkJ63ov3eKfE+89vSg8K+O3IPtac=;\n\tb=SeM06FUMAvl7aLXB/G7l2K48jqeK2kukUfuC3+2lAYVg/PITZvLQrKdJuQXOpTAm48\n\tpScCfM++cCeQsnRWIThQc/71jgoAc4X0SkFAx233Yxy4pDSWQ/CZSodv9WfURmZ5gKeo\n\tjJAlZ8hqtBlp/Bmy/hd0N2p6KUBLVj4DZkuiqOX9FpfMyr76Pu06rvy9knGDe0U8o/Sf\n\t/+BzxYCs4ByGkN7aNNF57pnoOFttf5eG8FH4QfoTJd5qrHTOdrwvfvH5KtDn/wy3Z2Uz\n\tYYjx59k0P51P25xT4Q6f5EH9w+Je9k8Q30oXc0zOS8NJo8p1A+2xciP7HKJhfscOjB//\n\tF3/Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1745337030; x=1745941830;\n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=cKD0phkj4XGoGqhXkJ63ov3eKfE+89vSg8K+O3IPtac=;\n\tb=LBbX8KpxVLv019FaNAi2K+5qw5VQWH0jUYllxTrRtQHJw6+pLffO7jMBq881qnP0hG\n\t5iuhMbTdz3c9Vgyg9qnOEOK3fJTQhxutCZN4PJC9Kf6X0fWL/jk6Vw7dZ+u/e0K7kG5H\n\tKYS+t72WzuRc4AhqzTqxkkwWa0Nl3+wIRrCvnwmPJjmmZdTIIKZbnxlsS77ClryQTH6F\n\t25ROF23PIythuXXRYAcGo2BZH4EB98g0eamh/7KTrhxEbyjSM0DNXtFi3s5J8Szd80T2\n\txgZDCGDkUpdEdX78KrkGaDybg1ovT/O4Fsmso7ZlIaRwSDom3WXHbVrJBcb6p1WjpN0W\n\toFSw==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCWd3d1IEDPDodYJSi/XCwaYvjCn4lntG9I0bP8MkjqV2YoBOTIcc3cxEnBbi2xXMGX14nSt5HVEyj4vfXjjgNA=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Yy4n0X6xjdAxZzm+DlzpQBpjq5lJVBIxI7rHsW1Z43Y4ggLFyHz\n\tVnglUSgxEcWVNsDeX76B5M8xT1OUfeU9pbnN6gfPCc9y0yrFTbr71KcYGlHs9pjz/zMzm4oDO7D\n\tl","X-Gm-Gg":"ASbGncuN3oGX5ppXHuTQwBj/hm7lEFA7UbTOhN4FUe7trnBwItZKNQgJgihlWlbaGqV\n\tnIJyqCxrw6CFXqjwfhgmIW1Z3KC39Nka3bs+2B/nKKW4Gzq2kEWLZWkRg+9cvD02UMnsTFjjqR9\n\tnRD/Wt2JTXZOEzb42zzdnn/qKIZ1aS6hH0VHWosIrrTxqjx+Q9xeqPCOQeHq8p4JGLitt0fKsku\n\tZz4UVQB7UcepdThK1nN5r2QoX4xNmFP56fOfMhx4CuhHb4xOi5zvwraOawjT0i8CRCitTELI9Ec\n\t/sPxsfDIlSvSk08OVmt0xeMCrwQTOLtCmezkmqN6CgPqPg==","X-Google-Smtp-Source":"AGHT+IH2cfrWFcgpcp2xv9MHdm8LUoOroVZqKKY3A8RilDSHGZLd+/Fj11hnglo804Ut3zb7yP6oCg==","X-Received":"by 2002:a05:620a:319e:b0:7c5:5cc4:ca5c with SMTP id\n\taf79cd13be357-7c927f922eamr1994813385a.14.1745337030336; \n\tTue, 22 Apr 2025 08:50:30 -0700 (PDT)","Message-ID":"<3b7b679b0343dce81d7b180a5be12677876a6730.camel@ndufresne.ca>","Subject":"Re: [PATCH 2/3] gstreamer: Add support for read- and write-only\n\tcontrols","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Jaslo Ziska <jaslo@ziska.de>, libcamera-devel@lists.libcamera.org","Date":"Tue, 22 Apr 2025 11:50:28 -0400","In-Reply-To":"<20250422142903.14742-3-jaslo@ziska.de>","References":"<20250422142903.14742-1-jaslo@ziska.de>\n\t<20250422142903.14742-3-jaslo@ziska.de>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.56.0 (3.56.0-1.fc42) ","MIME-Version":"1.0","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34008,"web_url":"https://patchwork.libcamera.org/comment/34008/","msgid":"<87cyd31dir.fsf@ziska.de>","date":"2025-04-23T08:35:24","subject":"Re: [PATCH 2/3] gstreamer: Add support for read- and write-only\n\tcontrols","submitter":{"id":173,"url":"https://patchwork.libcamera.org/api/people/173/","name":"Jaslo Ziska","email":"jaslo@ziska.de"},"content":"Hi Nicolas,\n\nthanks for the review.\n\nNicolas Dufresne <nicolas@ndufresne.ca> writes:\n> Le mardi 22 avril 2025 à 16:25 +0200, Jaslo Ziska a écrit :\n>> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n>> ---\n>>  src/gstreamer/gstlibcamera-controls.cpp.in | 12 ++++++++++++\n>>  1 file changed, 12 insertions(+)\n>>\n>> diff --git a/src/gstreamer/gstlibcamera-controls.cpp.in \n>> b/src/gstreamer/gstlibcamera-controls.cpp.in\n>> index 28604a3c..b38038ca 100644\n>> --- a/src/gstreamer/gstlibcamera-controls.cpp.in\n>> +++ b/src/gstreamer/gstlibcamera-controls.cpp.in\n>> @@ -126,7 +126,13 @@ g_param_spec_{{ ctrl.gtype }}(\n>>  {%- endif %}\n>>  \t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n>>  \t\t       GST_PARAM_CONTROLLABLE |\n>> +{%- if ctrl.direction == 'ControlId::Direction::In' %}\n>> +\t\t       G_PARAM_WRITABLE |\n>> +{%- elif ctrl.direction == 'ControlId::Direction::Out' %}\n>> +\t\t       G_PARAM_READABLE |\n>> +{%- else %}\n>>  \t\t       G_PARAM_READWRITE |\n>> +{%- endif %}\n>>  \t\t       G_PARAM_STATIC_STRINGS)\n>>  )\n>>  {%- endset %}\n>> @@ -142,7 +148,13 @@ g_param_spec_{{ ctrl.gtype }}(\n>>  \t\t\t{{ spec|indent_str('\\t\\t\\t') }},\n>>  \t\t\t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n>>  \t\t\t\t       GST_PARAM_CONTROLLABLE |\n>> +{%- if ctrl.direction == 'ControlId::Direction::In' %}\n>> +\t\t\t\t       G_PARAM_WRITABLE |\n>> +{%- elif ctrl.direction == 'ControlId::Direction::Out' %}\n>> +\t\t\t\t       G_PARAM_READABLE |\n>> +{%- else %}\n>>  \t\t\t\t       G_PARAM_READWRITE |\n>> +{%- endif %}\n>>  \t\t\t\t       G_PARAM_STATIC_STRINGS)\n>>  \t\t)\n>>  {%- else %}\n>\n> Looks good to me, just wondering though why is that duplicated ?\n\nThat's because of array controls. The first time (in the {% set \nspec %}) is for normal enum, int, etc. controls and the second \ntime these specs might be included in the array spec. So it's set \nfor both because each might end up as the \"top level\" spec \ndepending on whether the control is an array control or not.\n\n>\n> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>","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 D2635C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Apr 2025 08:35:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6CE2F68AC5;\n\tWed, 23 Apr 2025 10:35:27 +0200 (CEST)","from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[81.169.146.161])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D014617E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Apr 2025 10:35:26 +0200 (CEST)","from archlinux by smtp.strato.de (RZmta 51.3.0 AUTH)\n\twith ESMTPSA id z34f8113N8ZPTpx\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tWed, 23 Apr 2025 10:35:25 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ziska.de header.i=@ziska.de header.b=\"kofLWpiY\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"jQDN9ijC\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1745397325; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=GX3YEDWRxctwOu2zM6+gSZ2alZAuxrXQY3AUjpmHzQS2bxFGDZebd3uOxDfM8tYytc\n\tewZDz7N/I8LFobhDl/V16S76sxFZr++Z62G1Um0UHwwQu75p8IxgDxVxaFsXeaKPVd2T\n\t0AnItP2R5TqFk8SL52pTfGxd6tMfEoYMlS7+KQEtI9wTzTtEEAW5iwkcuFIlfEexrhsb\n\t5Hee4WZXWz8QbuGVQsxhFwhoJoUFkrMCEkiJaScFzvV28urJT2n8o1wJ0+/FT4apVhKt\n\tBAM9nbZ+o4XZHcAWmkWHn5W3SvJYEwZLZ1s+jkcVwCskMQG7AR4zPQum7hnFNrw9B2K7\n\tpIpQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; t=1745397325;\n\ts=strato-dkim-0002; d=strato.com;\n\th=Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=VFdPAfvpP9e5rN3EaemOi33iEWzE0z/05Q9dyVyHxf0=;\n\tb=UUM4cW5m9EBFCbkriQ185yVE8CqUsMWuGxB9rcs6guhv6DrpFml5R8AoNN394L5l6h\n\tevzLgTx2IGPyqh8KrqZxKoydOccP3+SleJB387ou0xJy78pFQ+tSjNVrimPu9Lbt6/dT\n\tnD95akv98oyMD/t0D2UAy7qTdcEBJkzTxhTEQed33KVA0fNf1f9nKdw2PVR86G/XAB1s\n\t5mpwAhGGuQJ5umpTwTWtnk1e9jYcnv1MhMTq3edE0OTIQoyw1zLL50xpUElSJNox6nTP\n\t5hlGc5vM7RdFPfSgU5Aw1T63N/R57I0tK5rMUk2RxkRvHZIGZY+6rPArfwQgsE3Hk9O4\n\t7cLA==","ARC-Authentication-Results":"i=1; strato.com;\n    arc=none;\n    dkim=none","X-RZG-CLASS-ID":"mo00","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; t=1745397325;\n\ts=strato-dkim-0002; d=ziska.de;\n\th=Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=VFdPAfvpP9e5rN3EaemOi33iEWzE0z/05Q9dyVyHxf0=;\n\tb=kofLWpiYBlAf9cCPub4EzCr9pYOIYroudZpF5lxYdrTxoHTLnlUxQ6BUTVbNSUtahb\n\tojfoKjokmDVJx4iwbVBlxmMY8I+OE7amv3tgKrIkQPDXl9IloPK9Hd0obQxqHrhfWkHh\n\t2pMMW31620v5bhecJUFdbwIZsll0IyK3wQIXW0WDPKmZCMRTdS8PVhmwDMF1XBnAxggr\n\tTgL9nAPoaKHMeJHsanXqcBf+Y/tg2Iy1ianCyuTdBmqK5Ad9Rc71olRxHRcXkwFYzERo\n\t8X5+84VzZB2RdkkTYvfMx/wKkrXGOToE3Wa3X1zU5A47S0w+e3UJMOEjjPV8bwLep3RT\n\t2R0Q==","v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1745397325;\n\ts=strato-dkim-0003; d=ziska.de;\n\th=Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=VFdPAfvpP9e5rN3EaemOi33iEWzE0z/05Q9dyVyHxf0=;\n\tb=jQDN9ijC8ynUHxAzzDs9IT+2RxgDfRd7KQ32FPhv2STiC1UcbEIjbwqroIBhHBgGWW\n\tQSdPLXUOpYOIGFYLskAg=="],"X-RZG-AUTH":"\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cC1Yq6XPJaRR/P73in+Ce40I+pppMPSbg4/XGF\"","From":"Jaslo Ziska <jaslo@ziska.de>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/3] gstreamer: Add support for read- and write-only\n\tcontrols","In-Reply-To":"<3b7b679b0343dce81d7b180a5be12677876a6730.camel@ndufresne.ca>\n\t(Nicolas Dufresne's message of \"Tue, 22 Apr 2025 11:50:28 -0400\")","References":"<20250422142903.14742-1-jaslo@ziska.de>\n\t<20250422142903.14742-3-jaslo@ziska.de>\n\t<3b7b679b0343dce81d7b180a5be12677876a6730.camel@ndufresne.ca>","User-Agent":"mu4e 1.12.9; emacs 30.1","Date":"Wed, 23 Apr 2025 10:35:24 +0200","Message-ID":"<87cyd31dir.fsf@ziska.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]