diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-10-21 20:01:19 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-11-19 18:30:26 +0100 |
commit | f7ddfd451775afd5f7c95771ce2a6b80b703836b (patch) | |
tree | 714afe072f5e5509e35920742813c4b71128983a /src/cam | |
parent | 40888cfdcee71b0f8daab96a0bfdda7302be02ae (diff) |
libcamera: camera: Remove explicit stream to buffer map in requestCompleted signal
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 <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam')
-rw-r--r-- | src/cam/capture.cpp | 4 | ||||
-rw-r--r-- | src/cam/capture.h | 3 |
2 files changed, 4 insertions, 3 deletions
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<Stream *, Buffer *> &buffers) +void Capture::requestComplete(Request *request) { if (request->status() == Request::RequestCancelled) return; + const std::map<Stream *, Buffer *> &buffers = request->buffers(); + std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); double fps = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_).count(); fps = last_ != std::chrono::steady_clock::time_point() && fps diff --git a/src/cam/capture.h b/src/cam/capture.h index ee0dc421..4d396afb 100644 --- a/src/cam/capture.h +++ b/src/cam/capture.h @@ -28,8 +28,7 @@ public: private: int capture(EventLoop *loop); - void requestComplete(libcamera::Request *request, - const std::map<libcamera::Stream *, libcamera::Buffer *> &buffers); + void requestComplete(libcamera::Request *request); libcamera::Camera *camera_; libcamera::CameraConfiguration *config_; |