{"id":16071,"url":"https://patchwork.libcamera.org/api/1.1/covers/16071/?format=json","web_url":"https://patchwork.libcamera.org/cover/16071/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20220527144447.94891-1-tomi.valkeinen@ideasonboard.com>","date":"2022-05-27T14:44:17","name":"[libcamera-devel,v3,00/30] More misc Python patches","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/1.1/people/109/?format=json","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/16071/mbox/","series":[{"id":3146,"url":"https://patchwork.libcamera.org/api/1.1/series/3146/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3146","date":"2022-05-27T14:44:17","name":"More misc Python patches","version":3,"mbox":"https://patchwork.libcamera.org/series/3146/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/16071/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 D15CEBD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 May 2022 14:45:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EADB765635;\n\tFri, 27 May 2022 16:45:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 06EB4633A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 May 2022 16:45:05 +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 EFA3A32A;\n\tFri, 27 May 2022 16:45:03 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653662707;\n\tbh=UdfGxcTC66zKnh/iR0ZLmCOCPQ5KYci6a7XFvvdpYYA=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=b3ob+lLfQ+drJleUPUsXdPJ/4WdYyCL3ISvQjV/jRrI2yjcpzXe/2z4Y3fT4MXOiZ\n\tqsRdFHviQoYcctOQQ0rWLmzcHd7MVVxMd2vLilUc43n1pVySiCo1nXrQL1Ba/pLIKw\n\tra5LH+SaY1/OrKXtC95axycyZqu/BUCkbiwq5rEKaYCSbjCoo/Fbxc3GTTef7sk9m8\n\tmobha0DPQcfiYKuZPRYoQPcjsDDQmuSEFwN5WNVKDArkNhS7fydRyWtMQvxNr4TFHP\n\tFxN3XIE2TbHD8XcoUoM4Hs50tTxSuAa2Zw2Kpf/5OfJt6/uT2wgbniQUuYWE2DaC7S\n\tsrUbgdCUqyp/g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653662704;\n\tbh=UdfGxcTC66zKnh/iR0ZLmCOCPQ5KYci6a7XFvvdpYYA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=XlgMSYq/8b30penSPDKvXaWbXFrKbspvsGyaIilAfLnZF7XFjf92PVXgjFoKp6WwL\n\t8gG/dnR1dHtQG7/dPjucnGH/A3XUa2ohmY7A288pe7xDAIyiVs4tqQmoludf38PZjO\n\tj9fpDcCt5k13m+3PjUj06m9R8e2xZJnN46bMH/ug="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"XlgMSYq/\"; 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":"Fri, 27 May 2022 17:44:17 +0300","Message-Id":"<20220527144447.94891-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 v3 00/30] 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\nThis series just seems to grow...\n\nMain changes to v2:\n- Fixed, I hope, all the comments from Laurent\n- --mode option for gen-py-controls.py\n- Fixed the missing call to init_py_properties_generated()\n- Added a bunch of new patches\n\nI've moved the examples on top of all the other patches. I added\nsimple-cam.py, which is a copy of the .cpp version.\n\nI still like the simple-capture.py and simple-continuous-capture.py,\nthough.\n\nsimple-capture.py is very simple, but it does all the work in a\nsingle main function, and should be a good way to get familiar with the\nconcepts even if it's perhaps not useful in the real life.\n\nsimple-continuous-capture.py takes it further and makes it more\nrealistic, but also more complex as it adds a few functions, also\nhandles keyboard input, adds a class to store the context, etc.\n\nsimple-continuous-capture.py and simple-cam.py are somewhat different,\nas the simple-cam.py follows the .cpp version as strictly as it can,\nwhereas in simple-continuous-capture.py we use the nice extra stuff from\nPython.\n\nI didn't really touch itest.py much. We can leave that out for the time\nbeing, although I find myself using it often.\n\n Tomi\n\nTomi Valkeinen (30):\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: 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  py: unittests: Fix test_sleep()\n  py: unittests: Fix test_select()\n  py: cam: Move conversion funcs to helpers.py\n  py: cam: Drop PIL dependency\n  py: Add Request.__str__()\n  py: Add FrameMetadataPlane\n  py: Implement FrameBufferPlane\n  py: MappedFrameBuffer: Support non-contextmanager use\n  py: MappedFrameBuffer: Add 'fb' property\n  py: cam: cam_qt: mmap the fbs only once\n  py: examples: Add simple-capture.py\n  py: examples: Add simple-continuous-capture.py\n  py: examples: Add itest.py\n  py: examples: Add simple-cam.py\n\n src/py/README.md                              |  60 ++\n src/py/cam/cam.py                             | 583 +++++++++---------\n src/py/cam/cam_kms.py                         |  20 +-\n src/py/cam/cam_null.py                        |  10 +-\n src/py/cam/cam_qt.py                          | 259 ++------\n src/py/cam/cam_qtgl.py                        |  34 +-\n src/py/cam/{cam_qt.py => helpers.py}          | 178 +-----\n src/py/examples/itest.py                      | 197 ++++++\n src/py/examples/simple-cam.py                 | 352 +++++++++++\n src/py/examples/simple-capture.py             | 159 +++++\n src/py/examples/simple-continuous-capture.py  | 201 ++++++\n src/py/libcamera/__init__.py                  |  80 ---\n ...py-control-enums.py => gen-py-controls.py} |  46 +-\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                  | 184 +++---\n .../libcamera/py_properties_generated.cpp.in  |  30 +\n .../MappedFrameBuffer.py}                     |  61 +-\n src/py/libcamera/utils/__init__.py            |   4 +\n test/py/unittests.py                          |  21 +-\n 23 files changed, 1691 insertions(+), 923 deletions(-)\n create mode 100644 src/py/README.md\n copy src/py/cam/{cam_qt.py => helpers.py} (51%)\n create mode 100755 src/py/examples/itest.py\n create mode 100755 src/py/examples/simple-cam.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} (56%)\n create mode 100644 src/py/libcamera/utils/__init__.py"}