Patch Detail
Show a patch.
GET /api/1.1/patches/21722/?format=api
{ "id": 21722, "url": "https://patchwork.libcamera.org/api/1.1/patches/21722/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21722/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20241021164946.11111-3-jaslo@ziska.de>", "date": "2024-10-21T16:45:32", "name": "[v4,2/3] gstreamer: Remove auto-focus-mode property from libcamerasrc", "commit_ref": "aebc8742b006d7b4edce34bee93aed9a36aeb466", "pull_url": null, "state": "accepted", "archived": false, "hash": "0569b7dc4a462151b445ac1a4cb25aaadc5d70de", "submitter": { "id": 173, "url": "https://patchwork.libcamera.org/api/1.1/people/173/?format=api", "name": "Jaslo Ziska", "email": "jaslo@ziska.de" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21722/mbox/", "series": [ { "id": 4732, "url": "https://patchwork.libcamera.org/api/1.1/series/4732/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4732", "date": "2024-10-21T16:45:30", "name": "gstreamer: Generate controls from control_ids_*.yaml files", "version": 4, "mbox": "https://patchwork.libcamera.org/series/4732/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21722/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21722/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 305EDBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Oct 2024 16:50:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DCD9C6538B;\n\tMon, 21 Oct 2024 18:50:28 +0200 (CEST)", "from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de\n\t[85.215.255.51])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9A27865393\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Oct 2024 18:50:26 +0200 (CEST)", "from archlinux.fritz.box by smtp.strato.de (RZmta 51.2.11 AUTH)\n\twith ESMTPSA id zf9ba109LGoPVdD\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tMon, 21 Oct 2024 18:50:25 +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=\"m710lVeX\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"xpZqeDqr\"; dkim-atps=neutral", "ARC-Seal": "i=1; a=rsa-sha256; t=1729529425; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=qwaFzV6LAw4i/yC45mHNLmqUxk9VGcL65Dw2/UZqt+kJv1V9n5AuThMpykrc8Mm4cS\n\t4LuLs/RRCNpoo7iZvpdCe0MzgAqbF2nF7V8dMKfv2H9jfElL/BIzib8R3VlVbG8l+hGL\n\tNCm/AZRAe69Vj3/mgQFJOjMppxuZg2vf9viHy/Gem0e85oxjPuVgn/59Y33zSw/NjBmb\n\tMUh6KCy3CcnsKjg+YoN0j8AUivcyYkBlewxv3aLjRiZkKJS5WI3S2kWgbBW6iaF4qoBl\n\t66L9jtzgIwK2C4LXV6Onolvnkj5tWsW8eC7WPfKn1Tz3A/ZgwbRpqk39uANwc8AB5NuH\n\t85Eg==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; t=1729529425;\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=uO2vpQC7FEHevnqhfg6TMwrXpF5yoNqnsB+djCdaeYE=;\n\tb=UuNN+QmXolhLo2L1te3q06hteiPSEzr3jwt+ASfJr2s6ezPdBBt4lnaIK56ZWTbrvA\n\tQl62/bXf5cH3D06yQINGYNaITl2SQ7iaFU4C40KDTF5sD0Dyjs+ysLz2L4QXnsINWVIk\n\tSSeGMSOewQjwF5bMW7eWt1V5OzxgbUXUPuNsew1yB20S9EHuAXMWLJ65VWOxvgFDzMR8\n\tRZjU0EamBwedq/ge/ipCu0IMV7nSxKoBPKkdDGwqkZ8TuZaBRsYQPwKsr5gxkPND4MlO\n\tmi4rmHDmhHPJ5L0vrhwjg2XO+OTInku63Zs9d/slSGe9qfLZhIT4JMb2GXYIzsibHGnw\n\tbt8g==", "ARC-Authentication-Results": "i=1; strato.com;\n arc=none;\n dkim=none", "X-RZG-CLASS-ID": "mo01", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; t=1729529425;\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=uO2vpQC7FEHevnqhfg6TMwrXpF5yoNqnsB+djCdaeYE=;\n\tb=m710lVeXZWzVttigD7yFOO2l+o6mrFwtSA1ka8el3KEbumPS85xGqThyWzxyU2N3Eu\n\tUBI9VbBp/818aHOGurKgqo4SZXSCX0tpQBSHp5jjvjNP0FWWzYA5ohpTCXCSkXW30h+f\n\tT9kuU5qryBK+KsTqOXJI+ajPg3r1bVSGhxRAdaLt/tBGobNj7dcs0qVW5MKKgDG+D6H/\n\tfnqK9zAe+i7LuQV7K+y2Zl2GE4R6I5iB4EC2Ek2ftuDBapZr7s404KG3ijQt/TDGk8As\n\t5mJDWRFTVqh+N8jFAEw/ygsq5sWbpHvdh45Ldcz9OXfF/sQz1TlADTfrGrsq6IXT9SS0\n\t/pJw==", "v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1729529425;\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=uO2vpQC7FEHevnqhfg6TMwrXpF5yoNqnsB+djCdaeYE=;\n\tb=xpZqeDqrp1C7CWcCnA78Bu4+FMM8A/7DU2D7qEkYDBlkC30GQNDLzjbXdGxSGpDOCX\n\tqOQS7luBkwmtFbcp4/DA==" ], "X-RZG-AUTH": "\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cEiIqwXfJa0UVFIOBpUYAtVOpHIoJG1qZybSPb\"", "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>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>", "Subject": "[PATCH v4 2/3] gstreamer: Remove auto-focus-mode property from\n\tlibcamerasrc", "Date": "Mon, 21 Oct 2024 18:45:32 +0200", "Message-ID": "<20241021164946.11111-3-jaslo@ziska.de>", "X-Mailer": "git-send-email 2.47.0", "In-Reply-To": "<20241021164946.11111-1-jaslo@ziska.de>", "References": "<20241021164946.11111-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>\nReviewed-by: Kieran Bingham <kieran.bingham@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": [ "v4", "2/3" ] }