[libcamera-devel,v5,09/13] py: Drop get_ready_requests()
diff mbox series

Message ID 20230603075615.20663-10-tomi.valkeinen@ideasonboard.com
State New
Headers show
Series
  • py: New python bindings event handling
Related show

Commit Message

Tomi Valkeinen June 3, 2023, 7:56 a.m. UTC
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 <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 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(-)

Patch
diff mbox series

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<py::object> PyCameraManager::getReadyRequests()
-{
-	int ret = readFd();
-
-	if (ret == -EAGAIN)
-		return std::vector<py::object>();
-
-	if (ret != 0)
-		throw std::system_error(-ret, std::generic_category());
-
-	std::vector<py::object> 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<PyCameraEvent> 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<pybind11::object> getReadyRequests(); /* DEPRECATED */
 	std::vector<PyCameraEvent> getPyEvents();
 	std::vector<PyCameraEvent> getPyCameraEvents(std::shared_ptr<Camera> 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