[libcamera-devel] [PATCH v2 00/19] More misc Python patches
Tomi Valkeinen
tomi.valkeinen at ideasonboard.com
Tue May 24 13:45:51 CEST 2022
Hi,
v2 of the series. Or more like a new series, but as the previous patches
haven't been merged yet, I have them included here. The only changes to
the patches that were in v1 are:
- Drop the change to WA_ShowWithoutActivating (separated to a new patch)
- Split "class PyFormats {};" to multiple lines
The rest of the patches are new.
I think the controls and properties are much better after this series.
However, they're still not quite the same to the C++ version, and I'm
not sure if we need to change them further. I do find the controls C++
API somewhat confusing so I might be making wrong assumptioons on how
they're used. Also, I think we don't want to expose ControlValue
directly but rather just implicitly convert between Python types to
ControlValue and vice versa.
Tomi
Tomi Valkeinen (19):
py: Generate pixel formats list
py: cam_qt: Use libcamera.formats
py: cam: Cleanups
py: Fix SceneFlicker enum values
py: Fix None value in ControlType enum
py: Add CameraManager.read_event()
py: Move MappedFrameBuffer to libcamera.utils
py: MappedFrameBuffer: Add type hints & docs
py: cam: Drop WA_ShowWithoutActivating
py: examples: Add simple-capture.py
py: examples: Add simple-continuous-capture.py
py: examples: Add itest.py
py: cam: Convert ctx and state to classes
py: Add README.md
py: Re-implement controls geneneration
py: Re-structure the controls API
py: Rename 'efd' to 'event_fd'
py: Generate bindings for properties
py: Use ln --relative to create symlinks
src/py/README.md | 61 ++
src/py/cam/cam.py | 587 +++++++++---------
src/py/cam/cam_kms.py | 14 +-
src/py/cam/cam_null.py | 10 +-
src/py/cam/cam_qt.py | 59 +-
src/py/cam/cam_qtgl.py | 32 +-
src/py/examples/itest.py | 197 ++++++
src/py/examples/simple-capture.py | 153 +++++
src/py/examples/simple-continuous-capture.py | 179 ++++++
src/py/libcamera/__init__.py | 80 ---
...py-control-enums.py => gen-py-controls.py} | 44 +-
src/py/libcamera/gen-py-formats.py | 56 ++
src/py/libcamera/meson.build | 46 +-
...ed.cpp.in => py_controls_generated.cpp.in} | 17 +-
src/py/libcamera/py_enums.cpp | 2 +-
...ted.cpp.in => py_formats_generated.cpp.in} | 14 +-
src/py/libcamera/py_main.cpp | 117 ++--
.../libcamera/py_properties_generated.cpp.in | 30 +
.../MappedFrameBuffer.py} | 19 +-
src/py/libcamera/utils/__init__.py | 4 +
test/py/unittests.py | 5 +-
21 files changed, 1200 insertions(+), 526 deletions(-)
create mode 100644 src/py/README.md
create mode 100755 src/py/examples/itest.py
create mode 100755 src/py/examples/simple-capture.py
create mode 100755 src/py/examples/simple-continuous-capture.py
rename src/py/libcamera/{gen-py-control-enums.py => gen-py-controls.py} (60%)
create mode 100755 src/py/libcamera/gen-py-formats.py
copy src/py/libcamera/{py_control_enums_generated.cpp.in => py_controls_generated.cpp.in} (50%)
rename src/py/libcamera/{py_control_enums_generated.cpp.in => py_formats_generated.cpp.in} (56%)
create mode 100644 src/py/libcamera/py_properties_generated.cpp.in
copy src/py/libcamera/{__init__.py => utils/MappedFrameBuffer.py} (88%)
create mode 100644 src/py/libcamera/utils/__init__.py
--
2.34.1
More information about the libcamera-devel
mailing list