{"id":15327,"url":"https://patchwork.libcamera.org/api/covers/15327/?format=json","web_url":"https://patchwork.libcamera.org/cover/15327/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220204133814.303217-1-tomi.valkeinen@ideasonboard.com>","date":"2022-02-04T13:38:09","name":"[libcamera-devel,v4,0/5] Python bindings","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/?format=json","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/15327/mbox/","series":[{"id":2916,"url":"https://patchwork.libcamera.org/api/series/2916/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2916","date":"2022-02-04T13:38:09","name":"Python bindings","version":4,"mbox":"https://patchwork.libcamera.org/series/2916/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/15327/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3BCFDBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Feb 2022 13:38:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 83693609F6;\n\tFri,  4 Feb 2022 14:38:43 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B1E56020C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Feb 2022 14:38:42 +0100 (CET)","from deskari.lan (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A45D0472;\n\tFri,  4 Feb 2022 14:38:41 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Yri9bPU4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1643981922;\n\tbh=n69/mWY540t5Tiu7OD36mU8FzcChVTaHIzHUvJQavFI=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Yri9bPU4rmC9/X2s+ZceLN6+X0wJb8bF6GW8yXDwK4n0jl+fsxiJkhlvaQWWKVYGF\n\t07VRyhmcWivvOiO66+QdYhx2tjLnHdROkMgnXUh4FZrT7KWS8LQpKWr9zvfKmRMIRz\n\twzXhaBdNg+85IWamt2B1ukW3ZSheCbMSbTVfz6uI=","From":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Fri,  4 Feb 2022 15:38:09 +0200","Message-Id":"<20220204133814.303217-1-tomi.valkeinen@ideasonboard.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 0/5] Python bindings","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi,\n\nv4 of the RFC. I'm still not calling this \"PATCH\" due to the two hacks\nin the series. I have not had too much time to work on this, but I\nwanted to fix the easy ones.\n\nChanges in this version:\n- Add unittests.py\n- Move cam.py files under a separate dir\n- Rename the python module to \"libcamera\"\n- Support array controls\n- Rename StreamConfiguration.fmt to pixelFormat\n- Cosmetic changes all around\n- Rebased to latest master (and fixed the issues)\n\nThe two major issues not solved are related to the two HACK patches in\nthe series. I don't have a good solution for the Camera destructor\nissue, although I did add a link to a pybind11 pull request which does\nfix it. The other issue, exposing Camera from Request, should be\nfixable, but needs a real amount of work.\n\nI have tested this only on my PC. Unfortunately I wasn't able to run\nlibcamera on RPi anymore. I guess I need a custom built kernel now?\n\n Tomi\n\nTomi Valkeinen (5):\n  HACK: libcamera: Camera public destructor\n  HACK: libcamera: Request: expose Camera from Request\n  Add Python bindings\n  py: add unittests.py\n  py: Add cam.py\n\n include/libcamera/camera.h   |   2 +-\n include/libcamera/request.h  |   2 +\n meson.build                  |   1 +\n meson_options.txt            |   5 +\n src/libcamera/request.cpp    |   5 +\n src/meson.build              |   1 +\n src/py/cam/cam.py            | 461 +++++++++++++++++++++++++++++++++++\n src/py/cam/cam_kms.py        | 183 ++++++++++++++\n src/py/cam/cam_null.py       |  46 ++++\n src/py/cam/cam_qt.py         | 355 +++++++++++++++++++++++++++\n src/py/cam/cam_qtgl.py       | 386 +++++++++++++++++++++++++++++\n src/py/cam/gl_helpers.py     |  67 +++++\n src/py/libcamera/__init__.py |  10 +\n src/py/libcamera/meson.build |  41 ++++\n src/py/libcamera/pymain.cpp  | 440 +++++++++++++++++++++++++++++++++\n src/py/meson.build           |   1 +\n src/py/test/unittests.py     | 366 +++++++++++++++++++++++++++\n subprojects/.gitignore       |   3 +-\n subprojects/pybind11.wrap    |  12 +\n 19 files changed, 2385 insertions(+), 2 deletions(-)\n create mode 100755 src/py/cam/cam.py\n create mode 100644 src/py/cam/cam_kms.py\n create mode 100644 src/py/cam/cam_null.py\n create mode 100644 src/py/cam/cam_qt.py\n create mode 100644 src/py/cam/cam_qtgl.py\n create mode 100644 src/py/cam/gl_helpers.py\n create mode 100644 src/py/libcamera/__init__.py\n create mode 100644 src/py/libcamera/meson.build\n create mode 100644 src/py/libcamera/pymain.cpp\n create mode 100644 src/py/meson.build\n create mode 100755 src/py/test/unittests.py\n create mode 100644 subprojects/pybind11.wrap"}