[{"id":27227,"web_url":"https://patchwork.libcamera.org/comment/27227/","msgid":"<54607b0982c7ca0ff1d2eb6be57071a64ccabf98.camel@ndufresne.ca>","date":"2023-06-02T15:46:13","subject":"Re: [libcamera-devel] [PATCH] Apply review suggestions","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Hi,\n\nLe vendredi 02 juin 2023 à 15:38 +0200, Cedric Nugteren via libcamera-devel a\nécrit :\n> This addresses the comments from Nicolas. I did not change the default behaviour,\n> I'll wait with that until you have settled on what to do.\n> \nI'm pretty sure you had somewhat correct commit message before.\n\n> \n> Signed-off-by: Cedric Nugteren <web@cedricnugteren.nl>\n> ---\n\nFor your interest, this section is good place to add free form comment as it\nwon't be part of the commit message. For update, use git format-patch -v N for\nthe versioning.\n\nregards,\nNicolas\n\n>  src/gstreamer/gstlibcameraprovider.cpp | 15 +++++++--------\n>  src/gstreamer/gstlibcamerasrc.cpp      | 14 +++++++-------\n>  2 files changed, 14 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp\n> index 86fa2542..579cb8c0 100644\n> --- a/src/gstreamer/gstlibcameraprovider.cpp\n> +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> @@ -41,7 +41,7 @@ G_DECLARE_FINAL_TYPE(GstLibcameraDevice, gst_libcamera_device,\n>  struct _GstLibcameraDevice {\n>  \tGstDevice parent;\n>  \tgchar *name;\n> -\tgboolean enable_auto_focus = false;\n> +\tbool enable_auto_focus = false;\n>  };\n>  \n>  G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, GST_TYPE_DEVICE)\n> @@ -71,7 +71,6 @@ gst_libcamera_device_reconfigure_element(GstDevice *device,\n>  \t\treturn FALSE;\n>  \n>  \tg_object_set(element, \"camera-name\", GST_LIBCAMERA_DEVICE(device)->name, nullptr);\n> -\tg_object_set(element, \"enable-auto-focus\", GST_LIBCAMERA_DEVICE(device)->enable_auto_focus, nullptr);\n>  \n>  \treturn TRUE;\n>  }\n> @@ -128,12 +127,12 @@ gst_libcamera_device_class_init(GstLibcameraDeviceClass *klass)\n>  \t\t\t\t\t\t(GParamFlags)(G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE |\n>  \t\t\t\t\t\t\t      G_PARAM_CONSTRUCT_ONLY));\n>  \tg_object_class_install_property(object_class, PROP_DEVICE_NAME, pspec);\n> -\tGParamSpec *spec2 = g_param_spec_boolean(\"enable-auto-focus\",\n> -\t                        \"Enable auto-focus\",\n> -\t                        \"Enable auto-focus if set to true, \"\n> -\t                        \"disable it if set to false\",\n> -\t                         FALSE, G_PARAM_WRITABLE);\n> -\tg_object_class_install_property(object_class, PROP_ENABLE_AUTO_FOCUS, spec2);\n> +\tpspec = g_param_spec_boolean(\"enable-auto-focus\",\n> +\t                             \"Enable auto-focus\",\n> +\t                             \"Enable auto-focus if set to true, \"\n> +\t                             \"disable it if set to false\",\n> +\t                              FALSE, G_PARAM_WRITABLE);\n> +\tg_object_class_install_property(object_class, PROP_ENABLE_AUTO_FOCUS, pspec);\n>  }\n>  \n>  static GstDevice *\n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index 672ea38a..b2d8456b 100644\n> --- a/src/gstreamer/gstlibcamerasrc.cpp\n> +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> @@ -146,7 +146,7 @@ struct _GstLibcameraSrc {\n>  \tGstTask *task;\n>  \n>  \tgchar *camera_name;\n> -\tgboolean enable_auto_focus = false;\n> +\tbool enable_auto_focus = false;\n>  \n>  \tGstLibcameraSrcState *state;\n>  \tGstLibcameraAllocator *allocator;\n> @@ -864,11 +864,11 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)\n>  \t\t\t\t\t\t\t     | G_PARAM_READWRITE\n>  \t\t\t\t\t\t\t     | G_PARAM_STATIC_STRINGS));\n>  \tg_object_class_install_property(object_class, PROP_CAMERA_NAME, spec);\n> -\tGParamSpec *spec2 = g_param_spec_boolean(\"enable-auto-focus\",\n> -\t                        \"Enable auto-focus\",\n> -\t                        \"Enable auto-focus if set to true, \"\n> -\t                        \"disable it if set to false\",\n> -\t                         FALSE, G_PARAM_WRITABLE);\n> -\tg_object_class_install_property(object_class, PROP_ENABLE_AUTO_FOCUS, spec2);\n> +\tspec = g_param_spec_boolean(\"enable-auto-focus\",\n> +\t                            \"Enable auto-focus\",\n> +\t                            \"Enable auto-focus if set to true, \"\n> +\t                            \"disable it if set to false\",\n> +\t                             FALSE, G_PARAM_WRITABLE);\n> +\tg_object_class_install_property(object_class, PROP_ENABLE_AUTO_FOCUS, spec);\n>  \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 CBF70C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Jun 2023 15:46:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 35F1961EA8;\n\tFri,  2 Jun 2023 17:46:17 +0200 (CEST)","from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com\n\t[IPv6:2607:f8b0:4864:20::72a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B364D61EA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Jun 2023 17:46:15 +0200 (CEST)","by mail-qk1-x72a.google.com with SMTP id\n\taf79cd13be357-75afeacb5e4so243778285a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 02 Jun 2023 08:46:15 -0700 (PDT)","from nicolas-tpx395.localdomain ([2606:6d00:11:5f2f::7a9])\n\tby smtp.gmail.com with ESMTPSA id\n\to27-20020a05620a111b00b007593bf6e345sm737706qkk.113.2023.06.02.08.46.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 02 Jun 2023 08:46:14 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685720777;\n\tbh=AaUQkp9GUiCEl7r3xNydhFkHoXuGssqI35WZrTabSWA=;\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=uEXN11HkTelgu+6SKvUTs6JVA9CEo3R01glw9bra/MirzeSJPLixqH5WNETFP0pAt\n\tThAn6YWPhV1Njw6hmTZnwjbhwhobDZTemWkRZ/LKKEwfVO1EHPrzARBMpjGTMy8duD\n\tY8cjFmvWIPsa7l3Vo/ksf7OypJWG9Hid9cS2TWjX86o915bknHYAqCLQkpm2ecICYX\n\tCucx7Rz4FwMCb/FGuuttbiMR27r4hgEToafKthDPU4iXNvYbE97bNUX1Us/JnbgLNu\n\tpXWR3fwT0OMGJv9GfmS7qtSAZ0Di0+Gnwbn4XBzlGZNB8t7JhUcv0yIl5HwfI65KFu\n\trgdnM3NVwe57A==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20221208.gappssmtp.com; s=20221208; t=1685720774;\n\tx=1688312774; \n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=2NPwkcXPqCvIuvouADNhOWWCNmGt8zaKwUNm6ckOBlw=;\n\tb=NFOLc6JX05ZBz2SGruTAa0m1yOAl6ii10/mU8qaxppL4DWeuW0y9h7JCzzFKYrRTrh\n\tkL6C6m4KVnf2TYA1qVxiKD39cmtVuoUdWiyB2BvrALJYIUUbKrtOY+gsyOhd+IlDtDEo\n\t8g5AzaILG0x2R/+Rx3aTJYl6clZ34kghljjTqlCCETr/X607Gpif4P1crjSWJ2s7pUoL\n\tqwJuxtbXA5R+KlGBsVOXjtb03lI+wVTKuN6oqLP4HNVMXRB49yGZy4OtxHxLu6VZqJe4\n\tN4nCxCdO4FyQr4HZiKsLdR+Zgym38yP+2K1QIH9T9XYwGZR0tDeokOmn0TbFZ4Jc7ODy\n\tNwMg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ndufresne-ca.20221208.gappssmtp.com\n\theader.i=@ndufresne-ca.20221208.gappssmtp.com header.b=\"NFOLc6JX\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1685720774; x=1688312774;\n\th=mime-version:user-agent:content-transfer-encoding:references\n\t:in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=2NPwkcXPqCvIuvouADNhOWWCNmGt8zaKwUNm6ckOBlw=;\n\tb=Bp2rVpFUe1qNgAC/N2/F1PiwenfcwX0n1NyacgAPizVoVfZw7pFn9J4l1vyFm2udQa\n\tN2c2lcifOdS/NXVzpUISXwET2/S3GI/bNiabcsAwTO3qVG0NjhOgysiz4rjqx6Qn0HFr\n\tIm9wkaF/yMZEiSziKrnOYzZ1w7rUrvwjtgu79W1ct95lECFgoQ9WzdgxhNFoRE3T5leR\n\tb8x+lPRL0RKUyvAc2ayTNEGJlCLq4KjQWrHqOpe9eaAAOfc1WmbyHgUr3sNESpyyl2PG\n\tkwOYi/ELcjQ15oWEHcc21i77Sg+i56zqtkZ+AerPRNnzITk89gYky5xeTL0EfslbRuPO\n\tF1oQ==","X-Gm-Message-State":"AC+VfDyhx1eMbZ+I9wv8mQVk3odmcTPW9AlMDKd0FMudZ+D8cOjP+36d\n\tnIi1tqDQ5V/4oytJ7bzS7kOiS7xQ5dv0hWc72/0=","X-Google-Smtp-Source":"ACHHUZ4+5P4FxcZSh7+W6Hmv6/bjyDt4j2Pnc3oMPhIJ+54xZbz29QEzk8h5jcAVdypmnEf4FOzPmw==","X-Received":"by 2002:a05:620a:2b22:b0:75b:23a1:35f7 with SMTP id\n\tdo34-20020a05620a2b2200b0075b23a135f7mr14889896qkb.8.1685720774469; \n\tFri, 02 Jun 2023 08:46:14 -0700 (PDT)","Message-ID":"<54607b0982c7ca0ff1d2eb6be57071a64ccabf98.camel@ndufresne.ca>","To":"Cedric Nugteren <cedric@plumerai.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 02 Jun 2023 11:46:13 -0400","In-Reply-To":"<20230602133805.198862-1-web@cedricnugteren.nl>","References":"<037947> <20230602133805.198862-1-web@cedricnugteren.nl>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.48.1 (3.48.1-1.fc38) ","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH] Apply review suggestions","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":"Nicolas Dufresne via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"Cedric Nugteren <web@cedricnugteren.nl>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]