22 #include <QDockWidget> 23 #include <QDomElement> 24 #include <QStandardItemModel> 25 #include <QSortFilterProxyModel> 26 #include <MltProperties.h> 28 class QTreeWidgetItem;
40 class PresetsProxyModel :
public QSortFilterProxyModel
43 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent)
const;
46 class EncodeDock :
public QDockWidget
51 explicit EncodeDock(QWidget *parent = 0);
54 void loadPresetFromProperties(Mlt::Properties&);
55 bool isExportInProgress()
const;
58 void captureStateChanged(
bool);
61 void onAudioChannelsChanged();
62 void onProducerOpened();
63 void onProfileChanged();
66 void on_presetsTree_clicked(
const QModelIndex &index);
67 void on_presetsTree_activated(
const QModelIndex &index);
69 void on_encodeButton_clicked();
71 void on_streamButton_clicked();
73 void on_addPresetButton_clicked();
75 void on_removePresetButton_clicked();
77 void onFinished(AbstractJob*,
bool isSuccess);
79 void on_stopCaptureButton_clicked();
81 void on_videoRateControlCombo_activated(
int index);
83 void on_audioRateControlCombo_activated(
int index);
85 void on_scanModeCombo_currentIndexChanged(
int index);
87 void on_presetsSearch_textChanged(
const QString &search);
89 void on_resetButton_clicked();
91 void openCaptureFile();
93 void on_formatCombo_currentIndexChanged(
int index);
95 void on_videoBufferDurationChanged();
97 void on_gopSpinner_valueChanged(
int value);
99 void on_fromCombo_currentIndexChanged(
int index);
101 void on_videoCodecCombo_currentIndexChanged(
int index);
103 void on_audioCodecCombo_currentIndexChanged(
int index);
105 void setAudioChannels(
int channels );
107 void on_widthSpinner_editingFinished();
109 void on_heightSpinner_editingFinished();
111 void on_advancedButton_clicked(
bool checked);
113 void on_hwencodeCheckBox_clicked(
bool checked);
115 void on_hwencodeButton_clicked();
117 void on_advancedCheckBox_clicked(
bool checked);
119 void on_fpsSpinner_editingFinished();
121 void on_fpsComboBox_activated(
const QString &arg1);
123 void on_videoQualitySpinner_valueChanged(
int vq);
125 void on_audioQualitySpinner_valueChanged(
int aq);
129 RateControlAverage = 0,
132 RateControlConstrained
140 Mlt::Properties *m_presets;
141 QScopedPointer<MeltJob> m_immediateJob;
143 Mlt::Properties *m_profiles;
144 PresetsProxyModel m_presetsModel;
145 QString m_outputFilename;
146 bool m_isDefaultSettings;
150 Mlt::Properties* collectProperties(
int realtime);
151 void collectProperties(QDomElement& node,
int realtime);
152 MeltJob* createMeltJob(Mlt::Producer* service,
const QString& target,
int realtime,
int pass = 0);
153 void runMelt(
const QString& target,
int realtime = -1);
154 #if LIBMLT_VERSION_INT >= MLT_VERSION_CPP_UPDATED 155 void enqueueAnalysis();
157 void enqueueMelt(
const QString& target,
int realtime);
158 void encode(
const QString& target);
160 Mlt::Producer* fromProducer()
const;
161 static void filterX265Params(QStringList& other);
164 #endif // ENCODEDOCK_H