From 210ce547a42ca559592efaef069648ddfe0d2945 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 27 May 2022 17:44:23 +0300 Subject: 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 Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/py/cam/cam.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/py/cam') diff --git a/src/py/cam/cam.py b/src/py/cam/cam.py index e2bc78da..66df18bf 100755 --- a/src/py/cam/cam.py +++ b/src/py/cam/cam.py @@ -9,7 +9,6 @@ import argparse import binascii import libcamera as libcam -import os import sys import traceback @@ -294,7 +293,7 @@ def event_handler(state): cm = state['cm'] contexts = state['contexts'] - os.read(cm.efd, 8) + cm.read_event() reqs = cm.get_ready_requests() -- cgit v1.2.1