{"id":16006,"url":"https://patchwork.libcamera.org/api/covers/16006/?format=json","web_url":"https://patchwork.libcamera.org/cover/16006/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220524114610.41848-1-tomi.valkeinen@ideasonboard.com>","date":"2022-05-24T11:45:51","name":"[libcamera-devel,v2,00/19] More misc Python patches","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/?format=json","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/16006/mbox/","series":[{"id":3134,"url":"https://patchwork.libcamera.org/api/series/3134/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3134","date":"2022-05-24T11:45:51","name":"More misc Python patches","version":2,"mbox":"https://patchwork.libcamera.org/series/3134/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/16006/comments/","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 46B9BBD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 May 2022 11:46:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 484F36566A;\n\tTue, 24 May 2022 13:46:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6BEB860422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 May 2022 13:46:30 +0200 (CEST)","from deskari.lan (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 68B9B4A8;\n\tTue, 24 May 2022 13:46:29 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653392792;\n\tbh=2Q1T6sdqoSsEUGV90vDmswWzHGAF4dQ92EMWfssz96M=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=P+NeMKYu7etUAne4euU1zURT/+r+qPCbss36dcBVxRHiuMdwbKWhCWLD2C+l9/T02\n\tlwT7Kg2xJjKoTxaMUDvVAs2fVziZ0pwKfSp2AMvicKNr1CJri+OdxC/JuTu3MKjK5r\n\tDe1A4v1MFEJP6SQuXeiFTmI0ZmrlT/EeUprJIhiN++oJ5yktGs/eVG7AApNtLXHIAF\n\t73G8U5bPbz9lgOQ2T5UYzTUQIhFS/ze+wNzUq+rz+t+6LJh8JA7E24Q88XuvvrqLU6\n\tQQOuVfZOif5sL7HNWsE+cb9o6ONXdktiSJEqEZzImGvTR+rkxklh0Afr8X1U3LbmpE\n\tirGw7B/OWcL0w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653392789;\n\tbh=2Q1T6sdqoSsEUGV90vDmswWzHGAF4dQ92EMWfssz96M=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=BhdqKlWQdx7ZCESjuFOysIRQIY/0tUK8XTjTT42HeD2AEnH7h/Y/reI4dLL5yQtdZ\n\tySzzunFm7xWvbhlz/Q3ycJ7jR1hLyI44ZNTjg5ZYm9eUoER+3gld2ajwh1RW7kqaS4\n\tV6pw3Pvq3yj3mjgve1yc8CtEcRjGasQLSS3a7U30="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"BhdqKlWQ\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>","Date":"Tue, 24 May 2022 14:45:51 +0300","Message-Id":"<20220524114610.41848-1-tomi.valkeinen@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 00/19] More misc Python patches","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>","From":"Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi,\n\nv2 of the series. Or more like a new series, but as the previous patches\nhaven't been merged yet, I have them included here. The only changes to\nthe patches that were in v1 are:\n\n- Drop the change to WA_ShowWithoutActivating (separated to a new patch)\n- Split \"class PyFormats {};\" to multiple lines\n\nThe rest of the patches are new.\n\nI think the controls and properties are much better after this series.\nHowever, they're still not quite the same to the C++ version, and I'm\nnot sure if we need to change them further. I do find the controls C++\nAPI somewhat confusing so I might be making wrong assumptioons on how\nthey're used. Also, I think we don't want to expose ControlValue\ndirectly but rather just implicitly convert between Python types to\nControlValue and vice versa.\n\n Tomi\n\nTomi Valkeinen (19):\n  py: Generate pixel formats list\n  py: cam_qt: Use libcamera.formats\n  py: cam: Cleanups\n  py: Fix SceneFlicker enum values\n  py: Fix None value in ControlType enum\n  py: Add CameraManager.read_event()\n  py: Move MappedFrameBuffer to libcamera.utils\n  py: MappedFrameBuffer: Add type hints & docs\n  py: cam: Drop WA_ShowWithoutActivating\n  py: examples: Add simple-capture.py\n  py: examples: Add simple-continuous-capture.py\n  py: examples: Add itest.py\n  py: cam: Convert ctx and state to classes\n  py: Add README.md\n  py: Re-implement controls geneneration\n  py: Re-structure the controls API\n  py: Rename 'efd' to 'event_fd'\n  py: Generate bindings for properties\n  py: Use ln --relative to create symlinks\n\n src/py/README.md                              |  61 ++\n src/py/cam/cam.py                             | 587 +++++++++---------\n src/py/cam/cam_kms.py                         |  14 +-\n src/py/cam/cam_null.py                        |  10 +-\n src/py/cam/cam_qt.py                          |  59 +-\n src/py/cam/cam_qtgl.py                        |  32 +-\n src/py/examples/itest.py                      | 197 ++++++\n src/py/examples/simple-capture.py             | 153 +++++\n src/py/examples/simple-continuous-capture.py  | 179 ++++++\n src/py/libcamera/__init__.py                  |  80 ---\n ...py-control-enums.py => gen-py-controls.py} |  44 +-\n src/py/libcamera/gen-py-formats.py            |  56 ++\n src/py/libcamera/meson.build                  |  46 +-\n ...ed.cpp.in => py_controls_generated.cpp.in} |  17 +-\n src/py/libcamera/py_enums.cpp                 |   2 +-\n ...ted.cpp.in => py_formats_generated.cpp.in} |  14 +-\n src/py/libcamera/py_main.cpp                  | 117 ++--\n .../libcamera/py_properties_generated.cpp.in  |  30 +\n .../MappedFrameBuffer.py}                     |  19 +-\n src/py/libcamera/utils/__init__.py            |   4 +\n test/py/unittests.py                          |   5 +-\n 21 files changed, 1200 insertions(+), 526 deletions(-)\n create mode 100644 src/py/README.md\n create mode 100755 src/py/examples/itest.py\n create mode 100755 src/py/examples/simple-capture.py\n create mode 100755 src/py/examples/simple-continuous-capture.py\n rename src/py/libcamera/{gen-py-control-enums.py => gen-py-controls.py} (60%)\n create mode 100755 src/py/libcamera/gen-py-formats.py\n copy src/py/libcamera/{py_control_enums_generated.cpp.in => py_controls_generated.cpp.in} (50%)\n rename src/py/libcamera/{py_control_enums_generated.cpp.in => py_formats_generated.cpp.in} (56%)\n create mode 100644 src/py/libcamera/py_properties_generated.cpp.in\n copy src/py/libcamera/{__init__.py => utils/MappedFrameBuffer.py} (88%)\n create mode 100644 src/py/libcamera/utils/__init__.py"}