-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
MainWindow.h
110 lines (96 loc) · 3.24 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "ui_MainWindow.h"
#include "DeckLinkCapture.h"
#include "DeckLinkDeviceDiscovery.h"
#include "ImageWidget.h"
#include "ProfileCallback.h"
#include "common.h"
#include <QEvent>
#include <QMainWindow>
#include <QWidget>
#include <memory>
class VideoFrameData;
class DeckLinkDeviceDiscovery;
class DeckLinkInputDevice;
class ProfileCallback;
class QCheckBox;
class QListWidget;
class QListWidgetItem;
class MainWindow : public QMainWindow, public DeckLinkCaptureDelegate {
Q_OBJECT
friend class UIWidget;
public:
enum {
Dummy_ = QEvent::User,
};
private:
Ui::MainWindow *ui;
struct Private;
Private *m;
QListWidget *listWidget_input_device();
QListWidget *listWidget_input_connection();
QListWidget *listWidget_display_mode();
QCheckBox *checkBox_audio();
QCheckBox *checkBox_deinterlace();
QCheckBox *checkBox_display_mode_auto_detection();
void setStatusBarText(const QString &text);
bool isVideoFormatAutoDetectionEnabled() const;
void updateUI();
void internalStartCapture(bool start);
void toggleRecord();
void setSignalStatus(bool valid);
bool isRecording() const;
bool isValidSignal() const;
void onInterval1s();
void notifyRecordingProgress(qint64 current, qint64 length);
void updateCursor();
bool changeAudioOutputDevice(const QString &name, bool save);
void setFullScreen(bool f);
ImageWidget *currentImageWidget();
void updateStatusLabel();
protected:
void timerEvent(QTimerEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
bool event(QEvent *event) override;
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override;
void closeEvent(QCloseEvent *event) override;
void setup();
void startCapture();
void stopCapture();
void restartCapture();
void refreshDisplayModeMenu();
void refreshInputConnectionMenu();
void addDevice(IDeckLink *decklink) override;
void removeDevice(IDeckLink *decklink) override;
void haltStreams() override;
void updateProfile(IDeckLinkProfile* newProfile) override;
void criticalError(const QString &title, const QString &message) override;
void changeDisplayMode(BMDDisplayMode dispmode, const Rational &fps) override;
bool isCapturing() const;
void changeInputDevice(int selectedDeviceIndex);
void changeInputConnection(BMDVideoConnection conn, bool errorcheck);
bool isAudioCaptureEnabled() const;
void stopRecord();
void startRecord();
private slots:
void newFrame(const VideoFrameData &frame);
void on_action_recording_start_triggered();
void on_action_recording_stop_triggered();
void on_action_view_dot_by_dot_triggered();
void on_action_view_fit_window_triggered();
void on_action_view_small_lq_triggered();
void on_checkBox_audio_stateChanged(int arg1);
void on_checkBox_deinterlace_stateChanged(int arg1);
void on_checkBox_display_mode_auto_detection_clicked(bool checked);
void on_listWidget_display_mode_currentRowChanged(int currentRow);
void on_listWidget_display_mode_itemDoubleClicked(QListWidgetItem *item);
void on_listWidget_input_connection_currentRowChanged(int currentRow);
void on_listWidget_input_device_currentRowChanged(int currentRow);
void ready(const VideoFrameData &frame);
void test();
};
#endif // MAINWINDOW_H