summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-02 21:45:21 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-03 04:32:46 +0300
commit585252eae349ab2871c95a4e37c1e573d0d0d0a3 (patch)
treed897ab71743657d38eb140c1b64e1a198241369e /src/qcam/main_window.h
parent3d42c67aab49be609d871dc6980537557c0a7fe1 (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.h')
-rw-r--r--src/qcam/main_window.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index 295ecc53..59fa2d98 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -20,6 +20,7 @@
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/camera_manager.h>
+#include <libcamera/controls.h>
#include <libcamera/framebuffer_allocator.h>
#include <libcamera/stream.h>
@@ -37,6 +38,23 @@ enum {
OptStream = 's',
};
+class CaptureRequest
+{
+public:
+ CaptureRequest()
+ {
+ }
+
+ CaptureRequest(const std::map<Stream *, FrameBuffer *> &buffers,
+ const ControlList &metadata)
+ : buffers_(buffers), metadata_(metadata)
+ {
+ }
+
+ std::map<Stream *, FrameBuffer *> buffers_;
+ ControlList metadata_;
+};
+
class MainWindow : public QMainWindow
{
Q_OBJECT
@@ -56,7 +74,7 @@ private Q_SLOTS:
void saveImageAs();
void captureRaw();
- void processRaw(FrameBuffer *buffer);
+ void processRaw(FrameBuffer *buffer, const ControlList &metadata);
void queueRequest(FrameBuffer *buffer);
@@ -103,7 +121,7 @@ private:
Stream *vfStream_;
Stream *rawStream_;
std::map<Stream *, QQueue<FrameBuffer *>> freeBuffers_;
- QQueue<std::map<Stream *, FrameBuffer *>> doneQueue_;
+ QQueue<CaptureRequest> doneQueue_;
QMutex mutex_; /* Protects freeBuffers_ and doneQueue_ */
uint64_t lastBufferTime_;