From patchwork Mon Aug 5 09:28:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaslo Ziska X-Patchwork-Id: 20767 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0E027C323E for ; Mon, 5 Aug 2024 10:01:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C1F1063383; Mon, 5 Aug 2024 12:01:42 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ziska.de header.i=@ziska.de header.b="rsBIs5CN"; dkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de header.b="A5/WIWVE"; dkim-atps=neutral Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.219]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E4506337E for ; Mon, 5 Aug 2024 12:01:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1722852101; cv=none; d=strato.com; s=strato-dkim-0002; b=EJLzDICVq1EixzfxKcNO1kceygMtm1XAKXq5pJSJ5oRtr3BlrNAWaoghT2XaiLhg3C DBstHEjYwImW0Wlpssx+UH0Exz2W1eaSv8d7dCX8PuJ6KGozQcnNDy4BtkO+h4QCJO75 3UpFol17Mf3imJzDz2rXGxFwdJRAxDmk5YLvkAUjMC3vku/c6f3yZZGDgQLNHy0g96vi Lg7sa1hnoX2sZabpxJqeNVwrRo/x6np9RTQlSQnuOznUCoyoXuM/NZ9UQK3OX90lj1kg oU9V3xKNI74dLhGogZUhY+5NyMRB1pXEzmC4KRGz4AKxnRDn+Fex/wcjHsfbwu2SOiZw Cv1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1722852101; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=hiOd+hNFSxGfhI+NNFS30nToAf7iyESp67roLlCqKJg=; b=L7h6Zah4Zk3BIbxvQwmjJDHpjopdeMO0+4Rh++4C/E5t0gei5Qi1MIVeX5knpneEL6 n4zw78vF2+CDF4jgaACS2xNgr+I421r/GmOLANq/G9cKrf61kc4nyz1a5sR2iRUVxT3W 5Y/2285ZQUULBcHeHDrdZ2JQtwY/Tm5lzjaKdTCE7v1/flxyClOp0ay7pRNmDwElFUF4 2aLFN9nhDr1/QRIHsRqJ0TbG5VosGuqPA5w24SQQk4v3HX5g3G++C6qSo/54zP6ccycS usWDdl9OSRfVkj8NnLIPU2cVbJCkxU6VA0MFBhAJkfjRH+Em24yV5D7OksTJET8DSXo0 TaBA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1722852101; s=strato-dkim-0002; d=ziska.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=hiOd+hNFSxGfhI+NNFS30nToAf7iyESp67roLlCqKJg=; b=rsBIs5CNxq8Op0WaI0+5qrK3Gt9Y3U4EpxFxCv+y36rUTO3FGKlO25yex/dCTIHCO7 4kiPbbRTfFrQv8Czn51lBv7JAjLEZyhDzMktc/GfNuxyVqD+jazwCXQshl1QDMcrpijU ceui48GblOSi7/FGrSw+A7VJu41Tz4W8plfVZgpM1yBreEyGMEoPRSTjF2buFQOAhGPh tUl6DB5SxneskO+OnMCPnXddu2y7sibMNqDqM3KRiR4F74c8UC3ieB6/4U/edLTrialy qePPG7sM2HhtjREpLLFeb4xxcslVDACC2/uINLrRfAZFPlx3y+6AxP92HP4yaXbnqMEO cfWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1722852101; s=strato-dkim-0003; d=ziska.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=hiOd+hNFSxGfhI+NNFS30nToAf7iyESp67roLlCqKJg=; b=A5/WIWVEqmuaH2lS+Q+WTKCFVZC3PEB+SuGsefHWoGzZ/lluZvx2rK0ocX4Ub3OsXu cSrGWzY0JaQj0cYhvrCg== X-RZG-AUTH: ":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cCg4qxBvJaP2L5sFjJoIK+3CsR3+pCW/FVb/tK" Received: from archlinux.fritz.box by smtp.strato.de (RZmta 51.1.0 AUTH) with ESMTPSA id zb9f0a075A1evkF (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Aug 2024 12:01:40 +0200 (CEST) From: Jaslo Ziska To: libcamera-devel@lists.libcamera.org Cc: Jaslo Ziska Subject: [PATCH 1/3] gstreamer: Remove auto-focus-mode property Date: Mon, 5 Aug 2024 11:28:36 +0200 Message-ID: <20240805100038.11972-2-jaslo@ziska.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240805100038.11972-1-jaslo@ziska.de> References: <20240805100038.11972-1-jaslo@ziska.de> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In preparation of the next commit remove the auto-focus-mode property from the libcamera element. Signed-off-by: Jaslo Ziska --- src/gstreamer/gstlibcamerasrc.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp index e1bb6b4c..5a3e2989 100644 --- a/src/gstreamer/gstlibcamerasrc.cpp +++ b/src/gstreamer/gstlibcamerasrc.cpp @@ -142,7 +142,6 @@ struct _GstLibcameraSrc { GstTask *task; gchar *camera_name; - controls::AfModeEnum auto_focus_mode = controls::AfModeManual; std::atomic pending_eos; @@ -154,7 +153,6 @@ struct _GstLibcameraSrc { enum { PROP_0, PROP_CAMERA_NAME, - PROP_AUTO_FOCUS_MODE, }; static void gst_libcamera_src_child_proxy_init(gpointer g_iface, @@ -663,18 +661,6 @@ gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread, gst_pad_push_event(srcpad, gst_event_new_segment(&segment)); } - if (self->auto_focus_mode != controls::AfModeManual) { - const ControlInfoMap &infoMap = state->cam_->controls(); - if (infoMap.find(&controls::AfMode) != infoMap.end()) { - state->initControls_.set(controls::AfMode, self->auto_focus_mode); - } else { - GST_ELEMENT_ERROR(self, RESOURCE, SETTINGS, - ("Failed to enable auto focus"), - ("AfMode not supported by this camera, " - "please retry with 'auto-focus-mode=AfModeManual'")); - } - } - ret = state->cam_->start(&state->initControls_); if (ret) { GST_ELEMENT_ERROR(self, RESOURCE, SETTINGS, @@ -742,9 +728,6 @@ gst_libcamera_src_set_property(GObject *object, guint prop_id, g_free(self->camera_name); self->camera_name = g_value_dup_string(value); break; - case PROP_AUTO_FOCUS_MODE: - self->auto_focus_mode = static_cast(g_value_get_enum(value)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -762,9 +745,6 @@ gst_libcamera_src_get_property(GObject *object, guint prop_id, GValue *value, case PROP_CAMERA_NAME: g_value_set_string(value, self->camera_name); break; - case PROP_AUTO_FOCUS_MODE: - g_value_set_enum(value, static_cast(self->auto_focus_mode)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -967,14 +947,6 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass) | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(object_class, PROP_CAMERA_NAME, spec); - spec = g_param_spec_enum("auto-focus-mode", - "Set auto-focus mode", - "Available options: AfModeManual, " - "AfModeAuto or AfModeContinuous.", - gst_libcamera_auto_focus_get_type(), - static_cast(controls::AfModeManual), - G_PARAM_WRITABLE); - g_object_class_install_property(object_class, PROP_AUTO_FOCUS_MODE, spec); } /* GstChildProxy implementation */