From patchwork Tue Aug 13 12:25:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaslo Ziska X-Patchwork-Id: 20900 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 1F55ABDB13 for ; Tue, 13 Aug 2024 12:48:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 05D92633B5; Tue, 13 Aug 2024 14:48:02 +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="PBD1vBP3"; dkim=permerror (0-bit key) header.d=ziska.de header.i=@ziska.de header.b="5KTlYBPx"; dkim-atps=neutral Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.162]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 029D463382 for ; Tue, 13 Aug 2024 14:47:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1723553279; cv=none; d=strato.com; s=strato-dkim-0002; b=XmpnL5CQpmjNdVvegH4ueMnSRo1tZJ/uiQJh4X9NfJvkDpmOPG7R5eq32TYfznJqr2 ps0+vcRTWDcPaGVH8wObjfk6Mu2sAxn6oTlqHBD8ANl0ahaavtRZYhxqzNZMCBjfu8qo FvgnB+iQbpnvVoemJOGcrLMkUXghJVNQh653hMp2j5ncRrbmS6alANeu6lBDCtzqlDMp 9kXo6sI0gJnOG51YMctC4/aG8c2y2fGoc1OYC2zc8i3liZuVWcMLEp3O7Mzwi0bqzs8W dMiuwtk1HSvLkmC5OO6UHLf9VEvq9/AmvRtDhYJr011sJjYn/cBFzYHXS0EsMPDwbwAs 4oIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1723553279; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=FljXdK+7/SsjZkcRoRHOaAOHHlgP4rFcGiEQTwmqOFI=; b=MWKaCB5q2mhoZ2GRjkQuEliiRPhgQgpB95xBzzGFNXAEs8thYCnlKcjgo3He9jN0NA Kgh04lEI6GXvGArj8BWMLTFYoWzJgd02kUYS7KpianW6OX5SwIXkdx9AtL8f1OvLJ6eS w5oklaSyAULBWmm1C7efSHH1kat7RjVPr3/yoNpTcsJJJVO2z/M7V52KhNGAvyJw1PTz DObo2JffUKfNQJe3YSNg2Qf2+FiktUL3nHLYmHZMctntt05wZySuqdfzY5knzN0lk2eo DBSuEprX3EQW0CDTT7ePEkZJ6igN1VIYK87rXdAJcJkaj5G88QcETUmw+2anlZCKi83J md7A== 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=1723553279; s=strato-dkim-0002; d=ziska.de; h=Message-ID:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=FljXdK+7/SsjZkcRoRHOaAOHHlgP4rFcGiEQTwmqOFI=; b=PBD1vBP3az657Tk/imAmt/68xM4mm3H/P558Qur8XWxzmKfTw/SSEPxEuqpAf201rU dbFXXRYvJ1R8IU80bzCnDITIsNuEP/G4kgk0d2Gu9OnnvzitS/rX4YAfLdLLMc4qT0Wq PPM3IZwyn2kA83fRkug7JQrq8aaOOzYmA2P+AVxsuBMG8Qiw94RhAUpTkFDI3A1MGiJE D5TiNrHAo8CUXInhlvZR4SAoPhWDF+TQ6q4N/360mOYbCMDseCGJUvv0ZVtpQcoKEKyd bg9JbpDUb27QUUfjouM7IhyqjDHnQ27h8ctmyx7E74FEEUxJIRGDsbRiTVMxijyuJIf6 HP8A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1723553279; s=strato-dkim-0003; d=ziska.de; h=Message-ID:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=FljXdK+7/SsjZkcRoRHOaAOHHlgP4rFcGiEQTwmqOFI=; b=5KTlYBPx+b57ekf+3rW4zjWM9HZ4JJcW1yot/WfwYPvboZrd6vV7ttbeplsKn+3Z4P s071sMNPyclbboBitRDg== X-RZG-AUTH: ":Jm0XeU+IYfb0x77LHmrjN5Wlb7TBwusDqIM6Hizy8VdfzvKi4yoFC9cGhoqwVPJQb1HfVSED9d9Z5psVXjkhV67rRpA=" Received: from archlinux.fritz.box by smtp.strato.de (RZmta 51.1.0 AUTH) with ESMTPSA id zb9f0a07DClxU7a (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 13 Aug 2024 14:47:59 +0200 (CEST) From: Jaslo Ziska To: libcamera-devel@lists.libcamera.org Cc: Jaslo Ziska Subject: [PATCH v2 0/3] gstreamer: Generate controls from control_ids_*.yaml files Date: Tue, 13 Aug 2024 14:25:04 +0200 Message-ID: <20240813124722.22425-1-jaslo@ziska.de> X-Mailer: git-send-email 2.46.0 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" Hi everyone, this is the second version of the patch set to implement gstreamer controls from the yaml files. This now depends on "[PATCH 00/10] libcamera: Improve code generation for controls" for the code generation. The following things changed: The (old) third commit fixing a typo has been removed as it is already merged. The first commit is new: it removes the auto-focus-mode property from the device provider where it has been added on accident. The commit message has been updated in the second commit. The third commit, which adds the code that generates the gstreamer controls, now makes use of jinja2 and the new controls.py file. As a consequence the whole code generation has been redone. There are also some new features: It is now possible to read the metadata returned by requests from the gstreamer properties. This is done using a new function readMetadata() which reads the ControlList in requestCompleted(). Before a control is set it is now checked whether this control is actually supported by the camera. This is done by checking the cameras ControlInfoMap. The Rectangle type is now supported. Some checks were added to make sure the arrays passed to the element have the correct length. Best regards, Jaslo Jaslo Ziska (3): gstreamer: Remove auto-focus-mode property from device provider gstreamer: Remove auto-focus-mode property from libcamerasrc gstreamer: Generate controls from control_ids_*.yaml files src/gstreamer/gstlibcamera-controls.cpp.in | 296 +++++++++++++++++++++ src/gstreamer/gstlibcamera-controls.h | 43 +++ src/gstreamer/gstlibcameraprovider.cpp | 15 -- src/gstreamer/gstlibcamerasrc.cpp | 50 ++-- src/gstreamer/meson.build | 10 + utils/codegen/controls.py | 8 + utils/codegen/gen-gst-controls.py | 151 +++++++++++ utils/codegen/meson.build | 1 + 8 files changed, 528 insertions(+), 46 deletions(-) create mode 100644 src/gstreamer/gstlibcamera-controls.cpp.in create mode 100644 src/gstreamer/gstlibcamera-controls.h create mode 100755 utils/codegen/gen-gst-controls.py --- 2.46.0