From patchwork Fri May 27 14:44:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16085 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7A12FC326E for ; Fri, 27 May 2022 14:45:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F3A656569D; Fri, 27 May 2022 16:45:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653662726; bh=toxqdvjDi4gk1YUfvMhAi3fdnpw79VdIr0qdXJMmdUs=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=rBbenwRz00L1p47UI23xJCgUcfVm/RPW8twJKhO5apfC329JrnEYA4eGXi1Qc7ord mpxqkmrc+HyBC/7lRqFV/zoWyi2WVAKJP3lDzJbx/9vVc5U84pVkQAbVgHyquoOzti cGaMwf9hy1E4hAUzAB9rfRRKKCncBMWPG93/OZkmKR7VnKeb9eCWIazLzlZvYmapUe 1Yp7heheh2RC1Yr1R9SQEXma2u09KIHMlnq4A7aLRaNf3cE/piY9/vERX+6jAubak4 cXAIPAyR4aMcFF3N7D7RSlUZmUfZWnQ50Bfn4y9rxYUdKEO1ekvcGK+p07PjbfPiLx uGsrk1jHPor1g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B2ECC65633 for ; Fri, 27 May 2022 16:45:11 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZfYb17pf"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 306BF1BCB; Fri, 27 May 2022 16:45:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653662711; bh=toxqdvjDi4gk1YUfvMhAi3fdnpw79VdIr0qdXJMmdUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZfYb17pfkg6O33L/zEAszaKTkmPPt1zCDmuTs1NV/XipYeIjAiV4zyp6BHOpO3AfN Vaql2Aq1P4Z/+h1N3voRVxDLhgJ5hzKzmKU5FeAqT7BOz+NXUmYDTzZgBswt1VQFub iDp7O3QKguUF/eLto/ck9QaEFVYVVYjMkhpexLGs= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 27 May 2022 17:44:31 +0300 Message-Id: <20220527144447.94891-15-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527144447.94891-1-tomi.valkeinen@ideasonboard.com> References: <20220527144447.94891-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 14/30] py: Rename 'efd' to 'event_fd' X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Perhaps it's better to have a more descriptive name here. I also considered just renaming 'efd' to 'fd', but 'event_fd' won. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- src/py/cam/cam_kms.py | 2 +- src/py/cam/cam_null.py | 2 +- src/py/cam/cam_qt.py | 2 +- src/py/cam/cam_qtgl.py | 2 +- src/py/libcamera/py_main.cpp | 2 +- test/py/unittests.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/py/cam/cam_kms.py b/src/py/cam/cam_kms.py index 213e0b03..49b00211 100644 --- a/src/py/cam/cam_kms.py +++ b/src/py/cam/cam_kms.py @@ -161,7 +161,7 @@ class KMSRenderer: sel = selectors.DefaultSelector() sel.register(self.card.fd, selectors.EVENT_READ, self.readdrm) - sel.register(self.cm.efd, selectors.EVENT_READ, self.readcam) + sel.register(self.cm.event_fd, selectors.EVENT_READ, self.readcam) sel.register(sys.stdin, selectors.EVENT_READ, self.readkey) print('Press enter to exit') diff --git a/src/py/cam/cam_null.py b/src/py/cam/cam_null.py index 45c5f467..40dbd266 100644 --- a/src/py/cam/cam_null.py +++ b/src/py/cam/cam_null.py @@ -23,7 +23,7 @@ class NullRenderer: self.running = True sel = selectors.DefaultSelector() - sel.register(self.cm.efd, selectors.EVENT_READ, self.readcam) + sel.register(self.cm.event_fd, selectors.EVENT_READ, self.readcam) sel.register(sys.stdin, selectors.EVENT_READ, self.readkey) print('Press enter to exit') diff --git a/src/py/cam/cam_qt.py b/src/py/cam/cam_qt.py index e2395c4b..c294c999 100644 --- a/src/py/cam/cam_qt.py +++ b/src/py/cam/cam_qt.py @@ -193,7 +193,7 @@ class QtRenderer: self.windows = windows def run(self): - camnotif = QtCore.QSocketNotifier(self.cm.efd, QtCore.QSocketNotifier.Read) + camnotif = QtCore.QSocketNotifier(self.cm.event_fd, QtCore.QSocketNotifier.Read) camnotif.activated.connect(lambda _: self.readcam()) keynotif = QtCore.QSocketNotifier(sys.stdin.fileno(), QtCore.QSocketNotifier.Read) diff --git a/src/py/cam/cam_qtgl.py b/src/py/cam/cam_qtgl.py index 5f7ccf1e..4b43f51d 100644 --- a/src/py/cam/cam_qtgl.py +++ b/src/py/cam/cam_qtgl.py @@ -142,7 +142,7 @@ class QtRenderer: self.window = window def run(self): - camnotif = QtCore.QSocketNotifier(self.state.cm.efd, QtCore.QSocketNotifier.Read) + camnotif = QtCore.QSocketNotifier(self.state.cm.event_fd, QtCore.QSocketNotifier.Read) camnotif.activated.connect(lambda _: self.readcam()) keynotif = QtCore.QSocketNotifier(sys.stdin.fileno(), QtCore.QSocketNotifier.Read) diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp index 4fb66866..f903f1d2 100644 --- a/src/py/libcamera/py_main.cpp +++ b/src/py/libcamera/py_main.cpp @@ -205,7 +205,7 @@ PYBIND11_MODULE(_libcamera, m) .def_property_readonly("version", &CameraManager::version) - .def_property_readonly("efd", [](CameraManager &) { + .def_property_readonly("event_fd", [](CameraManager &) { return gEventfd; }) diff --git a/test/py/unittests.py b/test/py/unittests.py index 8c445bc9..426efb06 100755 --- a/test/py/unittests.py +++ b/test/py/unittests.py @@ -269,7 +269,7 @@ class SimpleCaptureMethods(CameraTesterBase): gc.collect() sel = selectors.DefaultSelector() - sel.register(cm.efd, selectors.EVENT_READ) + sel.register(cm.event_fd, selectors.EVENT_READ) reqs = []