<div dir="ltr">Hi Tomi<div><br></div><div>Thank you for sharing this, I think it is very interesting work.</div><div><br></div><div>I was wondering, is there a discussion anywhere of what this Python API will look like for end users and how it would be used? You may know that Raspberry Pi has something called PiCamera which is a set of Python bindings for our existing (non-libcamera) camera stack. However, I think it's probably at a rather higher level that what is being envisaged for libcamera and therefore cannot be compared directly. But I'm definitely interested to understand more about it, and how (for example) we might build on top of it to provide something closer to what our users have been accustomed to.</div><div><br></div><div>Thanks again!</div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 18 Sep 2020 at 16:21, Tomi Valkeinen <<a href="mailto:tomi.valkeinen@iki.fi">tomi.valkeinen@iki.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Laurent asked me to send these to get discussions about the challenges<br>
on the list (rather than in private chats...).<br>
<br>
This is a prototype, RFC, hack, whatever you want to call it, but it<br>
works for me for the small subset of features used in test.py.<br>
<br>
The main patch "libcamera python bindings" has some questions/issues<br>
listed in the description, and I've added comments to the code where I'm<br>
not sure where to go.<br>
<br>
There were no submodules in libcamera, so I used the same convention<br>
I've used in kms++: ext/<submodule>. pybind11 could be added as<br>
something that comes from the system (at least Ubuntu 20.04 has it), but<br>
as it's header only, I think having it as a submodule is the easiest and<br>
most manageable way to add it.<br>
<br>
Tomi<br>
<br>
Tomi Valkeinen (4):<br>
Add pybind11 submodule<br>
Add BoundMethodFunction<br>
hack: Camera public destructor<br>
libcamera python bindings<br>
<br>
.gitmodules | 3 +<br>
ext/pybind11 | 1 +<br>
include/libcamera/bound_method.h | 25 +++++<br>
include/libcamera/camera.h | 2 +-<br>
include/libcamera/signal.h | 6 ++<br>
meson.build | 1 +<br>
meson_options.txt | 2 +<br>
py/meson.build | 1 +<br>
py/pycamera/__init__.py | 29 +++++<br>
py/pycamera/meson.build | 35 ++++++<br>
py/pycamera/pymain.cpp | 169 +++++++++++++++++++++++++++++<br>
py/test/run-valgrind.sh | 3 +<br>
py/test/run.sh | 3 +<br>
py/test/test.py | 177 +++++++++++++++++++++++++++++++<br>
py/test/valgrind-pycamera.supp | 17 +++<br>
15 files changed, 473 insertions(+), 1 deletion(-)<br>
create mode 100644 .gitmodules<br>
create mode 160000 ext/pybind11<br>
create mode 100644 py/meson.build<br>
create mode 100644 py/pycamera/__init__.py<br>
create mode 100644 py/pycamera/meson.build<br>
create mode 100644 py/pycamera/pymain.cpp<br>
create mode 100755 py/test/run-valgrind.sh<br>
create mode 100755 py/test/run.sh<br>
create mode 100755 py/test/test.py<br>
create mode 100644 py/test/valgrind-pycamera.supp<br>
<br>
-- <br>
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.<br>
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki<br>
<br>
_______________________________________________<br>
libcamera-devel mailing list<br>
<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a><br>
<a href="https://lists.libcamera.org/listinfo/libcamera-devel" rel="noreferrer" target="_blank">https://lists.libcamera.org/listinfo/libcamera-devel</a><br>
</blockquote></div>