[libcamera-devel,RFC,v1,0/7] Python bindings event handling
mbox series

Message ID 20220623144736.78537-1-tomi.valkeinen@ideasonboard.com
Headers show
Series
  • Python bindings event handling
Related show

Message

Tomi Valkeinen June 23, 2022, 2:47 p.m. UTC
Hi,

I've been working on enabling the rest of the events for the Python
bindings.

This is an RFC, as it's not quite ready yet, but I wanted to post this
before the long weekend to possibly get feedback on the approach.

There is one bug with the series: for some reason the camera
added/removed events do not work. I was unable to get the Signals
properly connected to a lambda or a method, although connecting to a
static function works. It compiles but the handler is never called, and
my tests seg fault at exit.

And this needs documentation...

 Tomi

Tomi Valkeinen (7):
  py: cam.py: Fix multi camera capture without -C
  py: Add Python logging category
  py: Move ControlValue helpers to py_helpers.cpp
  py: Create PyCameraManager
  py: Add 'nonblocking' argument to get_ready_requests()
  py: New event handling
  py: cam.py: Use new events support

 src/py/cam/cam.py                      |  33 ++-
 src/py/libcamera/meson.build           |   2 +
 src/py/libcamera/py_camera_manager.cpp | 393 +++++++++++++++++++++++++
 src/py/libcamera/py_camera_manager.h   |  74 +++++
 src/py/libcamera/py_helpers.cpp        |  98 ++++++
 src/py/libcamera/py_helpers.h          |  13 +
 src/py/libcamera/py_main.cpp           | 283 +++++++-----------
 src/py/libcamera/py_main.h             |  12 +
 8 files changed, 730 insertions(+), 178 deletions(-)
 create mode 100644 src/py/libcamera/py_camera_manager.cpp
 create mode 100644 src/py/libcamera/py_camera_manager.h
 create mode 100644 src/py/libcamera/py_helpers.cpp
 create mode 100644 src/py/libcamera/py_helpers.h
 create mode 100644 src/py/libcamera/py_main.h