-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
executable file
·51 lines (41 loc) · 1.14 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QAudioDevice>
#include <QCameraDevice>
#include <QMediaDevices>
#include <QMediaCaptureSession>
class QCamera;
class QGraphicsVideoItem;
class VideoScene;
class QPermission;
class QListWidgetItem;
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_refreshButton_clicked();
#ifdef USE_PERMISSIONS
void permissionsChanged(const QPermission& permission);
#endif
void updateCameraList();
void loadCamera(const QCameraDevice& device);
void on_camListWidget_itemSelectionChanged();
private:
void printCameraFormat(const QCameraFormat& format);
Ui::MainWindow* ui;
VideoScene* m_scene;
QGraphicsVideoItem* m_videoItem;
QMediaDevices m_devices;
QList<QCameraDevice> m_availableCams;
QList<QAudioDevice> m_availableMics;
QScopedPointer<QCamera> m_camera;
//QMediaCaptureSession m_captureSession;
};
#endif // MAINWINDOW_H