[libcamera-devel,v8,0/7] Python bindings
mbox series

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

Message

Tomi Valkeinen May 6, 2022, 2:54 p.m. UTC
Hi,

v8 of the Python Bindings series. Changes to v7:

- Squashed the commits. It was very difficult to manage them separately
  due to the amount of changes done, and  David was fine with squashing
  his code.
- " to ' in py files
- Dropped "using namespace std"
- Member & function naming changes: use C++ style for things that are
  not visible from Python, and Python style for the visible things.
- Changed some enums to inside-a-class-enums (e.g. RequestStatus.* to
  Request.Status.*)
- A bunch of other small cleanups or comment additions

Big thanks to Laurent and Kieran for reviewing the v7!

 Tomi

Tomi Valkeinen (7):
  meson: require meson 0.56+
  meson: use new project_*_root() functions
  meson: add 'check: true' for run_command() calls
  Add Python bindings
  py: generate control enums from yaml
  py: add unittests.py
  py: Add cam.py

 Documentation/meson.build                     |   4 +-
 README.rst                                    |   4 +-
 include/libcamera/ipa/meson.build             |   8 +-
 meson.build                                   |  17 +-
 meson_options.txt                             |   5 +
 src/libcamera/meson.build                     |   4 +-
 src/meson.build                               |   1 +
 src/py/cam/cam.py                             | 484 +++++++++++++
 src/py/cam/cam_kms.py                         | 183 +++++
 src/py/cam/cam_null.py                        |  47 ++
 src/py/cam/cam_qt.py                          | 354 ++++++++++
 src/py/cam/cam_qtgl.py                        | 385 +++++++++++
 src/py/cam/gl_helpers.py                      |  74 ++
 src/py/libcamera/__init__.py                  |  84 +++
 src/py/libcamera/gen-py-control-enums.py      |  95 +++
 src/py/libcamera/meson.build                  |  63 ++
 src/py/libcamera/pyenums.cpp                  |  34 +
 src/py/libcamera/pyenums_generated.cpp.in     |  21 +
 src/py/libcamera/pymain.cpp                   | 642 ++++++++++++++++++
 src/py/meson.build                            |   1 +
 subprojects/.gitignore                        |   3 +-
 subprojects/packagefiles/pybind11/meson.build |   7 +
 subprojects/pybind11.wrap                     |   9 +
 test/meson.build                              |   1 +
 test/py/meson.build                           |  17 +
 test/py/unittests.py                          | 352 ++++++++++
 .../include/libcamera/ipa/meson.build         |   4 +-
 27 files changed, 2880 insertions(+), 23 deletions(-)
 create mode 100755 src/py/cam/cam.py
 create mode 100644 src/py/cam/cam_kms.py
 create mode 100644 src/py/cam/cam_null.py
 create mode 100644 src/py/cam/cam_qt.py
 create mode 100644 src/py/cam/cam_qtgl.py
 create mode 100644 src/py/cam/gl_helpers.py
 create mode 100644 src/py/libcamera/__init__.py
 create mode 100755 src/py/libcamera/gen-py-control-enums.py
 create mode 100644 src/py/libcamera/meson.build
 create mode 100644 src/py/libcamera/pyenums.cpp
 create mode 100644 src/py/libcamera/pyenums_generated.cpp.in
 create mode 100644 src/py/libcamera/pymain.cpp
 create mode 100644 src/py/meson.build
 create mode 100644 subprojects/packagefiles/pybind11/meson.build
 create mode 100644 subprojects/pybind11.wrap
 create mode 100644 test/py/meson.build
 create mode 100755 test/py/unittests.py