[libcamera-devel] [RFC v1 6/7] py: New event handling

Tomi Valkeinen tomi.valkeinen at ideasonboard.com
Thu Jun 30 10:42:13 CEST 2022


On 30/06/2022 11:28, Laurent Pinchart wrote:
> Hi Tomi,
> 
> On Mon, Jun 27, 2022 at 05:40:13PM +0300, Tomi Valkeinen wrote:
>> On 24/06/2022 17:44, Laurent Pinchart wrote:
>>> On Fri, Jun 24, 2022 at 11:53:43AM +0100, Kieran Bingham wrote:
>>>> Quoting Tomi Valkeinen (2022-06-23 15:47:35)
>>>>> At the moment the Python bindings only handle the requestCompleted
>>>>> events. But we have others, bufferCompleted and disconnec from the
>>>>
>>>> disconnec/disconnect
>>>>
>>>>> Camera, and cameraAdded and cameraRemoved from the CameraManager.
>>>>>
>>>>> This makes all those events available to the users.
>>>>
>>>> \o/
>>>>
>>>>> The get_ready_requests() method is now deprecated, but available to keep
>>>>> backward compatibility.
>>>
>>> I'd rather drop it. We're nowhere close to guaranteeing any API in the
>>> Python bindings.
>>
>> It's nice to keep the existing py scripts working. I can drop it
>> eventually, but as it's so trivial (at least so far) to keep it, I'd
>> rather have it.
> 
> I'm OK with that if it can help with the transition to the new API, but
> I'd like to drop legacy code sooner than later. How long do you expect
> to keep this ?

I'll convert the examples etc. in libcamera repository (note that this 
series so far only converts cam.py), which will be trivial, but 
picamera2 may be more difficult. So I'd say David can decide. Probably 
we can drop it quite soon after picamera2 uses it.

However, as I'm still not sure if the new event handling API is good 
enough, and shouldn't be merged, the get_ready_requests is not 
deprecated yet.

  Tomi


More information about the libcamera-devel mailing list