summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam/viewfinder.h')
-rw-r--r--src/qcam/viewfinder.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h
index ef5fd45b..2ba28b60 100644
--- a/src/qcam/viewfinder.h
+++ b/src/qcam/viewfinder.h
@@ -7,6 +7,7 @@
#ifndef __QCAM_VIEWFINDER_H__
#define __QCAM_VIEWFINDER_H__
+#include <QMutex>
#include <QWidget>
#include "format_converter.h"
@@ -23,6 +24,8 @@ public:
unsigned int height);
void display(const unsigned char *rgb, size_t size);
+ QImage getCurrentImage();
+
protected:
void paintEvent(QPaintEvent *) override;
QSize sizeHint() const override;
@@ -33,7 +36,9 @@ private:
unsigned int height_;
FormatConverter converter_;
+
QImage *image_;
+ QMutex mutex_; /* Prevent concurrent access to image_ */
};
#endif /* __QCAM_VIEWFINDER__ */