From patchwork Thu Mar 9 14:25:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 18369 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 EFB26C32A0 for ; Thu, 9 Mar 2023 14:26:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 88282626F7; Thu, 9 Mar 2023 15:26:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1678371986; bh=/JddElKh6X9ITcfC6NJ0RVE/Z/A8GC7PA2q4w37zG88=; 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=LBNhgORObVRrBpPMQ/tEQ2oFM/Jw+uaQCVreybZWJD/ZrCXQXOOvalAL8tuZU4V4Y dzAhU6tX8xRllP/O1tvkWlDnS2UJ+ZTpywGzFDAEmJIk0K2r5+iYpEjsgp/Wi0Opmm ZTATgM8fAcjzIcZP+qkhpyMynhIcrVmbiL4MdeQnxQJwzaxGxe6sRaYPzcAMB2E6ye qSf78lNBh1G8mDG3LVDrg8ABaOxLOX4DvLbRHEGj4S17gpyi5g5rn4pkXqX5DExR6K P/sqdbmuA0YqL4WmQsbW1PB2C1AQ64KD08SdiwyYpziaJtymds+E986g8wvgACq0Ny kK2qOq4qNnjvA== 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 B3C3A626E7 for ; Thu, 9 Mar 2023 15:26:19 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wiky06JM"; dkim-atps=neutral Received: from desky.lan (91-154-32-225.elisa-laajakaista.fi [91.154.32.225]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4B6668B1; Thu, 9 Mar 2023 15:26:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1678371979; bh=/JddElKh6X9ITcfC6NJ0RVE/Z/A8GC7PA2q4w37zG88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wiky06JM/2502k+Cw53z7FqMHxPLTdnFOHqpcR64P5etxzXzK3FI4zcYmS05oxqyM QA424XVZe0BYWWSfSFQqABy2Ja8xCYxxCXEdMt9B4kQQqeJQowFTdxUDinwBi3cMEH tWDaTBAMkGnlWPxIi+BSe+ztgYj/hQN0BbJWEIxg= To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Mar 2023 16:25:54 +0200 Message-Id: <20230309142601.70556-9-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309142601.70556-1-tomi.valkeinen@ideasonboard.com> References: <20230309142601.70556-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 08/15] py: Drop get_ready_requests() 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" get_ready_requests() is deprecated, and the Python code in libcamera has been converted to the new event system, so we can drop get_ready_requests(). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- src/py/libcamera/py_camera_manager.cpp | 24 ------------------------ src/py/libcamera/py_camera_manager.h | 1 - src/py/libcamera/py_main.cpp | 3 --- 3 files changed, 28 deletions(-) diff --git a/src/py/libcamera/py_camera_manager.cpp b/src/py/libcamera/py_camera_manager.cpp index 7d6dded4..c3b9646f 100644 --- a/src/py/libcamera/py_camera_manager.cpp +++ b/src/py/libcamera/py_camera_manager.cpp @@ -103,30 +103,6 @@ PyCameraEvent PyCameraManager::convertEvent(const CameraEvent &event) return pyevent; } -/* DEPRECATED */ -std::vector PyCameraManager::getReadyRequests() -{ - int ret = readFd(); - - if (ret == -EAGAIN) - return std::vector(); - - if (ret != 0) - throw std::system_error(-ret, std::generic_category()); - - std::vector py_reqs; - - for (const auto &ev : getEvents()) { - if (ev.type_ != CameraEventType::RequestCompleted) - continue; - - PyCameraEvent pyev = convertEvent(ev); - py_reqs.push_back(pyev.request_); - } - - return py_reqs; -} - std::vector PyCameraManager::getPyEvents() { int ret = readFd(); diff --git a/src/py/libcamera/py_camera_manager.h b/src/py/libcamera/py_camera_manager.h index 757f6d8e..648d78af 100644 --- a/src/py/libcamera/py_camera_manager.h +++ b/src/py/libcamera/py_camera_manager.h @@ -68,7 +68,6 @@ public: int eventFd() const { return eventFd_.get(); } - std::vector getReadyRequests(); /* DEPRECATED */ std::vector getPyEvents(); std::vector getPyCameraEvents(std::shared_ptr camera); diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp index 0fffc030..1069fd9c 100644 --- a/src/py/libcamera/py_main.cpp +++ b/src/py/libcamera/py_main.cpp @@ -126,9 +126,6 @@ PYBIND11_MODULE(_libcamera, m) .def_property_readonly("event_fd", &PyCameraManager::eventFd) - /* DEPRECATED */ - .def("get_ready_requests", &PyCameraManager::getReadyRequests) - .def("get_events", &PyCameraManager::getPyEvents) .def_readwrite("buffer_completed_active", &PyCameraManager::bufferCompletedEventActive_);