From f7ddfd451775afd5f7c95771ce2a6b80b703836b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 21 Oct 2019 20:01:19 +0200 Subject: libcamera: camera: Remove explicit stream to buffer map in requestCompleted signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stream to buffer map in the requestCompleted signal is taken directly from the request which is part of the same signal. Remove the map as it can be fetched directly from the request. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/cam/capture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cam/capture.cpp') diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp index 0d7854d6..27332df1 100644 --- a/src/cam/capture.cpp +++ b/src/cam/capture.cpp @@ -133,11 +133,13 @@ int Capture::capture(EventLoop *loop) return ret; } -void Capture::requestComplete(Request *request, const std::map &buffers) +void Capture::requestComplete(Request *request) { if (request->status() == Request::RequestCancelled) return; + const std::map &buffers = request->buffers(); + std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); double fps = std::chrono::duration_cast(now - last_).count(); fps = last_ != std::chrono::steady_clock::time_point() && fps -- cgit v1.2.1