Show a patch.

GET /api/1.1/patches/20902/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 20902,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20902/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20902/",
    "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": "<20240813124722.22425-3-jaslo@ziska.de>",
    "date": "2024-08-13T12:25:06",
    "name": "[v2,2/3] gstreamer: Remove auto-focus-mode property from libcamerasrc",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "47b893945f1ee9b88bd99c884952e11cf2a569c2",
    "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/20902/mbox/",
    "series": [
        {
            "id": 4515,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4515/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4515",
            "date": "2024-08-13T12:25:04",
            "name": "gstreamer: Generate controls from control_ids_*.yaml files",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4515/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20902/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20902/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 26E23BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Aug 2024 12:48:28 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0BF8633BE;\n\tTue, 13 Aug 2024 14:48:27 +0200 (CEST)",
            "from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de\n\t[85.215.255.25])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20FE163398\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Aug 2024 14:48:26 +0200 (CEST)",
            "from archlinux.fritz.box by smtp.strato.de (RZmta 51.1.0 AUTH)\n\twith ESMTPSA id zb9f0a07DCmPU7i\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))\n\t(Client did not present a certificate);\n\tTue, 13 Aug 2024 14:48: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=\"h7ZZevGZ\";\n\tdkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de\n\theader.b=\"CDLsz2KX\"; dkim-atps=neutral",
        "ARC-Seal": "i=1; a=rsa-sha256; t=1723553305; cv=none;\n\td=strato.com; s=strato-dkim-0002;\n\tb=gU7iXpTS/HY1EUNs7l+LrxFIKAhDe7HUf7q3zWZ0aIVMx8X1k2LRpZu2kA2SE3RIZw\n\tUW7hK3aNdcYbK9laGpaGD6rOgLYlfB9CduoV+jikOaFWHlH8LT6uL6QKm2POzWSs/9rn\n\t/jX7toC02+d7L46IKTZssESLOBJc1cibVHDI9DqhyTAdwSckmoxNyVjk6s2OuGHXaxqW\n\tL2qRej0y3F9ZhSbQ7lsz+8gps8VvNAsrtI2C/kjvt5SpVXiosNAjgqse7pKsfU0d3CFy\n\tzkCZytrleworxz1+JQpqNv5RGs1L/jzTjteX6J6E+yGz2nhDDThR4unp0wuKzkJAwgqx\n\tAzBw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; t=1723553305;\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=zKfcHKf1QOPVdTHjg/UZOZmZ8CNKYu49n+dkOWwLGSw=;\n\tb=IdQs61lEYfkaiVVGKT36+avLL1ipvAB7BTY/V1eSVcikJJwHUUdvzkdvJjepwSWcu1\n\tRXk6cZSV4TFAWp3j7t4eyWOHLUadyO7V2xRp6EJ0GKw219y6WiN0mkSxxgzk6a6Capdi\n\tW6LOPjAyuKbv571P7J4HdUsk6xBxZml9vGCT8RgPYkV/KNRVKP8dAkyIJ5n5Afb5N5vO\n\tlQ7X0K4QGcPzsyKqYvle3xljn508RStnbcoqLEA5+EgGU6Hc0KYjfTB3JZrsbMeX8ZLM\n\tkKAjOQ1UfSWRU4QPHLDb/myhgaBi3nxgcNZ5TDVz2vv82fSD16y4+4EHT/kH+APeo1eW\n\tUxYA==",
        "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=1723553305;\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=zKfcHKf1QOPVdTHjg/UZOZmZ8CNKYu49n+dkOWwLGSw=;\n\tb=h7ZZevGZW6vfz3JHGcLHCYRKLZ1tZvdYHkBJKnM610mvDrzGkrJl/N2wl5gS4jzdI0\n\tAdQZGKkzcpsdjUnpa/Mnqrfy6Ug7vXh8EAPGz6Ug8Epd4kKjXmyw/Y5THDLYIhJ4ox4r\n\tWqa/TKLppqA+ZN/KsHOxvdzR3d/SsS4cZNTMx/R9nFQLErEq6NB6MLufPiWKN9tYQAJF\n\tpCnbQqwSZZb2Mt+YLujTNRp4aFSwYoEezJoR8TO8uLUakkpogBQO1TjnYnxq0T8nyTjb\n\tDkRtwzjsUPdmAWKTJjxPU/7H+anxpYeTJ8x//E8F2DklopZZsKh8NtVyYFIgP0XPhStV\n\tcuDA==",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1723553305;\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=zKfcHKf1QOPVdTHjg/UZOZmZ8CNKYu49n+dkOWwLGSw=;\n\tb=CDLsz2KXDLcRJI5FJSF9ZOzroPnWnb1aEuO5Ip4NaroCyFp8nRKPXOulwVCNcI62Ys\n\tJRG8p0FS4dgCSFYUS/BQ=="
        ],
        "X-RZG-AUTH": "\":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cGhoqwVPJQb1HfVSED9d9Z5psVXjkhV67rRpA=\"",
        "From": "Jaslo Ziska <jaslo@ziska.de>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jaslo Ziska <jaslo@ziska.de>",
        "Subject": "[PATCH v2 2/3] gstreamer: Remove auto-focus-mode property from\n\tlibcamerasrc",
        "Date": "Tue, 13 Aug 2024 14:25:06 +0200",
        "Message-ID": "<20240813124722.22425-3-jaslo@ziska.de>",
        "X-Mailer": "git-send-email 2.46.0",
        "In-Reply-To": "<20240813124722.22425-1-jaslo@ziska.de>",
        "References": "<20240813124722.22425-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>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 28 ----------------------------\n 1 file changed, 28 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 */\n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}