diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-08-11 00:56:13 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-08-14 13:19:15 +0200 |
commit | dac8e9552ccdff137e717270468e584c2a9895b9 (patch) | |
tree | 467e192ac4272d2e407d11192e40715040aacf53 /src | |
parent | 02018a7d0222cefe8e6587deebe607917e20e2a1 (diff) |
libcamera: request: Declare a using directive for map of buffers
Declare a using directive for the map of Stream to FrameBuffer. Update
all users of Request::buffers() to use the new usage directive.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/android/camera_device.cpp | 2 | ||||
-rw-r--r-- | src/cam/capture.cpp | 2 | ||||
-rw-r--r-- | src/libcamera/request.cpp | 5 | ||||
-rw-r--r-- | src/qcam/main_window.h | 4 |
4 files changed, 9 insertions, 4 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index d9183501..3419236a 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1371,7 +1371,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques void CameraDevice::requestComplete(Request *request) { - const std::map<Stream *, FrameBuffer *> &buffers = request->buffers(); + const Request::BufferMap &buffers = request->buffers(); camera3_buffer_status status = CAMERA3_BUFFER_STATUS_OK; std::unique_ptr<CameraMetadata> resultMetadata; Camera3RequestDescriptor *descriptor = diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp index 3d8e89d5..07203769 100644 --- a/src/cam/capture.cpp +++ b/src/cam/capture.cpp @@ -157,7 +157,7 @@ void Capture::requestComplete(Request *request) if (request->status() == Request::RequestCancelled) return; - const std::map<Stream *, FrameBuffer *> &buffers = request->buffers(); + const Request::BufferMap &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(); diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index f3753514..d5f11e8c 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -38,6 +38,11 @@ LOG_DEFINE_CATEGORY(Request) */ /** + * \typedef Request::BufferMap + * \brief A map of Stream to FrameBuffer pointers + */ + +/** * \class Request * \brief A frame capture request * diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h index 4606fe48..6e1bcd76 100644 --- a/src/qcam/main_window.h +++ b/src/qcam/main_window.h @@ -47,13 +47,13 @@ public: { } - CaptureRequest(const std::map<Stream *, FrameBuffer *> &buffers, + CaptureRequest(const Request::BufferMap &buffers, const ControlList &metadata) : buffers_(buffers), metadata_(metadata) { } - std::map<Stream *, FrameBuffer *> buffers_; + Request::BufferMap buffers_; ControlList metadata_; }; |