[{"id":30696,"web_url":"https://patchwork.libcamera.org/comment/30696/","msgid":"<20240807201355.GD18695@pendragon.ideasonboard.com>","date":"2024-08-07T20:13:55","subject":"Re: [PATCH 1/3] gstreamer: Remove auto-focus-mode property","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jaslo,\n\nThank you for the patch.\n\nOn Mon, Aug 05, 2024 at 11:28:36AM +0200, Jaslo Ziska wrote:\n> In preparation of the next commit remove the auto-focus-mode property\n> from the libcamera element.\n\nI would write\n\n    In preparation for generic support of all libcaemra controls, remove the\n    manual handling of the auto-focus-mode property from the libcamerasrc\n    element.\n\nCould you explain here why you're not also removing the manual\nauto-focus handling from src/gstreamer/gstlibcameraprovider.cpp ?\n\n> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n> ---\n>  src/gstreamer/gstlibcamerasrc.cpp | 28 ----------------------------\n>  1 file changed, 28 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index e1bb6b4c..5a3e2989 100644\n> --- a/src/gstreamer/gstlibcamerasrc.cpp\n> +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> @@ -142,7 +142,6 @@ struct _GstLibcameraSrc {\n>  \tGstTask *task;\n>  \n>  \tgchar *camera_name;\n> -\tcontrols::AfModeEnum auto_focus_mode = controls::AfModeManual;\n>  \n>  \tstd::atomic<GstEvent *> pending_eos;\n>  \n> @@ -154,7 +153,6 @@ struct _GstLibcameraSrc {\n>  enum {\n>  \tPROP_0,\n>  \tPROP_CAMERA_NAME,\n> -\tPROP_AUTO_FOCUS_MODE,\n>  };\n>  \n>  static void gst_libcamera_src_child_proxy_init(gpointer g_iface,\n> @@ -663,18 +661,6 @@ gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread,\n>  \t\tgst_pad_push_event(srcpad, gst_event_new_segment(&segment));\n>  \t}\n>  \n> -\tif (self->auto_focus_mode != controls::AfModeManual) {\n> -\t\tconst ControlInfoMap &infoMap = state->cam_->controls();\n> -\t\tif (infoMap.find(&controls::AfMode) != infoMap.end()) {\n> -\t\t\tstate->initControls_.set(controls::AfMode, self->auto_focus_mode);\n> -\t\t} else {\n> -\t\t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n> -\t\t\t\t\t  (\"Failed to enable auto focus\"),\n> -\t\t\t\t\t  (\"AfMode not supported by this camera, \"\n> -\t\t\t\t\t   \"please retry with 'auto-focus-mode=AfModeManual'\"));\n> -\t\t}\n> -\t}\n> -\n>  \tret = state->cam_->start(&state->initControls_);\n>  \tif (ret) {\n>  \t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n> @@ -742,9 +728,6 @@ gst_libcamera_src_set_property(GObject *object, guint prop_id,\n>  \t\tg_free(self->camera_name);\n>  \t\tself->camera_name = g_value_dup_string(value);\n>  \t\tbreak;\n> -\tcase PROP_AUTO_FOCUS_MODE:\n> -\t\tself->auto_focus_mode = static_cast<controls::AfModeEnum>(g_value_get_enum(value));\n> -\t\tbreak;\n>  \tdefault:\n>  \t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);\n>  \t\tbreak;\n> @@ -762,9 +745,6 @@ gst_libcamera_src_get_property(GObject *object, guint prop_id, GValue *value,\n>  \tcase PROP_CAMERA_NAME:\n>  \t\tg_value_set_string(value, self->camera_name);\n>  \t\tbreak;\n> -\tcase PROP_AUTO_FOCUS_MODE:\n> -\t\tg_value_set_enum(value, static_cast<gint>(self->auto_focus_mode));\n> -\t\tbreak;\n>  \tdefault:\n>  \t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);\n>  \t\tbreak;\n> @@ -967,14 +947,6 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)\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>  \n> -\tspec = g_param_spec_enum(\"auto-focus-mode\",\n> -\t\t\t\t \"Set auto-focus mode\",\n> -\t\t\t\t \"Available options: AfModeManual, \"\n> -\t\t\t\t \"AfModeAuto or AfModeContinuous.\",\n> -\t\t\t\t gst_libcamera_auto_focus_get_type(),\n> -\t\t\t\t static_cast<gint>(controls::AfModeManual),\n> -\t\t\t\t G_PARAM_WRITABLE);\n> -\tg_object_class_install_property(object_class, PROP_AUTO_FOCUS_MODE, spec);\n>  }\n>  \n>  /* GstChildProxy implementation */","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 D9753C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 Aug 2024 20:14:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A9EED6338D;\n\tWed,  7 Aug 2024 22:14:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E0E26337E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Aug 2024 22:14:19 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 267AE2EC;\n\tWed,  7 Aug 2024 22:13:26 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"i41afv2Z\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1723061606;\n\tbh=0sKPFikePiUB0l23PP80HnWw44M8P6iiqgqQjBjBBXc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=i41afv2ZW4BR0Nk1UuYF7uRY2tEBahbwXOaXYICg5fj9FlfgyeXFfQ0rhKpjBnaYO\n\tFKfGlwG0K3HQw2/iqOT4W3YNEh0CcO0iktrMQ/Nikv9lCww0+RwER07pmOsSaip4l/\n\tsGfw8/UkUcCImFjizkqzlQbYmsXnNzA++K24nsU4=","Date":"Wed, 7 Aug 2024 23:13:55 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jaslo Ziska <jaslo@ziska.de>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/3] gstreamer: Remove auto-focus-mode property","Message-ID":"<20240807201355.GD18695@pendragon.ideasonboard.com>","References":"<20240805100038.11972-1-jaslo@ziska.de>\n\t<20240805100038.11972-2-jaslo@ziska.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240805100038.11972-2-jaslo@ziska.de>","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":30699,"web_url":"https://patchwork.libcamera.org/comment/30699/","msgid":"<445fec7c6f81a879afe6f2716d1ed1482a93aa66.camel@ndufresne.ca>","date":"2024-08-07T20:51:18","subject":"Re: [PATCH 1/3] gstreamer: Remove auto-focus-mode property","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Hi Laurent,\n\nLe mercredi 07 août 2024 à 23:13 +0300, Laurent Pinchart a écrit :\n> Hi Jaslo,\n> \n> Thank you for the patch.\n> \n> On Mon, Aug 05, 2024 at 11:28:36AM +0200, Jaslo Ziska wrote:\n> > In preparation of the next commit remove the auto-focus-mode property\n> > from the libcamera element.\n> \n> I would write\n> \n>     In preparation for generic support of all libcaemra controls, remove the\n>     manual handling of the auto-focus-mode property from the libcamerasrc\n>     element.\n> \n> Could you explain here why you're not also removing the manual\n> auto-focus handling from src/gstreamer/gstlibcameraprovider.cpp ?\n\nThat escaped my review, and should have never been introduce in the first place.\nCan be removed independently from this patchset. There should be no property\nproxying between the provider and the generated elements.\n\nNicolas\n\n> \n> > Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n> > ---\n> >  src/gstreamer/gstlibcamerasrc.cpp | 28 ----------------------------\n> >  1 file changed, 28 deletions(-)\n> > \n> > diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> > index e1bb6b4c..5a3e2989 100644\n> > --- a/src/gstreamer/gstlibcamerasrc.cpp\n> > +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> > @@ -142,7 +142,6 @@ struct _GstLibcameraSrc {\n> >  \tGstTask *task;\n> >  \n> >  \tgchar *camera_name;\n> > -\tcontrols::AfModeEnum auto_focus_mode = controls::AfModeManual;\n> >  \n> >  \tstd::atomic<GstEvent *> pending_eos;\n> >  \n> > @@ -154,7 +153,6 @@ struct _GstLibcameraSrc {\n> >  enum {\n> >  \tPROP_0,\n> >  \tPROP_CAMERA_NAME,\n> > -\tPROP_AUTO_FOCUS_MODE,\n> >  };\n> >  \n> >  static void gst_libcamera_src_child_proxy_init(gpointer g_iface,\n> > @@ -663,18 +661,6 @@ gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread,\n> >  \t\tgst_pad_push_event(srcpad, gst_event_new_segment(&segment));\n> >  \t}\n> >  \n> > -\tif (self->auto_focus_mode != controls::AfModeManual) {\n> > -\t\tconst ControlInfoMap &infoMap = state->cam_->controls();\n> > -\t\tif (infoMap.find(&controls::AfMode) != infoMap.end()) {\n> > -\t\t\tstate->initControls_.set(controls::AfMode, self->auto_focus_mode);\n> > -\t\t} else {\n> > -\t\t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n> > -\t\t\t\t\t  (\"Failed to enable auto focus\"),\n> > -\t\t\t\t\t  (\"AfMode not supported by this camera, \"\n> > -\t\t\t\t\t   \"please retry with 'auto-focus-mode=AfModeManual'\"));\n> > -\t\t}\n> > -\t}\n> > -\n> >  \tret = state->cam_->start(&state->initControls_);\n> >  \tif (ret) {\n> >  \t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n> > @@ -742,9 +728,6 @@ gst_libcamera_src_set_property(GObject *object, guint prop_id,\n> >  \t\tg_free(self->camera_name);\n> >  \t\tself->camera_name = g_value_dup_string(value);\n> >  \t\tbreak;\n> > -\tcase PROP_AUTO_FOCUS_MODE:\n> > -\t\tself->auto_focus_mode = static_cast<controls::AfModeEnum>(g_value_get_enum(value));\n> > -\t\tbreak;\n> >  \tdefault:\n> >  \t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);\n> >  \t\tbreak;\n> > @@ -762,9 +745,6 @@ gst_libcamera_src_get_property(GObject *object, guint prop_id, GValue *value,\n> >  \tcase PROP_CAMERA_NAME:\n> >  \t\tg_value_set_string(value, self->camera_name);\n> >  \t\tbreak;\n> > -\tcase PROP_AUTO_FOCUS_MODE:\n> > -\t\tg_value_set_enum(value, static_cast<gint>(self->auto_focus_mode));\n> > -\t\tbreak;\n> >  \tdefault:\n> >  \t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);\n> >  \t\tbreak;\n> > @@ -967,14 +947,6 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)\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> >  \n> > -\tspec = g_param_spec_enum(\"auto-focus-mode\",\n> > -\t\t\t\t \"Set auto-focus mode\",\n> > -\t\t\t\t \"Available options: AfModeManual, \"\n> > -\t\t\t\t \"AfModeAuto or AfModeContinuous.\",\n> > -\t\t\t\t gst_libcamera_auto_focus_get_type(),\n> > -\t\t\t\t static_cast<gint>(controls::AfModeManual),\n> > -\t\t\t\t G_PARAM_WRITABLE);\n> > -\tg_object_class_install_property(object_class, PROP_AUTO_FOCUS_MODE, spec);\n> >  }\n> >  \n> >  /* GstChildProxy implementation */\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 12CCCBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 Aug 2024 20:51:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4DB7C63382;\n\tWed,  7 Aug 2024 22:51:23 +0200 (CEST)","from mail-ot1-x336.google.com (mail-ot1-x336.google.com\n\t[IPv6:2607:f8b0:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E7B676337F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Aug 2024 22:51:20 +0200 (CEST)","by mail-ot1-x336.google.com with SMTP id\n\t46e09a7af769-7094468d392so153650a34.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 07 Aug 2024 13:51:20 -0700 (PDT)","from nicolas-tpx395.lan ([2606:6d00:15:820c::580])\n\tby smtp.gmail.com with ESMTPSA id\n\t6a1803df08f44-6bb9c88421dsm59693286d6.139.2024.08.07.13.51.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 07 Aug 2024 13:51: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=\"EzraIpPX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1723063879;\n\tx=1723668679; darn=lists.libcamera.org; \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=cwUV8YSLBDqh2gtnuUgYTfwpzHSv8fzK5v6KA5PrOHM=;\n\tb=EzraIpPXx7z5NPYGk9bBGCOlwAf6iz20q2dtceAorvnoiz8VZLm2Wzjmy5ITGnswY7\n\tcf6dUkac61UP5cd5mGxvHzlgBkqqxpPUNXPwmNqg/uXQmoAALzqzktSFnuHj5yqh1SDy\n\tm9xl9qJz4TdeRi8BQvT3mNWaViJlDh+2eS5baJexsgjdvAVDGoR++x8Qs/U8rIk4op+2\n\tB2u5RJXx+Rpu8CncMLNRvWcDvuQOiTNPgsEFSluXwOQbxuIH4bsVT3cNY0E1fDAglAzP\n\t3W12D3XLML3K2VVwWMJH8XtCrjxLMgZ9eND6aphRlnljvq7kh3ukqpgAMvK/0mheICvc\n\tBQzQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1723063879; x=1723668679;\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=cwUV8YSLBDqh2gtnuUgYTfwpzHSv8fzK5v6KA5PrOHM=;\n\tb=vOEn9QTAAwcOvo1GTu9Evt/2b2UTM65USsMBztuNdXC9hwewtwHn1IVK6oFxL7Ip0N\n\tob4psZswCJDi8qK3i9gJgC/bmdINrBmOxzO1llAK/pDhMobHnGQx80DcDE0FZDePTWer\n\tMn4rQP5qrg+EJiCRmiJh3dBANKV6WEvpjOrTd7zOcllfFaXFeaszMsm5TEBH2exDb8ka\n\tz+QNhcPeSkYq9fRHQTRVAHYM9Seu4dLBLLhhab5gE4BwRTGfhv+jdDp1CAKO4miZU7LA\n\tt/kM7froWlRBbq6GV3B9qJG8AxSYjj0juFNJI9AkZofAKeJccr2XrCewV+Zm8XYQF7DP\n\trGeg==","X-Gm-Message-State":"AOJu0Yz19lMTqClM5or4UFAepWmryTg2vfKBkcgoPgcK3wW/RY1Gbr1T\n\tcKA0CCZ80bgrynZh+oprtPA3YP0wZ/s5yT+H5G8Ur+2MspjViUjBBCBsMMmQfEg=","X-Google-Smtp-Source":"AGHT+IHO/wBn6tkjjhNZWO8dmpU1EB4oH1Bt5BwTWXtLXMw/tJaCAl4tBbbaBX7EkuSkk5eNlLYbVg==","X-Received":"by 2002:a05:6830:2716:b0:703:6434:aba8 with SMTP id\n\t46e09a7af769-7099ea3eb31mr26948147a34.0.1723063879537; \n\tWed, 07 Aug 2024 13:51:19 -0700 (PDT)","Message-ID":"<445fec7c6f81a879afe6f2716d1ed1482a93aa66.camel@ndufresne.ca>","Subject":"Re: [PATCH 1/3] gstreamer: Remove auto-focus-mode property","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Jaslo Ziska\n\t<jaslo@ziska.de>","Cc":"libcamera-devel@lists.libcamera.org","Date":"Wed, 07 Aug 2024 16:51:18 -0400","In-Reply-To":"<20240807201355.GD18695@pendragon.ideasonboard.com>","References":"<20240805100038.11972-1-jaslo@ziska.de>\n\t<20240805100038.11972-2-jaslo@ziska.de>\n\t<20240807201355.GD18695@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.52.4 (3.52.4-1.fc40) ","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":30706,"web_url":"https://patchwork.libcamera.org/comment/30706/","msgid":"<87ttfvs11h.fsf@ziska.de>","date":"2024-08-08T11:32:10","subject":"Re: [PATCH 1/3] gstreamer: Remove auto-focus-mode property","submitter":{"id":173,"url":"https://patchwork.libcamera.org/api/people/173/","name":"Jaslo Ziska","email":"jaslo@ziska.de"},"content":"Hi Nicolas and Laurent,\n\nNicolas Dufresne <nicolas@ndufresne.ca> writes:\n> Hi Laurent,\n>\n> Le mercredi 07 août 2024 à 23:13 +0300, Laurent Pinchart a \n> écrit :\n>> Hi Jaslo,\n>> \n>> Thank you for the patch.\n>> \n>> On Mon, Aug 05, 2024 at 11:28:36AM +0200, Jaslo Ziska wrote:\n>> > In preparation of the next commit remove the auto-focus-mode \n>> > property\n>> > from the libcamera element.\n>> \n>> I would write\n>> \n>>     In preparation for generic support of all libcaemra \n>>     controls, remove the\n>>     manual handling of the auto-focus-mode property from the \n>>     libcamerasrc\n>>     element.\n>> \n>> Could you explain here why you're not also removing the manual\n>> auto-focus handling from src/gstreamer/gstlibcameraprovider.cpp \n>> ?\n\nOops, I didn't even know that was there.\n\n> That escaped my review, and should have never been introduce in \n> the first place.\n> Can be removed independently from this patchset. There should be \n> no property\n> proxying between the provider and the generated elements.\n\nIf you want to I can also add a patch removing this to the set (or \nadd it to the existing patch removing auto-focus-mode support).\n\nBest regards,\n\nJaslo\n\n>\n> Nicolas\n>\n>> \n>> > Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n>> > ---\n>> >  src/gstreamer/gstlibcamerasrc.cpp | 28 \n>> >  ----------------------------\n>> >  1 file changed, 28 deletions(-)\n>> > \n>> > diff --git a/src/gstreamer/gstlibcamerasrc.cpp \n>> > b/src/gstreamer/gstlibcamerasrc.cpp\n>> > index e1bb6b4c..5a3e2989 100644\n>> > --- a/src/gstreamer/gstlibcamerasrc.cpp\n>> > +++ b/src/gstreamer/gstlibcamerasrc.cpp\n>> > @@ -142,7 +142,6 @@ struct _GstLibcameraSrc {\n>> >  \tGstTask *task;\n>> >  \n>> >  \tgchar *camera_name;\n>> > -\tcontrols::AfModeEnum auto_focus_mode = \n>> > controls::AfModeManual;\n>> >  \n>> >  \tstd::atomic<GstEvent *> pending_eos;\n>> >  \n>> > @@ -154,7 +153,6 @@ struct _GstLibcameraSrc {\n>> >  enum {\n>> >  \tPROP_0,\n>> >  \tPROP_CAMERA_NAME,\n>> > -\tPROP_AUTO_FOCUS_MODE,\n>> >  };\n>> >  \n>> >  static void gst_libcamera_src_child_proxy_init(gpointer \n>> >  g_iface,\n>> > @@ -663,18 +661,6 @@ gst_libcamera_src_task_enter(GstTask \n>> > *task, [[maybe_unused]] GThread *thread,\n>> >  \t\tgst_pad_push_event(srcpad, \n>> >  gst_event_new_segment(&segment));\n>> >  \t}\n>> >  \n>> > -\tif (self->auto_focus_mode != controls::AfModeManual) {\n>> > -\t\tconst ControlInfoMap &infoMap = \n>> > state->cam_->controls();\n>> > -\t\tif (infoMap.find(&controls::AfMode) != infoMap.end()) \n>> > {\n>> > -\t\t\tstate->initControls_.set(controls::AfMode, \n>> > self->auto_focus_mode);\n>> > -\t\t} else {\n>> > -\t\t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n>> > -\t\t\t\t\t  (\"Failed to enable auto focus\"),\n>> > -\t\t\t\t\t  (\"AfMode not supported by this camera, \"\n>> > -\t\t\t\t\t   \"please retry with \n>> > 'auto-focus-mode=AfModeManual'\"));\n>> > -\t\t}\n>> > -\t}\n>> > -\n>> >  \tret = state->cam_->start(&state->initControls_);\n>> >  \tif (ret) {\n>> >  \t\tGST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,\n>> > @@ -742,9 +728,6 @@ gst_libcamera_src_set_property(GObject \n>> > *object, guint prop_id,\n>> >  \t\tg_free(self->camera_name);\n>> >  \t\tself->camera_name = g_value_dup_string(value);\n>> >  \t\tbreak;\n>> > -\tcase PROP_AUTO_FOCUS_MODE:\n>> > -\t\tself->auto_focus_mode = \n>> > static_cast<controls::AfModeEnum>(g_value_get_enum(value));\n>> > -\t\tbreak;\n>> >  \tdefault:\n>> >  \t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, \n>> >  pspec);\n>> >  \t\tbreak;\n>> > @@ -762,9 +745,6 @@ gst_libcamera_src_get_property(GObject \n>> > *object, guint prop_id, GValue *value,\n>> >  \tcase PROP_CAMERA_NAME:\n>> >  \t\tg_value_set_string(value, self->camera_name);\n>> >  \t\tbreak;\n>> > -\tcase PROP_AUTO_FOCUS_MODE:\n>> > -\t\tg_value_set_enum(value, \n>> > static_cast<gint>(self->auto_focus_mode));\n>> > -\t\tbreak;\n>> >  \tdefault:\n>> >  \t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, \n>> >  pspec);\n>> >  \t\tbreak;\n>> > @@ -967,14 +947,6 @@ \n>> > gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)\n>> >  \t\t\t\t\t\t\t     | G_PARAM_STATIC_STRINGS));\n>> >  \tg_object_class_install_property(object_class, \n>> >  PROP_CAMERA_NAME, spec);\n>> >  \n>> > -\tspec = g_param_spec_enum(\"auto-focus-mode\",\n>> > -\t\t\t\t \"Set auto-focus mode\",\n>> > -\t\t\t\t \"Available options: AfModeManual, \"\n>> > -\t\t\t\t \"AfModeAuto or AfModeContinuous.\",\n>> > -\t\t\t\t gst_libcamera_auto_focus_get_type(),\n>> > -\t\t\t\t static_cast<gint>(controls::AfModeManual),\n>> > -\t\t\t\t G_PARAM_WRITABLE);\n>> > -\tg_object_class_install_property(object_class, \n>> > PROP_AUTO_FOCUS_MODE, spec);\n>> >  }\n>> >  \n>> >  /* GstChildProxy implementation */\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 A6469C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Aug 2024 11:32:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 649336337F;\n\tThu,  8 Aug 2024 13:32:13 +0200 (CEST)","from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[85.215.255.23])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 28B5F61955\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Aug 2024 13:32:12 +0200 (CEST)","from archlinux by smtp.strato.de (RZmta 51.1.0 AUTH)\n\twith ESMTPSA id zb9f0a078BWADEE\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tThu, 8 Aug 2024 13:32:10 +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=\"HsDb8IZz\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"KeuxrgVL\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1723116730; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=JkqCPWV2oRPdv3oHqUXiPysWJtjxXI5gxB0DnLajZ2krbPiJPo9mZVG/KL53VoG3hp\n\t+u28CcZ7JibrfXA136qu1s/sUvti+eHswOVKjqdYEAE1ZAMvyYg1NphRZ0i/CYVivIyl\n\ttfS9fPhm3Cr8y4KFDA5p7MmlaeL9K5B9dMv78jtO+Tsfw6N+XxOL636miyUzLPm7EyDt\n\tnlFiG+NfwB3BQ+oDQmE9gPtjxR75UfALz0o0LgCjWt1QYbqDJ0PBBMTY4yI4OjWKhqde\n\teHEuur4OYXqTUgRKFMY5QRJhH+CtftWYM9zIK2XYh51CAzrtW+350F5XYa0BR4YGdaV3\n\tWEjg==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; t=1723116730;\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=qYOwvTEB0Hf8PNz/p/O5jpZ8gnEZN9JTrImTMKwxv0Q=;\n\tb=g421u3FL6yXnl1UPXpTH2ZohtfUd5vd3LVEkiOEOx6VTikDsDEZ/vYPLsV612IcuIL\n\t6CMU1CnZFgJKTD8BnPVQ7KZEFV3p05joezBzzoRQiSZHiCol7J3xGr/wPEGT3kGVRFp2\n\tZgoEExc5tTjLQOjjpejXGDTP2HSpaYRF516nu0yvQ/5pxBodveOyib5xsvjUNkJ9RiW3\n\tFYewzWYz4lMiCbcdUPiwLOhRZBFKqPA42GFoFtzxGLnnpKXQrkwpeoF70/mIYW1qL3iT\n\tD4VzAoHX3GfgfJsXIc+6BK4L6Qq/4ytMNZs2nN15CuotcC6WJ/HCPSUMEEyg1/3bzHch\n\tBQnw==","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=1723116730;\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=qYOwvTEB0Hf8PNz/p/O5jpZ8gnEZN9JTrImTMKwxv0Q=;\n\tb=HsDb8IZzV/QOhE5QwoFt1WHlHdyANfEzfq55jEskMDPAle9GPstEFuTXLir4STJUuD\n\tEkXprLkTfBU55dPmGi4/AizwDZPzQPxUyuH8rW6qITgmVxbVsG4JS9/6bvplbHr4jC2s\n\tsj1BsBdrNZ/qTlq9+l7aovqDrbiHAc7F56daRtt3nTzdESqWL7UZmyU5nZ0zbe+ApInq\n\tD41hEHY6IlT2ItgLCoX8fE+Fip69C+jymkS9yt5X3zuHdLemUJ1hm02U3/iWlKWVfenw\n\tzr7ZSfZgPf4ZlwEViqowQzHFMkQVZnG6VULIlEoQ/8E+qRpC4tGNnJylpUXGYBfq1d86\n\tWtVQ==","v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1723116730;\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=qYOwvTEB0Hf8PNz/p/O5jpZ8gnEZN9JTrImTMKwxv0Q=;\n\tb=KeuxrgVLEvQcW3z6oaw60R7CMSO1biFh5zHw9yJpL/oMb7BBSnhpQL0HgCOr2heZI9\n\tKQUcUOOUBcEMbedqRiAw=="],"X-RZG-AUTH":"\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cH04qwVvJa/DZEjmksR1QX+7v142b0MuXc5T7Z\"","From":"Jaslo Ziska <jaslo@ziska.de>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/3] gstreamer: Remove auto-focus-mode property","In-Reply-To":"<445fec7c6f81a879afe6f2716d1ed1482a93aa66.camel@ndufresne.ca>\n\t(Nicolas Dufresne's message of \"Wed, 07 Aug 2024 16:51:18 -0400\")","References":"<20240805100038.11972-1-jaslo@ziska.de>\n\t<20240805100038.11972-2-jaslo@ziska.de>\n\t<20240807201355.GD18695@pendragon.ideasonboard.com>\n\t<445fec7c6f81a879afe6f2716d1ed1482a93aa66.camel@ndufresne.ca>","Date":"Thu, 08 Aug 2024 13:32:10 +0200","Message-ID":"<87ttfvs11h.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>"}}]