[{"id":21702,"web_url":"https://patchwork.libcamera.org/comment/21702/","msgid":"<CAHW6GYKf7+V48-mgYawR6fLXFyDY1BF1tHKwR0r+CTykTq971Q@mail.gmail.com>","date":"2021-12-09T10:32:17","subject":"Re: [libcamera-devel] [RFC v3 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, everyone\n\nThanks for submitting this set, very pleased to see this moving again!\n\nI've actually been using these bindings extensively over the last\nseveral weeks, so we could add:\n\nTested-by: David Plowman <david.plowman@raspberrypi.com>\n\nto all of them.\n\nA couple of points:\n\n* For my Picamera2 use cases (which are not remarkable) I had to add\nsupport for array controls, controls in the camera start() method, and\nan implementation of the transforms. I can submit those changes on top\nof this patch set at a later date, though they probably lack the\nrequisite loveliness at the moment.\n\n* About the name \"pycamera\". Could we use \"pylibcamera\" instead? I\nworry that \"pycamera\" would cause more confusion with \"picamera\",\nwhich is of course our legacy stack Python library that Picamera2 is\nreplacing.\n\nThanks!\nDavid\n\nOn Thu, 9 Dec 2021 at 09:29, Tomi Valkeinen\n<tomi.valkeinen@ideasonboard.com> wrote:\n>\n> Hi,\n>\n> Third RFC of the python bindings. I believe it's over a year since the\n> last version, and I've been tinkering with the bindings every now and\n> then.\n>\n> This version includes cam.py, which mimics 'cam' tool. The idea is not\n> to try to replace 'cam', but to test the bindings in a real use case,\n> rather than artificial tests.\n>\n> There are a few clear items that should be done to make this more\n> usable:\n>\n> - Fix the ControlValue handling, as arrays are not handled at all.\n>   Possibly other types are not handled correctly.\n> - Add ControlList parameter to Camera.start()\n> - Add Transform\n>\n>  Tomi\n>\n> Tomi Valkeinen (5):\n>   HACK: Camera public destructor\n>   libcamera: Request: expose Camera from Request\n>   gitignore: add .cache\n>   Add Python bindings\n>   py: Add cam.py\n>\n>  .gitignore                  |   2 +\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/meson.build          |   1 +\n>  src/py/pycamera/__init__.py |  10 +\n>  src/py/pycamera/meson.build |  43 ++++\n>  src/py/pycamera/pymain.cpp  | 424 ++++++++++++++++++++++++++++++++\n>  src/py/test/cam.py          | 464 ++++++++++++++++++++++++++++++++++++\n>  src/py/test/cam_kms.py      | 185 ++++++++++++++\n>  src/py/test/cam_null.py     |  46 ++++\n>  src/py/test/cam_qt.py       | 355 +++++++++++++++++++++++++++\n>  src/py/test/cam_qtgl.py     | 385 ++++++++++++++++++++++++++++++\n>  src/py/test/gl_helpers.py   |  67 ++++++\n>  subprojects/pybind11.wrap   |  12 +\n>  18 files changed, 2009 insertions(+), 1 deletion(-)\n>  create mode 100644 src/py/meson.build\n>  create mode 100644 src/py/pycamera/__init__.py\n>  create mode 100644 src/py/pycamera/meson.build\n>  create mode 100644 src/py/pycamera/pymain.cpp\n>  create mode 100755 src/py/test/cam.py\n>  create mode 100644 src/py/test/cam_kms.py\n>  create mode 100644 src/py/test/cam_null.py\n>  create mode 100644 src/py/test/cam_qt.py\n>  create mode 100644 src/py/test/cam_qtgl.py\n>  create mode 100644 src/py/test/gl_helpers.py\n>  create mode 100644 subprojects/pybind11.wrap\n>\n> --\n> 2.25.1\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 75A19BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Dec 2021 10:32:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D7E6760822;\n\tThu,  9 Dec 2021 11:32:29 +0100 (CET)","from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 239FB60224\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Dec 2021 11:32:28 +0100 (CET)","by mail-wm1-x336.google.com with SMTP id 137so3799682wma.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 09 Dec 2021 02:32:28 -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=\"lo9JbGMw\"; 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=HuWzwbeI7JOM4S9Qo36WrrCmLWQgoYJT4RLaeV1ozU8=;\n\tb=lo9JbGMwQ7OVp7FaZMPmrSM5+n3vuyt+I//lp6NBvuY5jt2RGcxeDoRO+rPkAyRQ2M\n\t0NWmKoi3OJ66cnO4PAoZqVVoScZF/Lo9Q6j2Gj2jGeaSv+WeubCJO/hf364srhNcCbbD\n\tcqLFvIb6dDIJpslANhQ6EnxDwiXVxVu1X8Pj1//jSJ+Fxs3ULf8YbzR9wgunkWkEQtsl\n\tfJas7kvc72v61HOXKil211icL8Vnhx3Fb2gOz4qy60k+MFr4MxUjsm/j8rZuBhhdIMWU\n\tumYy97t7d50jP4gbuHOf60/CeITPD2+tTyjOCdZV8cIKbUep6DG0/puE/zaTEM+ruKVJ\n\tLfig==","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=HuWzwbeI7JOM4S9Qo36WrrCmLWQgoYJT4RLaeV1ozU8=;\n\tb=z2j4V+JhNPFDlWyPWNnVxU9HymIno2DBN7GUQ6GAlaSaktSVcs2ysG+0Tra51myzSG\n\tE7f9AYrblin+bqbzy9TZjcrQgwyXwbx1BQUI3VKJM3FLfd77ezAhMySyS8KuKJzUdd/G\n\tFkgVC860kt8+yolj7UdgTJRaoODjZwkXTb7jLNDm2vv2yDIiVv+fGAXJzDvYq889ut1Z\n\tJ76rwx+ICzpiRWyZG52aZzUoPWkkFBcyv9jvapI6ZW7TavCWqGYQu1lnpB00QymeyEA7\n\tuGa7Hx/4ZUgxdlBzeu2BxSE94tC11y/LtkDI56ke1ajN563O7C1yduW2xpGXnE0si7JC\n\tjnqg==","X-Gm-Message-State":"AOAM53199UxzUMmA1RNNTVtEGVpGlh+dY3wNtNT8LxYkRnJO0MBUBnXz\n\tUiO8GVlBDt7MV/6TYaW7kqNIX7VotLqIoLXxTif8lP3eEGdTew==","X-Google-Smtp-Source":"ABdhPJyEoGl6RPTW26uPJSOI8Ly/qi9f6KL2JhaDSZnkdfEO8eS1V/z9YKtiltJuh2lFM0jeCtw3Gb3m1HDcrserjp0=","X-Received":"by 2002:a7b:ca54:: with SMTP id m20mr5997873wml.21.1639045947815;\n\tThu, 09 Dec 2021 02:32:27 -0800 (PST)","MIME-Version":"1.0","References":"<20211209092906.37303-1-tomi.valkeinen@ideasonboard.com>","In-Reply-To":"<20211209092906.37303-1-tomi.valkeinen@ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 9 Dec 2021 10:32:17 +0000","Message-ID":"<CAHW6GYKf7+V48-mgYawR6fLXFyDY1BF1tHKwR0r+CTykTq971Q@mail.gmail.com>","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC v3 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>"}},{"id":21715,"web_url":"https://patchwork.libcamera.org/comment/21715/","msgid":"<YbIyejUEDVrB5ksc@pendragon.ideasonboard.com>","date":"2021-12-09T16:44:42","subject":"Re: [libcamera-devel] [RFC v3 0/5] Python bindings","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nOn Thu, Dec 09, 2021 at 10:32:17AM +0000, David Plowman wrote:\n> Hi Tomi, everyone\n> \n> Thanks for submitting this set, very pleased to see this moving again!\n> \n> I've actually been using these bindings extensively over the last\n> several weeks, so we could add:\n> \n> Tested-by: David Plowman <david.plowman@raspberrypi.com>\n> \n> to all of them.\n> \n> A couple of points:\n> \n> * For my Picamera2 use cases (which are not remarkable) I had to add\n> support for array controls, controls in the camera start() method, and\n> an implementation of the transforms. I can submit those changes on top\n> of this patch set at a later date, though they probably lack the\n> requisite loveliness at the moment.\n> \n> * About the name \"pycamera\". Could we use \"pylibcamera\" instead? I\n> worry that \"pycamera\" would cause more confusion with \"picamera\",\n> which is of course our legacy stack Python library that Picamera2 is\n> replacing.\n\nOne always loves a naming discussion.\n\nDo we need the \"py\" prefix ? I would assume that a Python module can\nsafely be considered to be python-related, even with a \"py\" prefix :-)\nWe could then name the module \"libcamera\", \"camera\" or \"cam\" (the last\none may be a bit too short).\n\n> On Thu, 9 Dec 2021 at 09:29, Tomi Valkeinen wrote:\n> >\n> > Hi,\n> >\n> > Third RFC of the python bindings. I believe it's over a year since the\n> > last version, and I've been tinkering with the bindings every now and\n> > then.\n> >\n> > This version includes cam.py, which mimics 'cam' tool. The idea is not\n> > to try to replace 'cam', but to test the bindings in a real use case,\n> > rather than artificial tests.\n> >\n> > There are a few clear items that should be done to make this more\n> > usable:\n> >\n> > - Fix the ControlValue handling, as arrays are not handled at all.\n> >   Possibly other types are not handled correctly.\n> > - Add ControlList parameter to Camera.start()\n> > - Add Transform\n> >\n> >  Tomi\n> >\n> > Tomi Valkeinen (5):\n> >   HACK: Camera public destructor\n> >   libcamera: Request: expose Camera from Request\n> >   gitignore: add .cache\n> >   Add Python bindings\n> >   py: Add cam.py\n> >\n> >  .gitignore                  |   2 +\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/meson.build          |   1 +\n> >  src/py/pycamera/__init__.py |  10 +\n> >  src/py/pycamera/meson.build |  43 ++++\n> >  src/py/pycamera/pymain.cpp  | 424 ++++++++++++++++++++++++++++++++\n> >  src/py/test/cam.py          | 464 ++++++++++++++++++++++++++++++++++++\n> >  src/py/test/cam_kms.py      | 185 ++++++++++++++\n> >  src/py/test/cam_null.py     |  46 ++++\n> >  src/py/test/cam_qt.py       | 355 +++++++++++++++++++++++++++\n> >  src/py/test/cam_qtgl.py     | 385 ++++++++++++++++++++++++++++++\n> >  src/py/test/gl_helpers.py   |  67 ++++++\n> >  subprojects/pybind11.wrap   |  12 +\n> >  18 files changed, 2009 insertions(+), 1 deletion(-)\n> >  create mode 100644 src/py/meson.build\n> >  create mode 100644 src/py/pycamera/__init__.py\n> >  create mode 100644 src/py/pycamera/meson.build\n> >  create mode 100644 src/py/pycamera/pymain.cpp\n> >  create mode 100755 src/py/test/cam.py\n> >  create mode 100644 src/py/test/cam_kms.py\n> >  create mode 100644 src/py/test/cam_null.py\n> >  create mode 100644 src/py/test/cam_qt.py\n> >  create mode 100644 src/py/test/cam_qtgl.py\n> >  create mode 100644 src/py/test/gl_helpers.py\n> >  create mode 100644 subprojects/pybind11.wrap","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 125B0BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Dec 2021 16:45:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 521556086A;\n\tThu,  9 Dec 2021 17:45:14 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 31D50607DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Dec 2021 17:45:12 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 95052501;\n\tThu,  9 Dec 2021 17:45:11 +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=\"leiW9d8N\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1639068311;\n\tbh=TV5M4ItEQCYsWPu+4ynVVh/OgiIy6GpdQ/md2lJnSBQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=leiW9d8NEV5rAh1nxumVgw6IdiR1ISAVxVKKQgUsGszIIZSmqkCatzC2L64LmGK+J\n\tPd5iqDPaiFFGNjmY0G96fxyOEu3A9468sl7x4/UNFXncOAwASVJo+3NG7tZAgLF1DJ\n\tUVHlCaCO4sNuajCDtzUD3aFnco0pqEKKbLRiz5Ow=","Date":"Thu, 9 Dec 2021 18:44:42 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YbIyejUEDVrB5ksc@pendragon.ideasonboard.com>","References":"<20211209092906.37303-1-tomi.valkeinen@ideasonboard.com>\n\t<CAHW6GYKf7+V48-mgYawR6fLXFyDY1BF1tHKwR0r+CTykTq971Q@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYKf7+V48-mgYawR6fLXFyDY1BF1tHKwR0r+CTykTq971Q@mail.gmail.com>","Subject":"Re: [libcamera-devel] [RFC v3 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>"}},{"id":21739,"web_url":"https://patchwork.libcamera.org/comment/21739/","msgid":"<204f8c40-927a-afb1-3573-7904023910ff@ideasonboard.com>","date":"2021-12-10T12:16:40","subject":"Re: [libcamera-devel] [RFC v3 0/5] Python bindings","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 09/12/2021 18:44, Laurent Pinchart wrote:\n> Hello,\n> \n> On Thu, Dec 09, 2021 at 10:32:17AM +0000, David Plowman wrote:\n>> Hi Tomi, everyone\n>>\n>> Thanks for submitting this set, very pleased to see this moving again!\n>>\n>> I've actually been using these bindings extensively over the last\n>> several weeks, so we could add:\n>>\n>> Tested-by: David Plowman <david.plowman@raspberrypi.com>\n>>\n>> to all of them.\n>>\n>> A couple of points:\n>>\n>> * For my Picamera2 use cases (which are not remarkable) I had to add\n>> support for array controls, controls in the camera start() method, and\n>> an implementation of the transforms. I can submit those changes on top\n>> of this patch set at a later date, though they probably lack the\n>> requisite loveliness at the moment.\n>>\n>> * About the name \"pycamera\". Could we use \"pylibcamera\" instead? I\n>> worry that \"pycamera\" would cause more confusion with \"picamera\",\n>> which is of course our legacy stack Python library that Picamera2 is\n>> replacing.\n> \n> One always loves a naming discussion.\n> \n> Do we need the \"py\" prefix ? I would assume that a Python module can\n> safely be considered to be python-related, even with a \"py\" prefix :-)\n> We could then name the module \"libcamera\", \"camera\" or \"cam\" (the last\n> one may be a bit too short).\n\nThe binding generator currently builds \"pycamera.so\". I'm not sure if \ncreating a libcamera.so for both the libcamera library and the python \nbindings will create problems. The bindings .so won't be in any common \nlib directory, but I can imagine having interesting issues due to this.\n\nI can give it a try.\n\n  Tomi","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 88780BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Dec 2021 12:16:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2BE06087E;\n\tFri, 10 Dec 2021 13:16:44 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 92B6060868\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Dec 2021 13:16:43 +0100 (CET)","from [192.168.1.111] (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0F0CA93;\n\tFri, 10 Dec 2021 13:16:43 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"J6Y2jXRE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1639138603;\n\tbh=lYsOkK5v8Nk2cX8d7EyPBgF/IiVwFmOMI7tDINTyrSg=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=J6Y2jXREFdkdY5a6656/l0FyKvUGxtToe9OBsaS8TNltdS6XiXshZmTshQ48Vwm9T\n\ttO1xJiy2JDYcqXVUZg9ZTYMcO4mNsdQdb+dxjFykL8ES2apId2kMxjzRnutkCzGhYA\n\t23GBzzAOAeqX0lWU/8z3ZYaVzyR3W0MQbMoQP+m8=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>","References":"<20211209092906.37303-1-tomi.valkeinen@ideasonboard.com>\n\t<CAHW6GYKf7+V48-mgYawR6fLXFyDY1BF1tHKwR0r+CTykTq971Q@mail.gmail.com>\n\t<YbIyejUEDVrB5ksc@pendragon.ideasonboard.com>","From":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<204f8c40-927a-afb1-3573-7904023910ff@ideasonboard.com>","Date":"Fri, 10 Dec 2021 14:16:40 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.14.0","MIME-Version":"1.0","In-Reply-To":"<YbIyejUEDVrB5ksc@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [RFC v3 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>"}},{"id":21740,"web_url":"https://patchwork.libcamera.org/comment/21740/","msgid":"<YbNGRu7TTs6Dbnwc@pendragon.ideasonboard.com>","date":"2021-12-10T12:21:26","subject":"Re: [libcamera-devel] [RFC v3 0/5] Python bindings","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomi,\n\nOn Fri, Dec 10, 2021 at 02:16:40PM +0200, Tomi Valkeinen wrote:\n> On 09/12/2021 18:44, Laurent Pinchart wrote:\n> > On Thu, Dec 09, 2021 at 10:32:17AM +0000, David Plowman wrote:\n> >> Hi Tomi, everyone\n> >>\n> >> Thanks for submitting this set, very pleased to see this moving again!\n> >>\n> >> I've actually been using these bindings extensively over the last\n> >> several weeks, so we could add:\n> >>\n> >> Tested-by: David Plowman <david.plowman@raspberrypi.com>\n> >>\n> >> to all of them.\n> >>\n> >> A couple of points:\n> >>\n> >> * For my Picamera2 use cases (which are not remarkable) I had to add\n> >> support for array controls, controls in the camera start() method, and\n> >> an implementation of the transforms. I can submit those changes on top\n> >> of this patch set at a later date, though they probably lack the\n> >> requisite loveliness at the moment.\n> >>\n> >> * About the name \"pycamera\". Could we use \"pylibcamera\" instead? I\n> >> worry that \"pycamera\" would cause more confusion with \"picamera\",\n> >> which is of course our legacy stack Python library that Picamera2 is\n> >> replacing.\n> > \n> > One always loves a naming discussion.\n> > \n> > Do we need the \"py\" prefix ? I would assume that a Python module can\n> > safely be considered to be python-related, even with a \"py\" prefix :-)\n> > We could then name the module \"libcamera\", \"camera\" or \"cam\" (the last\n> > one may be a bit too short).\n> \n> The binding generator currently builds \"pycamera.so\". I'm not sure if \n> creating a libcamera.so for both the libcamera library and the python \n> bindings will create problems. The bindings .so won't be in any common \n> lib directory, but I can imagine having interesting issues due to this.\n\n\"pycamera.so\" sounds good to me, but as we have a __init__.py, maybe we\ncould store it in a \"camera\" directory, and import * from pycamera in\n__init__.py (or something similar) ? PEP8 also recommends\n\n\"When an extension module written in C or C++ has an accompanying Python\nmodule that provides a higher level (e.g. more object oriented)\ninterface, the C/C++ module has a leading underscore (e.g. _socket).\"\n\n(https://www.python.org/dev/peps/pep-0008/#package-and-module-names)\n\n> I can give it a try.","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 5C06DBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Dec 2021 12:21:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE27A60890;\n\tFri, 10 Dec 2021 13:21:58 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E6EDF60868\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Dec 2021 13:21:56 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4D8E7F84;\n\tFri, 10 Dec 2021 13:21:56 +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=\"QsB9B+kx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1639138916;\n\tbh=vTJNAgd71TjbQfCQj1Wiy6PtQBBbrxp8FLu6yhDTwNk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QsB9B+kx1tpMVEwkSBHurmMpl1Co7PeUzDCaEBFHLtafGu7CUaHFRd0pD+EPL7IBu\n\toFnPes9cSUylD6rQgSPluY8ThP0X0b8C6iCNo+1LEQ+d7bHWa/0IAhZPO5Tj0P6vXg\n\twD2ezEV0Z1oA+lhD62oV8zdJuPo8IQLE0ort3AOI=","Date":"Fri, 10 Dec 2021 14:21:26 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<YbNGRu7TTs6Dbnwc@pendragon.ideasonboard.com>","References":"<20211209092906.37303-1-tomi.valkeinen@ideasonboard.com>\n\t<CAHW6GYKf7+V48-mgYawR6fLXFyDY1BF1tHKwR0r+CTykTq971Q@mail.gmail.com>\n\t<YbIyejUEDVrB5ksc@pendragon.ideasonboard.com>\n\t<204f8c40-927a-afb1-3573-7904023910ff@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<204f8c40-927a-afb1-3573-7904023910ff@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC v3 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>"}}]