{"id":16338,"url":"https://patchwork.libcamera.org/api/covers/16338/?format=json","web_url":"https://patchwork.libcamera.org/cover/16338/","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":"<20220623144736.78537-1-tomi.valkeinen@ideasonboard.com>","date":"2022-06-23T14:47:29","name":"[libcamera-devel,RFC,v1,0/7] Python bindings event handling","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/16338/mbox/","series":[{"id":3213,"url":"https://patchwork.libcamera.org/api/series/3213/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3213","date":"2022-06-23T14:47:29","name":"Python bindings event handling","version":1,"mbox":"https://patchwork.libcamera.org/series/3213/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/16338/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 1CA1EBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Jun 2022 14:48:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F3F8865639;\n\tThu, 23 Jun 2022 16:47:58 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AF2946048F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Jun 2022 16:47:57 +0200 (CEST)","from deskari.lan (91-158-154-79.elisa-laajakaista.fi\n\t[91.158.154.79])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CCB4DDD;\n\tThu, 23 Jun 2022 16:47:56 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655995679;\n\tbh=OK6IYaKsFRxMm45tCAn88BqF6id59nAT/w9tKUEZGR4=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=E4D37iMXeOmtk9tUKf0gOkEnbyLvzkGCPidaKuT8PA+X7pHLE0kfcU/5vZhsSmtt0\n\tUbUtkMknphZiuD0A70uxKag5Uin8k8cHlimKb2f3vpkb9willG7icfvFmJv8kLsbzr\n\toDo9LuKJMAO8HpXyr6HMaLhhNw9ss2V7AHsQWYkPsNr3iaFEjKWJZQWQGrMSgOMZfD\n\t6QK1j7emzBafId3AtejAPc58x9UVnLKHLkE8gnZgmwAOUgMt2kLMptxpsWsjoKpMM3\n\tz6jGc32hag5wI0k+PyA86v2D/mQSEPWYXRkPS6ajp8dIdxTBnGR6wRB2ODDzwFwv4+\n\tloADgay+30Xgw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1655995677;\n\tbh=OK6IYaKsFRxMm45tCAn88BqF6id59nAT/w9tKUEZGR4=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=KaAQ2TWrFXENcqCgudL2NWda7lwoqMg1bqv7kB8Qu+3bWMmfD2rEeQ16n85yV5lp3\n\tQlF/lP/YBaDI6uZGiI9GDdOnIr6ASPAR6VO+TzOvPm6g7CCmkmqxjdYT6VPqojqGLO\n\tH5L5/Mw1qvJXa86JxI+gx+bD/ew2UWLB27LVc02Y="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"KaAQ2TWr\"; dkim-atps=neutral","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>,\n\tJacopo Mondi <jacopo@jmondi.org>","Date":"Thu, 23 Jun 2022 17:47:29 +0300","Message-Id":"<20220623144736.78537-1-tomi.valkeinen@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC v1 0/7] Python bindings event handling","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>","From":"Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi,\n\nI've been working on enabling the rest of the events for the Python\nbindings.\n\nThis is an RFC, as it's not quite ready yet, but I wanted to post this\nbefore the long weekend to possibly get feedback on the approach.\n\nThere is one bug with the series: for some reason the camera\nadded/removed events do not work. I was unable to get the Signals\nproperly connected to a lambda or a method, although connecting to a\nstatic function works. It compiles but the handler is never called, and\nmy tests seg fault at exit.\n\nAnd this needs documentation...\n\n Tomi\n\nTomi Valkeinen (7):\n  py: cam.py: Fix multi camera capture without -C\n  py: Add Python logging category\n  py: Move ControlValue helpers to py_helpers.cpp\n  py: Create PyCameraManager\n  py: Add 'nonblocking' argument to get_ready_requests()\n  py: New event handling\n  py: cam.py: Use new events support\n\n src/py/cam/cam.py                      |  33 ++-\n src/py/libcamera/meson.build           |   2 +\n src/py/libcamera/py_camera_manager.cpp | 393 +++++++++++++++++++++++++\n src/py/libcamera/py_camera_manager.h   |  74 +++++\n src/py/libcamera/py_helpers.cpp        |  98 ++++++\n src/py/libcamera/py_helpers.h          |  13 +\n src/py/libcamera/py_main.cpp           | 283 +++++++-----------\n src/py/libcamera/py_main.h             |  12 +\n 8 files changed, 730 insertions(+), 178 deletions(-)\n create mode 100644 src/py/libcamera/py_camera_manager.cpp\n create mode 100644 src/py/libcamera/py_camera_manager.h\n create mode 100644 src/py/libcamera/py_helpers.cpp\n create mode 100644 src/py/libcamera/py_helpers.h\n create mode 100644 src/py/libcamera/py_main.h"}