From patchwork Sat Jun 3 07:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 18694 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 D21C1C32AD for ; Sat, 3 Jun 2023 07:57:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 84A4962885; Sat, 3 Jun 2023 09:57:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1685779040; bh=wYbL/tGfOiTWpYkSunmxUHnRx/GsiUaGPhOYCs/HAqE=; 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=Y4z2bgn3J/u76w0LvAd88INAFPP4GhGjqO6ceVv9wB7MknzREwtXkh7JhoIt4HCvp hHnsd4TEYfJGVXEc53BgEUyKdVuUed299F3tKcWm0FbcM9iBu740oY1E/q29i040cI LraewgasQMoxtSl3cB0V4u387vXCbEkfE3IN/EPCEF67edpcsCXOBNdovbb4V6Tmzp 9YH4g08lfsu/T3M/JvpNHqBRL/3OWbqG62RaCU+Q5LFV6xtvbUazZFX/w3oTdrSugp tqRJJsJc7tPwBZZjhDi/iSaf2q3lb/gPJFIkeLNPDi3vUNmJ3lZWTzdG9xcU3PjY5i sT6xhVC7EVSrA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 602DF6287E for ; Sat, 3 Jun 2023 09:57:14 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cGuuQZ8+"; dkim-atps=neutral Received: from desky.lan (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DC363B2A; Sat, 3 Jun 2023 09:56:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1685779011; bh=wYbL/tGfOiTWpYkSunmxUHnRx/GsiUaGPhOYCs/HAqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cGuuQZ8+oNmgguFklf07FH8VUC+tBN9bM4+lQFscy4VttjWy7CaKB99Ht78f5s43v dPdJ5HMvWFABsJ3WOHXwp/1h+tX7qvznFETFpGMmSqv0GC4ZfUFsbRZAu4RSswnsBt pFr+OOciFwKwXLDk3MBg2Z40iVZrMhzu/AK82ZZU= To: libcamera-devel@lists.libcamera.org Date: Sat, 3 Jun 2023 10:56:11 +0300 Message-Id: <20230603075615.20663-10-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230603075615.20663-1-tomi.valkeinen@ideasonboard.com> References: <20230603075615.20663-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 09/13] 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 83c2b063..4f3a59a3 100644 --- a/src/py/libcamera/py_camera_manager.cpp +++ b/src/py/libcamera/py_camera_manager.cpp @@ -110,30 +110,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 31747547..46121a78 100644 --- a/src/py/libcamera/py_camera_manager.h +++ b/src/py/libcamera/py_camera_manager.h @@ -70,7 +70,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 981a3070..bc40849a 100644 --- a/src/py/libcamera/py_main.cpp +++ b/src/py/libcamera/py_main.cpp @@ -170,9 +170,6 @@ PYBIND11_MODULE(_libcamera, m) .def_property_readonly("event_fd", &PyCameraManager::eventFd) - /* DEPRECATED */ - .def("get_ready_requests", &PyCameraManager::getReadyRequests) - .def("get_events", &PyCameraManager::getPyEvents); pyCamera