[{"id":33993,"web_url":"https://patchwork.libcamera.org/comment/33993/","msgid":"<07d23fc5a81aea5507b4c59bf88d071f20297fd2.camel@ndufresne.ca>","date":"2025-04-22T15:48:18","subject":"Re: [PATCH 1/3] gstreamer: Add GST_PARAM_CONDITIONALLY_AVAILABLE\n\tflag to properties","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Hi,\n\nLe mardi 22 avril 2025 à 16:25 +0200, Jaslo Ziska a écrit :\n> Add the GST_PARAM_CONDITIONALLY_AVAILABLE flag to the camera properties\n> to mark the property as conditionally available, i.e. it might only be\n> present depending on the camera / pipeline.\n\nThis is a slight miss-match. GST_PARAM_CONDITIONALLY_AVAILABLE was only\nindented to endup in generated documentation, since when the property\nis not available its actually not installed at all. The ideal was to\ntell developers to never systematically set these properties.\n\nSince we don't have GStreamer elements per-camera, and that properties\ncannot be included / removed per instance, doing the GOBject\nintrospection to figure-out if the property is installed will always\nsucceed.\n\nIn that sense, this change does not have a lot of value to me.\n\nNicolas\n\n> \n> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n> ---\n>  src/gstreamer/gstlibcamera-controls.cpp.in | 7 +++++--\n>  1 file changed, 5 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcamera-controls.cpp.in b/src/gstreamer/gstlibcamera-controls.cpp.in\n> index 89c530da..28604a3c 100644\n> --- a/src/gstreamer/gstlibcamera-controls.cpp.in\n> +++ b/src/gstreamer/gstlibcamera-controls.cpp.in\n> @@ -124,7 +124,9 @@ g_param_spec_{{ ctrl.gtype }}(\n>  {%- elif ctrl.gtype in ['float', 'int', 'int64', 'uchar'] %}\n>  \t{{ ctrl.min }}, {{ ctrl.max }}, {{ ctrl.default }},\n>  {%- endif %}\n> -\t(GParamFlags) (GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE |\n> +\t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n> +\t\t       GST_PARAM_CONTROLLABLE |\n> +\t\t       G_PARAM_READWRITE |\n>  \t\t       G_PARAM_STATIC_STRINGS)\n>  )\n>  {%- endset %}\n> @@ -138,7 +140,8 @@ g_param_spec_{{ ctrl.gtype }}(\n>  \t\t\t\"{{ ctrl.name }}\",\n>  \t\t\t{{ ctrl.description|format_description|indent_str('\\t\\t\\t') }},\n>  \t\t\t{{ spec|indent_str('\\t\\t\\t') }},\n> -\t\t\t(GParamFlags) (GST_PARAM_CONTROLLABLE |\n> +\t\t\t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n> +\t\t\t\t       GST_PARAM_CONTROLLABLE |\n>  \t\t\t\t       G_PARAM_READWRITE |\n>  \t\t\t\t       G_PARAM_STATIC_STRINGS)\n>  \t\t)","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 F328CBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 15:48:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AF44568ACA;\n\tTue, 22 Apr 2025 17:48:22 +0200 (CEST)","from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com\n\t[IPv6:2607:f8b0:4864:20::f32])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 08E67617E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 17:48:21 +0200 (CEST)","by mail-qv1-xf32.google.com with SMTP id\n\t6a1803df08f44-6e8ec399427so44674346d6.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 08:48:20 -0700 (PDT)","from ?IPv6:2606:6d00:15:9913::5ac? ([2606:6d00:15:9913::5ac])\n\tby smtp.gmail.com with ESMTPSA id\n\t6a1803df08f44-6f2c2b0f499sm59105166d6.38.2025.04.22.08.48.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Apr 2025 08:48:19 -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=\"FBhNMbB5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1745336900;\n\tx=1745941700; 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=F/3srsJX48d5NnoC8xJCej75fCdNDpmwz7cCxwO9z38=;\n\tb=FBhNMbB5Ld5JqKIIzhpeHbC6be97yhi65+2BMcoe0XsqDlezEBm4O5os6LDseXK7LN\n\tUfaO6BhbBP0WqwAOkQSKlHUDThOvr/2pjJHwCwZVUa9Qtp5nRRahKVtO2TUSzAw6dLUt\n\t5T/nPg1Ra5zVW8DV7dbtwWadFbGR8mICToD4FgumRhj2PoMuBl1L3RYlgUL5JUVZV+Li\n\t3YHtxZb02Nnj6wbJMmjF7kq6/pppYkJYT6wvcVPyHTGvNptK42y54AhZ/8AbT6NxJrxL\n\tFrb7ACYIVoG55NQa9G6j+FL6rcH+x/MKzUXoi2gAu49HqzcySPTX1hhsj7u5+/ECKsgw\n\tUk+A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1745336900; x=1745941700;\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-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X-Google-Smtp-Source":"AGHT+IHYLqiMZiVn0cy/ogwv1B71LIIEDiVwNCi6I07lRecqTM6BOsVlwfs7oYzRbE4nZ8aTRLK40A==","X-Received":"by 2002:a05:6214:2349:b0:6e8:9866:7398 with SMTP id\n\t6a1803df08f44-6f2c456c668mr260027096d6.22.1745336899844; \n\tTue, 22 Apr 2025 08:48:19 -0700 (PDT)","Message-ID":"<07d23fc5a81aea5507b4c59bf88d071f20297fd2.camel@ndufresne.ca>","Subject":"Re: [PATCH 1/3] gstreamer: Add GST_PARAM_CONDITIONALLY_AVAILABLE\n\tflag to properties","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Jaslo Ziska <jaslo@ziska.de>, libcamera-devel@lists.libcamera.org","Date":"Tue, 22 Apr 2025 11:48:18 -0400","In-Reply-To":"<20250422142903.14742-2-jaslo@ziska.de>","References":"<20250422142903.14742-1-jaslo@ziska.de>\n\t<20250422142903.14742-2-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":34006,"web_url":"https://patchwork.libcamera.org/comment/34006/","msgid":"<87ikmv1dr8.fsf@ziska.de>","date":"2025-04-23T08:30:19","subject":"Re: [PATCH 1/3] gstreamer: Add GST_PARAM_CONDITIONALLY_AVAILABLE\n\tflag to properties","submitter":{"id":173,"url":"https://patchwork.libcamera.org/api/people/173/","name":"Jaslo Ziska","email":"jaslo@ziska.de"},"content":"Hi Nicolas,\n\nNicolas Dufresne <nicolas@ndufresne.ca> writes:\n> Hi,\n>\n> Le mardi 22 avril 2025 à 16:25 +0200, Jaslo Ziska a écrit :\n>> Add the GST_PARAM_CONDITIONALLY_AVAILABLE flag to the camera \n>> properties\n>> to mark the property as conditionally available, i.e. it might \n>> only be\n>> present depending on the camera / pipeline.\n>\n> This is a slight miss-match. GST_PARAM_CONDITIONALLY_AVAILABLE \n> was only\n> indented to endup in generated documentation, since when the \n> property\n> is not available its actually not installed at all. The ideal \n> was to\n> tell developers to never systematically set these properties.\n>\n> Since we don't have GStreamer elements per-camera, and that \n> properties\n> cannot be included / removed per instance, doing the GOBject\n> introspection to figure-out if the property is installed will \n> always\n> succeed.\n>\n> In that sense, this change does not have a lot of value to me.\n\nI see, then I will drop this patch.\n\n>\n> Nicolas\n>\n>>\n>> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n>> ---\n>>  src/gstreamer/gstlibcamera-controls.cpp.in | 7 +++++--\n>>  1 file changed, 5 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/src/gstreamer/gstlibcamera-controls.cpp.in \n>> b/src/gstreamer/gstlibcamera-controls.cpp.in\n>> index 89c530da..28604a3c 100644\n>> --- a/src/gstreamer/gstlibcamera-controls.cpp.in\n>> +++ b/src/gstreamer/gstlibcamera-controls.cpp.in\n>> @@ -124,7 +124,9 @@ g_param_spec_{{ ctrl.gtype }}(\n>>  {%- elif ctrl.gtype in ['float', 'int', 'int64', 'uchar'] %}\n>>  \t{{ ctrl.min }}, {{ ctrl.max }}, {{ ctrl.default }},\n>>  {%- endif %}\n>> -\t(GParamFlags) (GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE \n>> |\n>> +\t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n>> +\t\t       GST_PARAM_CONTROLLABLE |\n>> +\t\t       G_PARAM_READWRITE |\n>>  \t\t       G_PARAM_STATIC_STRINGS)\n>>  )\n>>  {%- endset %}\n>> @@ -138,7 +140,8 @@ g_param_spec_{{ ctrl.gtype }}(\n>>  \t\t\t\"{{ ctrl.name }}\",\n>>  \t\t\t{{ \n>> ctrl.description|format_description|indent_str('\\t\\t\\t') }},\n>>  \t\t\t{{ spec|indent_str('\\t\\t\\t') }},\n>> -\t\t\t(GParamFlags) (GST_PARAM_CONTROLLABLE |\n>> +\t\t\t(GParamFlags) (GST_PARAM_CONDITIONALLY_AVAILABLE |\n>> +\t\t\t\t       GST_PARAM_CONTROLLABLE |\n>>  \t\t\t\t       G_PARAM_READWRITE |\n>>  \t\t\t\t       G_PARAM_STATIC_STRINGS)\n>>  \t\t)","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 D2BAABE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Apr 2025 08:30:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DF3C668AC5;\n\tWed, 23 Apr 2025 10:30:23 +0200 (CEST)","from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[81.169.146.218])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 39A8B617E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Apr 2025 10:30:22 +0200 (CEST)","from archlinux by smtp.strato.de (RZmta 51.3.0 AUTH)\n\twith ESMTPSA id z34f8113N8UKTnN\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:30:20 +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=\"lKjj7A0c\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"TB9PWc+9\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1745397020; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=HbdpnOD/mcymD+GsvrZ2afAw04cyStrZhXVxzDGzh/IcxIXIC+4QsMp6tgu5yeJd6Q\n\t3W8A2+07j3za/LkFJXYsSPn9ccPERFidx4ZTmG87xurs55RpwUlF9fbrYhUws2Yg72cn\n\taCUJFdi9qdovcIbjttEuVGHi7X6wiCvyLV/pyO4V9QB7KQzEd9tCh+KCO68Sj/UwNRRv\n\teGt02l6ljDqSJWbh+pC8UhCi2JQ7YSrwcD/f/10IVwUWrHylElczFke6dooA0F6wmj9N\n\tQzGugjmip/qZDo7HtvS1ODBzw9tBh9pemPJ0svsCsGxL0h3mVi5TF4BQzmDBIWOQAT/u\n\tVQlQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; t=1745397020;\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=RQdL9ij9I+Ygc1S8aTiTEuyDrEFCOa1s/hSBFpq9Prg=;\n\tb=S1ycOdaJ1N1Wyxrijsb5Zb7GOxLmLGKylMrJW2GykmnY8sxS2zwk6wia5zoVgD+8db\n\tqLikSMrxf4eJ7UgxlUoWkG2P0ICcYrKUa8iyvk754Y2+8acFqeKEp/aNFQQB7qDhxg+1\n\teg2W6JG1NXCj4jxAsy4btenYrYMEcbb3ZhUeWpxADKvttM7nJxuMNzB3Kov1fqR8f/Lm\n\tMU0O+l/bKYd5WNtXVvTR4SLjvM2KumPvHixkUz7Za1yBitWADjqtbXYxFb1Eg/zNJ4k1\n\tStduLFEFI/zVtYdyZBuJkHMAAznjTWzavWd0ityu05w0YF2mJfu2XgxoKsHpyuTHvWII\n\tH/zg==","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=1745397020;\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=RQdL9ij9I+Ygc1S8aTiTEuyDrEFCOa1s/hSBFpq9Prg=;\n\tb=lKjj7A0cXT07N+p0oOZrw/T7Jkrw7NSdm0IMcjITer5RvocNSvZAYUPoXUdW/CaXny\n\toKLabTwNGC9XwkrXPFK5+vrVipsJUJ+uyMQ4gUygUtOYdp9QWFa56SbJtk+MVIajTfAu\n\tZR2I0SQbBfqssSDYjWgXsHEy536RW5L+Gs7F2tOzvyy0pgIJlHJS8Tfq4Gs9gVQY3KRa\n\tA90TZeK7SpPaHcF49N2Z6DUWRcyEkzCNIbKUtrcSbiJy+qGQE1KqSpM0O+N45vWN04u9\n\tm/HiqC757Pf9M0nGUtpoHmvC1Chuq9gTQeS3FgJqI0ZIVQoOiT0iCFzCt3x5XpTR4fI3\n\tYcfw==","v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1745397020;\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=RQdL9ij9I+Ygc1S8aTiTEuyDrEFCOa1s/hSBFpq9Prg=;\n\tb=TB9PWc+96CRFkhH3zK1a5zArQqSGYYKUl+oUcX6U90Pahw1Nx7428QsFJqPFPDYIhD\n\tOEWTFV2XoXls/m/5vXBg=="],"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 1/3] gstreamer: Add GST_PARAM_CONDITIONALLY_AVAILABLE\n\tflag to properties","In-Reply-To":"<07d23fc5a81aea5507b4c59bf88d071f20297fd2.camel@ndufresne.ca>\n\t(Nicolas Dufresne's message of \"Tue, 22 Apr 2025 11:48:18 -0400\")","References":"<20250422142903.14742-1-jaslo@ziska.de>\n\t<20250422142903.14742-2-jaslo@ziska.de>\n\t<07d23fc5a81aea5507b4c59bf88d071f20297fd2.camel@ndufresne.ca>","User-Agent":"mu4e 1.12.9; emacs 30.1","Date":"Wed, 23 Apr 2025 10:30:19 +0200","Message-ID":"<87ikmv1dr8.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>"}}]