[libcamera-devel] [PATCH v5 09/13] py: Drop get_ready_requests()
Tomi Valkeinen
tomi.valkeinen at ideasonboard.com
Sat Jun 3 09:56:11 CEST 2023
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 at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at 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(-)
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
--
2.34.1
More information about the libcamera-devel
mailing list