[{"id":30847,"web_url":"https://patchwork.libcamera.org/comment/30847/","msgid":"<20240815225408.GC23911@pendragon.ideasonboard.com>","date":"2024-08-15T22:54:08","subject":"Re: [PATCH v2 1/3] gstreamer: Remove auto-focus-mode property from\n\tdevice provider","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 Tue, Aug 13, 2024 at 02:25:05PM +0200, Jaslo Ziska wrote:\n> The device provider is not supposed to have control properties, remove\n> the auto-focus-mode property which was introduced by accident.\n> \n> Fixes: 5a142438b025 (\"gstreamer: Add enable_auto_focus option to the GStreamer plugin\")\n> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nCan I merge this already separately from the rest of the series, or\ncould it cause issues without 2/3 and 3/3 ?\n\n> ---\n>  src/gstreamer/gstlibcameraprovider.cpp | 15 ---------------\n>  1 file changed, 15 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp\n> index 4fb1b007..5da96ea3 100644\n> --- a/src/gstreamer/gstlibcameraprovider.cpp\n> +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> @@ -33,7 +33,6 @@ GST_DEBUG_CATEGORY_STATIC(provider_debug);\n>  \n>  enum {\n>  \tPROP_DEVICE_NAME = 1,\n> -\tPROP_AUTO_FOCUS_MODE = 2,\n>  };\n>  \n>  #define GST_TYPE_LIBCAMERA_DEVICE gst_libcamera_device_get_type()\n> @@ -43,7 +42,6 @@ G_DECLARE_FINAL_TYPE(GstLibcameraDevice, gst_libcamera_device,\n>  struct _GstLibcameraDevice {\n>  \tGstDevice parent;\n>  \tgchar *name;\n> -\tcontrols::AfModeEnum auto_focus_mode = controls::AfModeManual;\n>  };\n>  \n>  G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, GST_TYPE_DEVICE)\n> @@ -60,7 +58,6 @@ gst_libcamera_device_create_element(GstDevice *device, const gchar *name)\n>  \tg_assert(source);\n>  \n>  \tg_object_set(source, \"camera-name\", GST_LIBCAMERA_DEVICE(device)->name, nullptr);\n> -\tg_object_set(source, \"auto-focus-mode\", GST_LIBCAMERA_DEVICE(device)->auto_focus_mode, nullptr);\n>  \n>  \treturn source;\n>  }\n> @@ -87,9 +84,6 @@ gst_libcamera_device_set_property(GObject *object, guint prop_id,\n>  \tcase PROP_DEVICE_NAME:\n>  \t\tdevice->name = g_value_dup_string(value);\n>  \t\tbreak;\n> -\tcase PROP_AUTO_FOCUS_MODE:\n> -\t\tdevice->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> @@ -129,15 +123,6 @@ 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> -\n> -\tpspec = 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, pspec);\n>  }\n>  \n>  static GstDevice *","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 ECC48C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Aug 2024 22:54:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BBF1B633B3;\n\tFri, 16 Aug 2024 00:54:37 +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 2681563369\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Aug 2024 00:54:36 +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 2E61D471;\n\tFri, 16 Aug 2024 00:53:37 +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=\"YlKIcXBP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1723762417;\n\tbh=InXDoUmJ1iUuctuX3iYswLsZUUTpWoSQJFZ2GjrQZj0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=YlKIcXBPTo8IezlD+/3rAg+5Ba/5kD+Q8W2kOer0DREtq3uy7jBVFdgioYxBeiFmT\n\tvkODkKWDmtc+Gn1J+twOnX8VKZhriHn3y1rNmW+N/1/6fLgIHPPOWMgQ2BJXhjmkDP\n\tbYm0sA1bGiJ7FXaW6hzOspyiuCpuUTYhMIzcuZog=","Date":"Fri, 16 Aug 2024 01:54:08 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jaslo Ziska <jaslo@ziska.de>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 1/3] gstreamer: Remove auto-focus-mode property from\n\tdevice provider","Message-ID":"<20240815225408.GC23911@pendragon.ideasonboard.com>","References":"<20240813124722.22425-1-jaslo@ziska.de>\n\t<20240813124722.22425-2-jaslo@ziska.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240813124722.22425-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":30918,"web_url":"https://patchwork.libcamera.org/comment/30918/","msgid":"<8734mqfem6.fsf@ziska.de>","date":"2024-08-27T10:24:01","subject":"Re: [PATCH v2 1/3] gstreamer: Remove auto-focus-mode property from\n\tdevice provider","submitter":{"id":173,"url":"https://patchwork.libcamera.org/api/people/173/","name":"Jaslo Ziska","email":"jaslo@ziska.de"},"content":"Hi Laurent,\n\nthanks for the review.\n\nLaurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n> Hi Jaslo,\n>\n> Thank you for the patch.\n>\n> On Tue, Aug 13, 2024 at 02:25:05PM +0200, Jaslo Ziska wrote:\n>> The device provider is not supposed to have control properties, \n>> remove\n>> the auto-focus-mode property which was introduced by accident.\n>> \n>> Fixes: 5a142438b025 (\"gstreamer: Add enable_auto_focus option \n>> to the GStreamer plugin\")\n>> Signed-off-by: Jaslo Ziska <jaslo@ziska.de>\n>\n> Reviewed-by: Laurent Pinchart \n> <laurent.pinchart@ideasonboard.com>\n>\n> Can I merge this already separately from the rest of the series, \n> or\n> could it cause issues without 2/3 and 3/3 ?\n\nI think this can be merged separately but maybe check with Nicolas \nto be sure.\n\nBest regards\n\nJaslo\n\n>> ---\n>>  src/gstreamer/gstlibcameraprovider.cpp | 15 ---------------\n>>  1 file changed, 15 deletions(-)\n>> \n>> diff --git a/src/gstreamer/gstlibcameraprovider.cpp \n>> b/src/gstreamer/gstlibcameraprovider.cpp\n>> index 4fb1b007..5da96ea3 100644\n>> --- a/src/gstreamer/gstlibcameraprovider.cpp\n>> +++ b/src/gstreamer/gstlibcameraprovider.cpp\n>> @@ -33,7 +33,6 @@ GST_DEBUG_CATEGORY_STATIC(provider_debug);\n>>  \n>>  enum {\n>>  \tPROP_DEVICE_NAME = 1,\n>> -\tPROP_AUTO_FOCUS_MODE = 2,\n>>  };\n>>  \n>>  #define GST_TYPE_LIBCAMERA_DEVICE \n>>  gst_libcamera_device_get_type()\n>> @@ -43,7 +42,6 @@ G_DECLARE_FINAL_TYPE(GstLibcameraDevice, \n>> gst_libcamera_device,\n>>  struct _GstLibcameraDevice {\n>>  \tGstDevice parent;\n>>  \tgchar *name;\n>> -\tcontrols::AfModeEnum auto_focus_mode = \n>> controls::AfModeManual;\n>>  };\n>>  \n>>  G_DEFINE_TYPE(GstLibcameraDevice, gst_libcamera_device, \n>>  GST_TYPE_DEVICE)\n>> @@ -60,7 +58,6 @@ gst_libcamera_device_create_element(GstDevice \n>> *device, const gchar *name)\n>>  \tg_assert(source);\n>>  \n>>  \tg_object_set(source, \"camera-name\", \n>>  GST_LIBCAMERA_DEVICE(device)->name, nullptr);\n>> -\tg_object_set(source, \"auto-focus-mode\", \n>> GST_LIBCAMERA_DEVICE(device)->auto_focus_mode, nullptr);\n>>  \n>>  \treturn source;\n>>  }\n>> @@ -87,9 +84,6 @@ gst_libcamera_device_set_property(GObject \n>> *object, guint prop_id,\n>>  \tcase PROP_DEVICE_NAME:\n>>  \t\tdevice->name = g_value_dup_string(value);\n>>  \t\tbreak;\n>> -\tcase PROP_AUTO_FOCUS_MODE:\n>> -\t\tdevice->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>> @@ -129,15 +123,6 @@ \n>> gst_libcamera_device_class_init(GstLibcameraDeviceClass *klass)\n>>  \t\t\t\t\t\t(GParamFlags)(G_PARAM_STATIC_STRINGS | \n>>  G_PARAM_WRITABLE |\n>>  \t\t\t\t\t\t\t      G_PARAM_CONSTRUCT_ONLY));\n>>  \tg_object_class_install_property(object_class, \n>>  PROP_DEVICE_NAME, pspec);\n>> -\n>> -\tpspec = 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, pspec);\n>>  }\n>>  \n>>  static GstDevice *","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 DF467C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Aug 2024 10:24:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DABFC63460;\n\tTue, 27 Aug 2024 12:24:05 +0200 (CEST)","from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[81.169.146.220])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2567A61901\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Aug 2024 12:24:04 +0200 (CEST)","from archlinux by smtp.strato.de (RZmta 51.2.3 AUTH)\n\twith ESMTPSA id zec3f707RAO2gqD\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tTue, 27 Aug 2024 12:24:02 +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=\"Vl4P17wz\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"2DUkYQH8\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1724754243; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=Kxg9X3Iak06inufrW+LqcWve896xp4U931WgVbVuvGlvYtnEkVPU6fVy9g9v9UDKA9\n\t3Z5EFdHhJvS0swx2eXS7ydvyv/A6rYztAkAhCjQawZI2XRWrrXZQvMbd8ahO1G8SxagU\n\tZbOVb6Iz7GQk8eFhu+V1QHS7V8PsHmaT7trQOjSbRd+1KilsDHg2fDn+PnOohcBwx78t\n\tMjQyFcBNAn9SxoWmcwvF6SvdCoF6SYNTjFw3cjGmynJOSKWLsThHm1mekjdgesWCTdN+\n\tLk8hQl4dwN8uo4muvk+0QFmI9YqQX2W6ZHyWYS7177wsAucfwQEZKu7rR6gzuL4J9OId\n\tf8+A==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; t=1724754243;\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=NJKjoyKXawhxkN51ehlAigVZTC4yVxAs3LTK2icZ1hM=;\n\tb=WSJxn29puKl2tWPaiM/nk5FsLRSf6cijgQuyRA/dX/xJrapUyYmgQPKknDxZAgJz3q\n\tB9pMTVQOBJs5WXkUFC0YduyDMvznAojdTYtusqowp8R/qnIsEiOV4OCLPlP478gSk9FZ\n\tOEEGvC20Liwax07Qr8kdrFpskUhqnICyqr9sZFBOTAtSLHqatoh4sd2PraM0/W0Sn0Gl\n\tFCfWaOaP/e3AhH2EojpwKcg2/y5ahKMkokwWe+RIZ1gWCi9D1UF9BQfjySY2vt7N8Wbo\n\twX9hDasOQVv0eR7zLlYFdhxtKbM6A8AWzCieXm34D4tGXKuRzsgtfgjIvE+gr6HSYgkA\n\tritQ==","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=1724754243;\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=NJKjoyKXawhxkN51ehlAigVZTC4yVxAs3LTK2icZ1hM=;\n\tb=Vl4P17wziAb6GSj7TM9/twexD8z2rIAH/qxj47tqbzFxwHuuJZ7R6nxKpaKgSLkMhb\n\tRhElsEhfO9IIRcJY+HciBgEfaL4rNUz8keUUWHY2prEZQhQg6VfoI1c477/ovjXk6S3A\n\taFRmCr/w1HfUIieRNBwICZW/mf5jCp2uKUuUxCKH6XXryKkhijNm64cSFNpYHQtx6H/x\n\tNKKGodAbBzJEgXoXONqTP0P2RV6gTuTOGDtCXxrp2IieSO/HqEVLV5AmcUmRW2d/hKDR\n\tzbtkxi7E4ggmk7vWT+9i99sinIovYbmQEXhHmqG+9QBvFb7CA82RTHOoe5ptrFKFNo4D\n\tNMnQ==","v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1724754243;\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=NJKjoyKXawhxkN51ehlAigVZTC4yVxAs3LTK2icZ1hM=;\n\tb=2DUkYQH8jnlbFL9FpT0MXrApFNMKcV7m9sZZYs3pxWD8YoFzLhZnBXM1/PLj+io6G7\n\tLMhNAUrzru2bl9OSihCw=="],"X-RZG-AUTH":"\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cHgIq7BfJawKbGh7AKuSVfORBZmPIRJ15iJSlA\"","From":"Jaslo Ziska <jaslo@ziska.de>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 1/3] gstreamer: Remove auto-focus-mode property from\n\tdevice provider","In-Reply-To":"<20240815225408.GC23911@pendragon.ideasonboard.com> (Laurent\n\tPinchart's message of \"Fri, 16 Aug 2024 01:54:08 +0300\")","References":"<20240813124722.22425-1-jaslo@ziska.de>\n\t<20240813124722.22425-2-jaslo@ziska.de>\n\t<20240815225408.GC23911@pendragon.ideasonboard.com>","Date":"Tue, 27 Aug 2024 12:24:01 +0200","Message-ID":"<8734mqfem6.fsf@ziska.de>","MIME-Version":"1.0","Content-Type":"text/plain; format=flowed","Content-Transfer-Encoding":"7bit","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>"}}]