From 02eae70e15bdbb24a6a4eec74313d6ef616188bc Mon Sep 17 00:00:00 2001 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Date: Sun, 8 Nov 2020 02:01:23 +0200 Subject: cam: Move request processing to main thread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The request completion handler is invoked in the camera manager thread, which shouldn't be blocked for large amounts of time. As writing the frames to disk can be a time-consuming process, move request processing to the main thread by queueing an event to the event loop. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> --- src/cam/capture.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cam/capture.h') diff --git a/src/cam/capture.h b/src/cam/capture.h index 45e5e8a9..d21c95a2 100644 --- a/src/cam/capture.h +++ b/src/cam/capture.h @@ -33,6 +33,7 @@ private: int capture(libcamera::FrameBufferAllocator *allocator); void requestComplete(libcamera::Request *request); + void processRequest(libcamera::Request *request); std::shared_ptr<libcamera::Camera> camera_; libcamera::CameraConfiguration *config_; -- cgit v1.2.1