Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
RecordVideo.h
1#ifndef RECORDVIDEO_H
2#define RECORDVIDEO_H
3
4#include <QObject>
5#include <QImage>
6#include <QThread>
7#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
8 #include <QMediaCaptureSession>
9 #include <QMediaRecorder>
10 #include <QVideoFrameInput>
11 #include <QAudioBufferInput>
12 #include "ParameterRecord.h"
13#endif
14
15#include "FrmViewer.h"
16#include "client_export.h"
17
28class CLIENT_EXPORT CRecordVideoThread : public QThread
29{
30 Q_OBJECT
31public:
32 explicit CRecordVideoThread();
33
34 int SetFile(const QString& szFile);
35
36Q_SIGNALS:
37 void sigUpdate(QImage img);
38 void sigStatusChanged(CFrmViewer::RecordVideoStatus status);
39 void sigError(int nRet, QString szText);
40
41protected:
42 virtual void run() override;
43private:
44 QString m_szFile;
45};
46
50class CLIENT_EXPORT CRecordVideo : public QObject
51{
52 Q_OBJECT
53public:
54 explicit CRecordVideo(QObject *parent = nullptr);
55
56public Q_SLOTS:
57 int Start(const QString& szFile);
58 int Stop();
59 void slotUpdate(QImage img);
60
61Q_SIGNALS:
62 void sigStatusChanged(CFrmViewer::RecordVideoStatus status);
63 void sigError(int nRet, QString szText);
64
65private:
66#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
67 QMediaCaptureSession m_CaptureSession;
68 QMediaRecorder m_Recorder;
69 QVideoFrameInput m_VideoFrameInput;
70 QAudioBufferInput m_AudioBufferInput;
71 CParameterRecord m_Parameter;
72#endif
73};
74
75#endif // RECORDVIDEO_H
Record video thread.
Definition RecordVideo.h:29
Record video to file.
Definition RecordVideo.h:51