CuteLogger
Fast and simple logging solution for Qt based applications
avformatproducerwidget.h
1/*
2 * Copyright (c) 2012-2023 Meltytech, LLC
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef AVFORMATPRODUCERWIDGET_H
19#define AVFORMATPRODUCERWIDGET_H
20
21#include <QWidget>
22#include <QRunnable>
23#include "abstractproducerwidget.h"
24#include "dialogs/transcodedialog.h"
25
26namespace Ui {
27class AvformatProducerWidget;
28}
29
30class AvformatProducerWidget : public QWidget, public AbstractProducerWidget
31{
32 Q_OBJECT
33
34public:
35 explicit AvformatProducerWidget(QWidget *parent = 0);
36 ~AvformatProducerWidget();
37
38 // AbstractProducerWidget overrides
39 Mlt::Producer *newProducer(Mlt::Profile &);
40 void setProducer(Mlt::Producer *);
41
42public slots:
43 void updateDuration();
44 void rename();
45 void offerConvert(QString message, bool set709Convert = false, bool setSubClip = false);
46
47signals:
48 void producerChanged(Mlt::Producer *);
49 void producerReopened(bool play);
50 void modified();
51
52protected:
53 void keyPressEvent(QKeyEvent *event);
54
55private slots:
56
57 void onProducerChanged(Mlt::Producer *);
58
59 void on_videoTrackComboBox_activated(int index);
60
61 void on_audioTrackComboBox_activated(int index);
62
63 void on_scanComboBox_activated(int index);
64
65 void on_fieldOrderComboBox_activated(int index);
66
67 void on_aspectNumSpinBox_valueChanged(int );
68
69 void on_aspectDenSpinBox_valueChanged(int );
70
71 void on_durationSpinBox_editingFinished();
72
73 void on_speedSpinBox_editingFinished();
74
75 void on_pitchCheckBox_stateChanged(int state);
76
77 void on_syncSlider_valueChanged(int value);
78
79 void on_actionOpenFolder_triggered();
80
81 void on_menuButton_clicked();
82
83 void on_actionCopyFullFilePath_triggered();
84
85 void on_notesTextEdit_textChanged();
86
87 void on_actionFFmpegInfo_triggered();
88
89 void on_actionFFmpegIntegrityCheck_triggered();
90
91 void on_actionFFmpegConvert_triggered();
92
93 void on_reverseButton_clicked();
94
95 void on_actionExtractSubclip_triggered();
96
97 void on_actionExtractSubtitles_triggered();
98
99 void on_actionSetFileDate_triggered();
100
101 void on_rangeComboBox_activated(int index);
102
103 void on_filenameLabel_editingFinished();
104
105 void on_convertButton_clicked();
106
107 void on_actionDisableProxy_triggered(bool checked);
108
109 void on_actionMakeProxy_triggered();
110
111 void on_actionDeleteProxy_triggered();
112
113 void on_actionCopyHashCode_triggered();
114
115 void on_proxyButton_clicked();
116
117 void on_actionReset_triggered();
118
119 void on_actionSetEquirectangular_triggered();
120
121 void on_actionFFmpegVideoQuality_triggered();
122
123 void on_rotationComboBox_activated(int index);
124
125 void on_actionExportGPX_triggered();
126
127 void on_speedComboBox_textActivated(const QString &arg1);
128
129private:
130 Ui::AvformatProducerWidget *ui;
131 int m_defaultDuration;
132 bool m_recalcDuration;
133 bool m_askToConvert;
134
135 void reopen(Mlt::Producer *p);
136 void recreateProducer(bool getFrame = false);
137 bool revertToOriginalResource();
138 void setSyncVisibility();
139 double fps();
140
141private slots:
142 void reloadProducerValues();
143 void on_actionBitrateViewer_triggered();
144};
145
146class ProbeTask : public QObject, public QRunnable
147{
148 Q_OBJECT
149
150public:
151 explicit ProbeTask(Mlt::Producer *producer);
152 void run();
153
154signals:
155 void probeFinished();
156private:
157 Mlt::Producer m_producer;
158};
159
160#endif // AVFORMATPRODUCERWIDGET_H