21 #include <QDockWidget>
22 #include <QDomElement>
23 #include <QStandardItemModel>
24 #include <QSortFilterProxyModel>
25 #include <MltProperties.h>
27 class QTreeWidgetItem;
39 class PresetsProxyModel :
public QSortFilterProxyModel
42 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent)
const;
45 class EncodeDock :
public QDockWidget
50 explicit EncodeDock(QWidget *parent = 0);
53 void loadPresetFromProperties(Mlt::Properties&);
54 bool isExportInProgress()
const;
57 void captureStateChanged(
bool);
60 void onAudioChannelsChanged();
61 void onProducerOpened();
62 void onProfileChanged();
65 void on_presetsTree_clicked(
const QModelIndex &index);
66 void on_presetsTree_activated(
const QModelIndex &index);
68 void on_encodeButton_clicked();
70 void on_streamButton_clicked();
72 void on_addPresetButton_clicked();
74 void on_removePresetButton_clicked();
76 void onFinished(AbstractJob*,
bool isSuccess);
78 void on_stopCaptureButton_clicked();
80 void on_videoRateControlCombo_activated(
int index);
82 void on_audioRateControlCombo_activated(
int index);
84 void on_scanModeCombo_currentIndexChanged(
int index);
86 void on_presetsSearch_textChanged(
const QString &search);
88 void on_resetButton_clicked();
90 void openCaptureFile();
92 void on_formatCombo_currentIndexChanged(
int index);
94 void on_videoBufferDurationChanged();
96 void on_gopSpinner_valueChanged(
int value);
98 void on_fromCombo_currentIndexChanged(
int index);
100 void on_videoCodecCombo_currentIndexChanged(
int index);
102 void on_audioCodecCombo_currentIndexChanged(
int index);
104 void setAudioChannels(
int channels );
106 void on_widthSpinner_editingFinished();
108 void on_heightSpinner_editingFinished();
110 void on_advancedButton_clicked(
bool checked);
112 void on_hwencodeCheckBox_clicked(
bool checked);
114 void on_hwencodeButton_clicked();
116 void on_advancedCheckBox_clicked(
bool checked);
118 void on_fpsSpinner_editingFinished();
120 void on_fpsComboBox_activated(
const QString &arg1);
122 void on_videoQualitySpinner_valueChanged(
int vq);
124 void on_audioQualitySpinner_valueChanged(
int aq);
126 void on_parallelCheckbox_clicked(
bool checked);
130 RateControlAverage = 0,
133 RateControlConstrained
141 Mlt::Properties *m_presets;
142 QScopedPointer<MeltJob> m_immediateJob;
144 Mlt::Properties *m_profiles;
145 PresetsProxyModel m_presetsModel;
146 QString m_outputFilename;
147 bool m_isDefaultSettings;
151 Mlt::Properties* collectProperties(
int realtime);
152 void collectProperties(QDomElement& node,
int realtime);
153 MeltJob* createMeltJob(Mlt::Producer* service,
const QString& target,
int realtime,
int pass = 0);
154 void runMelt(
const QString& target,
int realtime = -1);
155 #if LIBMLT_VERSION_INT >= MLT_VERSION_CPP_UPDATED
156 void enqueueAnalysis();
158 void enqueueMelt(
const QString& target,
int realtime);
159 void encode(
const QString& target);
161 Mlt::Producer* fromProducer()
const;
162 static void filterX265Params(QStringList& other);
165 #endif // ENCODEDOCK_H