summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-29 17:54:48 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-05-02 14:44:25 +0200
commit55d5e3e59f48ed251da5953657570c2f7c50a553 (patch)
treefc3dc59a6c0552086aab82c8e441b422e1a51fea /src/qcam/main_window.h
parent58889181538a4458ba3b012f1c69a98138447a2e (diff)
qcam: Allow for a second raw stream to be configured
Allow a second stream to be configured for raw capture. This change only adds support for configuring and allocating buffers for the second stream. Later changes are needed to queue the allocated buffers to the camera when the user wishes to capture a raw frame. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.h')
-rw-r--r--src/qcam/main_window.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index aea1f1de..4856ecc1 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -69,6 +69,7 @@ private:
void requestComplete(Request *request);
void processCapture();
+ void processViewfinder(FrameBuffer *buffer);
/* UI elements */
QToolBar *toolbar_;
@@ -95,8 +96,11 @@ private:
/* Capture state, buffers queue and statistics */
bool isCapturing_;
- QQueue<FrameBuffer *> doneQueue_;
- QMutex mutex_; /* Protects doneQueue_ */
+ Stream *vfStream_;
+ Stream *rawStream_;
+ std::map<Stream *, QQueue<FrameBuffer *>> freeBuffers_;
+ QQueue<std::map<Stream *, FrameBuffer *>> doneQueue_;
+ QMutex mutex_; /* Protects freeBuffers_ and doneQueue_ */
uint64_t lastBufferTime_;
QElapsedTimer frameRateInterval_;