mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
py: Add CameraManager.read_event()
Add CameraManager.read_event() so that the user does not need to call os.read(). We use eventfd, and we must always read 8 bytes. Hiding that inside read_event() makes sense. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
ccfcf5f235
commit
210ce547a4
3 changed files with 10 additions and 4 deletions
|
@ -7,7 +7,6 @@ from collections import defaultdict
|
|||
import errno
|
||||
import gc
|
||||
import libcamera as libcam
|
||||
import os
|
||||
import selectors
|
||||
import time
|
||||
import typing
|
||||
|
@ -278,7 +277,7 @@ class SimpleCaptureMethods(CameraTesterBase):
|
|||
while running:
|
||||
events = sel.select()
|
||||
for key, _ in events:
|
||||
os.read(key.fd, 8)
|
||||
cm.read_event()
|
||||
|
||||
ready_reqs = cm.get_ready_requests()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue