5#include <QtQml/qqmlregistration.h>
7#include <qquickimageprovider.h>
11#include <QCameraDevice>
12#include <QMediaCaptureSession>
13#include <QMediaDevices>
15#include <condition_variable>
19#include <esterv/utils/qrcode_dec.hpp>
21#if defined(QTQRDEC_SHARED)
22#include <QtCore/QtGlobal>
24#define DEC_EXPORT Q_DECL_EXPORT
26#define DEC_EXPORT Q_DECL_IMPORT
35 Q_PROPERTY(
QString source READ get_source NOTIFY sourceChanged)
36 Q_PROPERTY(
bool useTorch MEMBER m_useTorch NOTIFY useTorchChanged)
37 Q_PROPERTY(
bool hasTorch MEMBER m_hasTorch NOTIFY hasTorchChanged)
47 m_decode_running =
false;
49 m_decoding_variable.notify_one();
55 enum State { Decoding = 0, Ready };
56 Q_INVOKABLE
void start();
57 Q_INVOKABLE
void stop();
58 Q_INVOKABLE
void clear();
61 void reload(
int offset,
int width,
int height);
65 void hasTorchChanged();
66 void useTorchChanged();
72 bool m_decode_running{
true};
74 QCamera *m_camera{
nullptr};
75 QMediaCaptureSession *captureSession;
76 QVideoSink *videoSink;
83 bool m_useTorch{
false}, m_hasTorch{
false};
92 const QSize &requestedSize)
override;
93 static void restart(
void);
Definition qr_image_decoder.hpp:33
State
Definition qr_image_decoder.hpp:55
QString get_source(void) const
Definition qr_image_decoder.hpp:59
static QRImageDecoder * create(QQmlEngine *qmlEngine, QJSEngine *jsEngine)
Definition qr_image_decoder.hpp:52
Definition qr_image_decoder.hpp:86
WasmImageProvider()
Definition qr_image_decoder.hpp:88
static QImage img
Definition qr_image_decoder.hpp:94
double start
Definition core_c.h:1381
void * parent
Definition core_c.h:1913
CvSize size
Definition core_c.h:112
CvArr CvPoint offset
Definition imgproc_c.h:88
Definition qrcode_dec.hpp:5