[{"id":22124,"web_url":"https://patchwork.libcamera.org/comment/22124/","msgid":"<CAHW6GY+=NC7V91niDzsBN3Bc4U0xu8EEMHN8RBa952_e84p74Q@mail.gmail.com>","date":"2022-02-04T15:17:56","subject":"Re: [libcamera-devel] [PATCH v4 0/5] Python bindings","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Tomi\n\nI don't think you should need a custom built kernel, but perhaps you just\nneed an up to date one? Either flash a new SD card with the new Bullseye\nthat we released on 28/1 (that's the one the RPi Imager tool should pick),\nor maybe \"sudo apt update\" and \"sudo apt dist-upgrade\" will work. If that\nstill doesn't work, maybe post the error messages.\n\nDavid\n\nOn Fri, 4 Feb 2022 at 13:38, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\nwrote:\n\n> Hi,\n>\n> v4 of the RFC. I'm still not calling this \"PATCH\" due to the two hacks\n> in the series. I have not had too much time to work on this, but I\n> wanted to fix the easy ones.\n>\n> Changes 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>\n> The two major issues not solved are related to the two HACK patches in\n> the series. I don't have a good solution for the Camera destructor\n> issue, although I did add a link to a pybind11 pull request which does\n> fix it. The other issue, exposing Camera from Request, should be\n> fixable, but needs a real amount of work.\n>\n> I have tested this only on my PC. Unfortunately I wasn't able to run\n> libcamera on RPi anymore. I guess I need a custom built kernel now?\n>\n>  Tomi\n>\n> Tomi 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\n>\n> --\n> 2.25.1\n>\n>","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 EBFA1BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Feb 2022 15:18:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 49B4C60E3C;\n\tFri,  4 Feb 2022 16:18:08 +0100 (CET)","from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com\n\t[IPv6:2a00:1450:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4138D603AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Feb 2022 16:18:07 +0100 (CET)","by mail-wm1-x32c.google.com with SMTP id\n\tl123-20020a1c2581000000b0037b9d960079so866240wml.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 04 Feb 2022 07:18:07 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"B911bZu8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=+nnOWK/hA5Ypf3gnN5aY0PEKLJt6LaIfsZs//3tm7eQ=;\n\tb=B911bZu8n7eQHXqDfX4qqK/57aGYFji2Jije9kycXEw5gnasPgpNEuZjEwxvrixWpS\n\tub2Lb5ViyL0SmgvVs0w+1o8hJmLGD20efmsN4LDzIiNiiHZdheQkIQsI46v5wNAwPvAu\n\tq2SAQvvd5ugqVPHhwjIhzN82MMtXYjx4Cjnnow3WDXezgbXlzxRGZ2FADWfa5a6qo8aT\n\tMPGau5Yn/vtathDWSWuLyTFqMUk+S7yYCRg3U/R4RGbzFe27U/5MGgADFfIRtQuGEnyA\n\tNOKB+Jg8HTTYm9r0DnLRApMVuKJ1KKJLLygVriVIY3uPGODG2r49jh/9A6dVgsblhGTy\n\tK39w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=+nnOWK/hA5Ypf3gnN5aY0PEKLJt6LaIfsZs//3tm7eQ=;\n\tb=LidpYAkBRakSbsW5A4EO2pPIZCxFzFjavywH4bG6SRClZ8xBA/c3GqqFJZDyMEJ3NP\n\t45hNDqaUZ5jfbKZLChHQ6mgvvmHPXz5RwcXSnVqLas8dD0CutfZ7eCkieygYUSJWv51Q\n\tEABiXkcxG4GnYV3Fo1DVzuXHfF4Km75D+MQPqTsk2rJt/UYwbYzHiua7t4QqDpiqn9Yd\n\tZeD0AqQxKQHMZCgN5MT85zIxr8RaBwn5uvm5EY9tF+DHiEhmWMPgDK0jcSA09sZq8iLO\n\tT6VziV2xcSNK6NwMFVNpaPDf9CNfq/mAszCT15Hz6qS0C8yEAlKf83OQ2AJwlxKfHSmJ\n\t6StA==","X-Gm-Message-State":"AOAM533jrzzUU6NyNCQejqdjEb/UJze7W+4lrX9tuY75QGmbl2SO9yVr\n\tv4WsPSRoW7qLRGPKu6wKvTM0gwmpNaqZ5B3xjPAOnB6GiCGApA==","X-Google-Smtp-Source":"ABdhPJw+F4++DbkfLlxFfJJ85iNpA7WuaX33mfrtN/QRxihz28I/6U3VsORqxK04otQNf/Ab/N2jNB6zfvFF1CqqQUM=","X-Received":"by 2002:a05:600c:365a:: with SMTP id\n\ty26mr2606900wmq.163.1643987886798; \n\tFri, 04 Feb 2022 07:18:06 -0800 (PST)","MIME-Version":"1.0","References":"<20220204133814.303217-1-tomi.valkeinen@ideasonboard.com>","In-Reply-To":"<20220204133814.303217-1-tomi.valkeinen@ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Fri, 4 Feb 2022 15:17:56 +0000","Message-ID":"<CAHW6GY+=NC7V91niDzsBN3Bc4U0xu8EEMHN8RBa952_e84p74Q@mail.gmail.com>","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"00000000000002183205d732c21a\"","Subject":"Re: [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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]