[libcamera-devel,v5,00/13] py: New python bindings event handling
mbox series

Message ID 20230603075615.20663-1-tomi.valkeinen@ideasonboard.com
Headers show
Series
  • py: New python bindings event handling
Related show

Message

Tomi Valkeinen June 3, 2023, 7:56 a.m. UTC
Hi,

Here's v5. Rebased on top of latest master, which includes a few of the
patches that were present in the v4.

The main change in this version is how the Camera events are enabled or
disabled. We now have the following methods in the Camera class:

get_camera_event_enabled(CameraEventType)
enable_camera_event(CameraEventType)
disable_camera_event(CameraEventType)

In other words, the user can now enable and disable events per camera
using the CameraEventType enum. RequestCompleted is enabled by default,
whereas BufferCompleted and Disconnect need to be explicitly enabled.

 Tomi

Tomi Valkeinen (13):
  subprojects: Drop pybind11 from gitignore
  py: Fix code formatting
  py: New event handling
  py: cam.py: Use new events support
  py: unittests.py: Use new events support
  py: simple-capture.py: Use new events support
  py: simple-continuous-capture.py: Use new events support
  py: simple-cam.py: Use new events support
  py: Drop get_ready_requests()
  py: Add hotplug-monitor.py
  py: unittests.py: Add test for refs & keep-alives
  py: unittests.py: Fix type checker warnings
  py: Improve stub type generation for PyCameraEvent

 Documentation/python-bindings.rst            |  24 +-
 src/py/cam/cam.py                            |  27 +-
 src/py/examples/hotplug-monitor.py           |  39 +++
 src/py/examples/simple-cam.py                |  19 +-
 src/py/examples/simple-capture.py            |  15 +-
 src/py/examples/simple-continuous-capture.py |  17 +-
 src/py/libcamera/py_camera_manager.cpp       | 263 +++++++++++++++++--
 src/py/libcamera/py_camera_manager.h         |  72 ++++-
 src/py/libcamera/py_main.cpp                 |  61 ++++-
 subprojects/.gitignore                       |   1 -
 test/py/unittests.py                         | 144 +++++++++-
 11 files changed, 597 insertions(+), 85 deletions(-)
 create mode 100755 src/py/examples/hotplug-monitor.py