diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-05-02 21:45:21 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-05-03 04:32:46 +0300 |
commit | 585252eae349ab2871c95a4e37c1e573d0d0d0a3 (patch) | |
tree | d897ab71743657d38eb140c1b64e1a198241369e /src/qcam/main_window.cpp | |
parent | 3d42c67aab49be609d871dc6980537557c0a7fe1 (diff) |
qcam: Pass request metadata to DNG writer
The DNG writer will use the metadata to populate DNG tags.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r-- | src/qcam/main_window.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 8720c6c6..7de08957 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -549,7 +549,7 @@ void MainWindow::captureRaw() captureRaw_ = true; } -void MainWindow::processRaw(FrameBuffer *buffer) +void MainWindow::processRaw(FrameBuffer *buffer, const ControlList &metadata) { #ifdef HAVE_DNG QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); @@ -559,7 +559,7 @@ void MainWindow::processRaw(FrameBuffer *buffer) if (!filename.isEmpty()) { const MappedBuffer &mapped = mappedBuffers_[buffer]; DNGWriter::write(filename.toStdString().c_str(), camera_.get(), - rawStream_->configuration(), buffer, + rawStream_->configuration(), metadata, buffer, mapped.memory); } #endif @@ -586,7 +586,7 @@ void MainWindow::requestComplete(Request *request) */ { QMutexLocker locker(&mutex_); - doneQueue_.enqueue(request->buffers()); + doneQueue_.enqueue({ request->buffers(), request->metadata() }); } QCoreApplication::postEvent(this, new CaptureEvent); @@ -599,22 +599,22 @@ void MainWindow::processCapture() * if stopCapture() has been called while a CaptureEvent was posted but * not processed yet. Return immediately in that case. */ - std::map<Stream *, FrameBuffer *> buffers; + CaptureRequest request; { QMutexLocker locker(&mutex_); if (doneQueue_.isEmpty()) return; - buffers = doneQueue_.dequeue(); + request = doneQueue_.dequeue(); } /* Process buffers. */ - if (buffers.count(vfStream_)) - processViewfinder(buffers[vfStream_]); + if (request.buffers_.count(vfStream_)) + processViewfinder(request.buffers_[vfStream_]); - if (buffers.count(rawStream_)) - processRaw(buffers[rawStream_]); + if (request.buffers_.count(rawStream_)) + processRaw(request.buffers_[rawStream_], request.metadata_); } void MainWindow::processViewfinder(FrameBuffer *buffer) |