Patch Detail
Show a patch.
GET /api/patches/21661/?format=api
{ "id": 21661, "url": "https://patchwork.libcamera.org/api/patches/21661/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21661/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20241017172331.16377-3-jaslo@ziska.de>", "date": "2024-10-17T17:04:14", "name": "[v3,2/3] gstreamer: Remove auto-focus-mode property from libcamerasrc", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0569b7dc4a462151b445ac1a4cb25aaadc5d70de", "submitter": { "id": 173, "url": "https://patchwork.libcamera.org/api/people/173/?format=api", "name": "Jaslo Ziska", "email": "jaslo@ziska.de" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21661/mbox/", "series": [ { "id": 4712, "url": "https://patchwork.libcamera.org/api/series/4712/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4712", "date": "2024-10-17T17:04:12", "name": "gstreamer: Generate controls from control_ids_*.yaml files", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4712/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21661/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21661/checks/", "tags": {}, "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 A6797C32FC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 17 Oct 2024 17:24:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 427BD65383;\n\tThu, 17 Oct 2024 19:24:31 +0200 (CEST)", "from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[81.169.146.221])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53D1065383\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Oct 2024 19:24:27 +0200 (CEST)", "from archlinux.fritz.box by smtp.strato.de (RZmta 51.2.11 AUTH)\n\twith ESMTPSA id zf9ba109HHOQI7I\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tThu, 17 Oct 2024 19:24:26 +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=\"TtQBYMzt\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"DgEk5foa\"; dkim-atps=neutral", "ARC-Seal": "i=1; a=rsa-sha256; t=1729185866; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=n+Rgxl3VKZnUc1vpED35xWeAvkWvwZtqWoxM5oceEjodPII0cXHHQOtSHLusBVJ/C4\n\tKP9Cij8qzytffci/24caRieZQgPFZZT9T3xBwdywmGzA/KZvUHcGVk2RP8WWkhquzRIY\n\tuohR9fkK4urqxOBQho5bXfrhkBfifo1SsdNs5KRoObLEn0/TYXYn1QurmXCSrp9+swdh\n\tjr2Zh17v4V5WNARz2Cn+ETrjFF4O8uBsv1bLSDZ3zBIPeTJ5jnyT3/ARFV1pKtvL3wVa\n\tfTVOvsKb8OfHZZQvIjMd9g3Jhl03x5IG5arlwGDA3EHokALAQGJoA6pbk0qrEIUUql24\n\tY4Iw==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; t=1729185866;\n\ts=strato-dkim-0002; d=strato.com;\n\th=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=ZKf/n02rjzMepGpSkuuXmnPJ1Dn+plIEKRrTMDtLW3A=;\n\tb=P+uN531fiEd17K5ujB6YetOcAG5B2QFM0B+LErvkahwDSs6gcqyaBnMVzZRvGxh++b\n\tpDAko+4VnLIe4jts62EJjjBCCsosKSufTEXFWhN8XJZg1spQ+PND85fgqNfsnx1vcInw\n\t7L3E9Hh45daq/oivo7Ak6097YXOfRUMxVQLLOCgIfWKV8UBHMAWV0sDzWswqgESCG0iP\n\tNbwZhtOirjcOfSakKdp0cBIETweUASBOxhep8DI/Vjaq6THdJfJowAaOEdoIVgszjCwx\n\tH3ZWjpz14lTI17TrER6rqwsPepnROEegPfxUCo92nKWqoMtjM7PeQ8dYcoe/XrzReXEO\n\tRV6w==", "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=1729185866;\n\ts=strato-dkim-0002; d=ziska.de;\n\th=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=ZKf/n02rjzMepGpSkuuXmnPJ1Dn+plIEKRrTMDtLW3A=;\n\tb=TtQBYMztX42SObr45b11YmDhfam6h7uaTd6h2d/2h7n7igLTJOTp2i/5UYnroQ+AJH\n\t5sFMIAAST5LZUJOBUOjLo3Gq65037He3ZnRzyiNziP5Lb8fQbnbTxRugaqSVW6guLVWR\n\t8WsjUq7Boycr9WjjU5nNV5fsQCPGNU6ELaLeg15xmJeb3rZUFZQVZ9ra2riZ7ZSNEwsd\n\t9h+qvieuigm/zd0kfOP7Q1TabvYUA/reKJRRyWiDFw2I//IIbTK+bOxCPR4CKVGgQA9S\n\tKYQ7u+zcOSivrCxtJFHV8doOoYwCqGwhyIWP/uZfJMVBIiTguasrhJNrFiSCdm/ICKec\n\tJXoA==", "v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1729185866;\n\ts=strato-dkim-0003; d=ziska.de;\n\th=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date:\n\tFrom:Subject:Sender;\n\tbh=ZKf/n02rjzMepGpSkuuXmnPJ1Dn+plIEKRrTMDtLW3A=;\n\tb=DgEk5foaTzlBMfVVFPEF16/+yC2HhVBAl81iwQkapn7v9hjbQ45jgNuuB9QUx+pMD3\n\tiJ+idkE5H8nAQY5BzgCg==" ], "X-RZG-AUTH": "\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cChoruAPJaMLnEXgE4US4SwNHvFuM4Ih4GFfdN\"", "From": "Jaslo Ziska <jaslo@ziska.de>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Jaslo Ziska <jaslo@ziska.de>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v3 2/3] gstreamer: Remove auto-focus-mode property from\n\tlibcamerasrc", "Date": "Thu, 17 Oct 2024 19:04:14 +0200", "Message-ID": "<20241017172331.16377-3-jaslo@ziska.de>", "X-Mailer": "git-send-email 2.46.2", "In-Reply-To": "<20241017172331.16377-1-jaslo@ziska.de>", "References": "<20241017172331.16377-1-jaslo@ziska.de>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"us-ascii\"", "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>" }, "content": "In preparation for generic support of all libcamera controls, remove the\nmanual handling of the auto-focus-mode property from the libcamerasrc\nelement.\n\nSigned-off-by: Jaslo Ziska <jaslo@ziska.de>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 28 ----------------------------\n src/gstreamer/gstlibcamerasrc.h | 31 -------------------------------\n 2 files changed, 59 deletions(-)", "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 912a8d55..40b787c8 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 */\ndiff --git a/src/gstreamer/gstlibcamerasrc.h b/src/gstreamer/gstlibcamerasrc.h\nindex fd1f8193..a27db9ca 100644\n--- a/src/gstreamer/gstlibcamerasrc.h\n+++ b/src/gstreamer/gstlibcamerasrc.h\n@@ -8,8 +8,6 @@\n \n #pragma once\n \n-#include <libcamera/control_ids.h>\n-\n #include <gst/gst.h>\n \n G_BEGIN_DECLS\n@@ -19,32 +17,3 @@ G_DECLARE_FINAL_TYPE(GstLibcameraSrc, gst_libcamera_src,\n \t\t GST_LIBCAMERA, SRC, GstElement)\n \n G_END_DECLS\n-\n-inline GType\n-gst_libcamera_auto_focus_get_type()\n-{\n-\tstatic GType type = 0;\n-\tstatic const GEnumValue values[] = {\n-\t\t{\n-\t\t\tstatic_cast<gint>(libcamera::controls::AfModeManual),\n-\t\t\t\"AfModeManual\",\n-\t\t\t\"manual-focus\",\n-\t\t},\n-\t\t{\n-\t\t\tstatic_cast<gint>(libcamera::controls::AfModeAuto),\n-\t\t\t\"AfModeAuto\",\n-\t\t\t\"automatic-auto-focus\",\n-\t\t},\n-\t\t{\n-\t\t\tstatic_cast<gint>(libcamera::controls::AfModeContinuous),\n-\t\t\t\"AfModeContinuous\",\n-\t\t\t\"continuous-auto-focus\",\n-\t\t},\n-\t\t{ 0, NULL, NULL }\n-\t};\n-\n-\tif (!type)\n-\t\ttype = g_enum_register_static(\"GstLibcameraAutoFocus\", values);\n-\n-\treturn type;\n-}\n", "prefixes": [ "v3", "2/3" ] }