[{"id":23655,"web_url":"https://patchwork.libcamera.org/comment/23655/","msgid":"<975a01d5-8da3-43a3-e69e-ec088d2c5a0b@ideasonboard.com>","date":"2022-06-29T07:18:30","subject":"Re: [libcamera-devel] [PATCH v2 00/14] Python bindings event\n\thandling","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 29/06/2022 10:04, Tomi Valkeinen wrote:\n> Hi,\n> \n> v2 of the event handling series. Plenty of changes to v1:\n> \n> - (Hopefully) most of the review comments addressed\n> - PyCameraManager no longer inherits CameraManager. This also fixes the\n>    camera added/removed events.\n> - 7 new patches\n> - API CHANGE: The eventfd is now always non-blocking. This causes an API\n>    change only if you relied on the blocking read.\n> - API CHANGE: many of the methods exposed to Python no longer return an\n>    error code, but raise an exception on error.\n> \n> The patches up to and including \"py: Switch to non-blocking eventfd\" can\n> be considered for merging.\n> \n> The new event handling still needs more thought, I believe. I'm still\n> not sure if we should go with the dispatching method implemented now, or\n> instead returning a list of events which the user needs to process (a\n> bit more like what we have now with the get_ready_requests). I'm also\n> not quite sure how to go with the camera.stop(), but there's an attempt\n> to solve that in this series.\n\nOne more thing about the camera.stop(). I considered implementing the \nfeature on top of the of the current get_ready_request, without the new \nevent handling, so that we could get it merged before the new event \nhandling. But that has a few issues/questions:\n\n- I'd need to rewrite the request handling somewhat, as currently we \nonly store the Request, and we don't know for which camera it is. This \nchange wouldn't be a difficult change, but it would be dropped when we \nmove to the new event handling.\n\n- A similar question to the camera.stop() with the new event handling: \nwhat should it do? 1) Discard Request related events for that camera 2) \nReturn the Requests for that camera 3) Return all requests (similar to \nget_ready_requests)\n\n- If the camera.stop() would return Requests, moving to the new event \nhandling would change the API for camera.stop().\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 A0D65BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jun 2022 07:18:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CDD4F65635;\n\tWed, 29 Jun 2022 09:18:35 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E8A560552\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 09:18:34 +0200 (CEST)","from [192.168.1.111] (91-158-154-79.elisa-laajakaista.fi\n\t[91.158.154.79])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7651A6D1;\n\tWed, 29 Jun 2022 09:18:33 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656487115;\n\tbh=qfL083x0UqQxeFlKV2wT7On/Jo6hV7diHjgtJ33GUJc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=v/kx3+Fb7cBm/NF994ookbrk/EIUamTccm3iI+hziol615xXo5c1mdDO9Re5V7tOQ\n\tuhqBKvrxmX2dBUcfem7O2eOrH43JajxM932bWQaCp5Q3htmf0xTeCTgo7H7KzduAUZ\n\truZtoqlmgyzO02Ke6fXSigsWs1zkIokWjHacMmPYHGY+kOn5bVmi9Boe0/l65MT/bK\n\tVCrMN4J2Z5wzCf+M/xqlIEDkUG2z/PHV+fE7cnaD/DVAA5ZH0POogndwUbp/L9IJ2Y\n\tYPakcIIKXL/c1DVqXJP9O+0lgVfpXU9MQbWsqPsIEb2eh5uzB4DJ/YbdMvNCy2GKva\n\tDzh4K6AichKHA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656487113;\n\tbh=qfL083x0UqQxeFlKV2wT7On/Jo6hV7diHjgtJ33GUJc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=TTDCMc58Wdnccb7gflvvD4ZW/TQ2lLWz9ee60XrNZ/FvbsUxuc0LpPBQ74QjCiACm\n\ttciFlAPRrdfl32XxdJYvgSZlLonTEVZ2WFqpZ1tTCY6HeXs41a7taYFMtHIcumwney\n\ttrHF7NRmcgLP+U/Xb833b1brVS8wAaIwXXof6+Uc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"TTDCMc58\"; dkim-atps=neutral","Message-ID":"<975a01d5-8da3-43a3-e69e-ec088d2c5a0b@ideasonboard.com>","Date":"Wed, 29 Jun 2022 10:18:30 +0300","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.9.1","Content-Language":"en-US","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>","References":"<20220629070416.17550-1-tomi.valkeinen@ideasonboard.com>","In-Reply-To":"<20220629070416.17550-1-tomi.valkeinen@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 00/14] Python bindings event\n\thandling","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>"}}]