summaryrefslogtreecommitdiff
path: root/src/cam/capture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/capture.cpp')
-rw-r--r--src/cam/capture.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp
index 7580f798..113ea49d 100644
--- a/src/cam/capture.cpp
+++ b/src/cam/capture.cpp
@@ -157,6 +157,15 @@ void Capture::requestComplete(Request *request)
if (request->status() == Request::RequestCancelled)
return;
+ /*
+ * Defer processing of the completed request to the event loop, to avoid
+ * blocking the camera manager thread.
+ */
+ loop_->callLater([=]() { processRequest(request); });
+}
+
+void Capture::processRequest(Request *request)
+{
const Request::BufferMap &buffers = request->buffers();
/*