ensured renders can be cancelled

This commit is contained in:
itsmattkc
2018-12-08 21:00:36 +11:00
parent 576d3f0098
commit 6c3197aac6
4 changed files with 6 additions and 1 deletions
+1
View File
@@ -529,6 +529,7 @@ void ExportDialog::update_progress_bar(int value, qint64 remaining_ms) {
}
void ExportDialog::on_renderCancel_clicked() {
panel_sequence_viewer->viewer_widget->force_quit = true;
et->continueEncode = false;
cancelled = true;
}
+1 -1
View File
@@ -57,7 +57,7 @@ public:
bool is_recording_cued();
long recording_start;
long recording_end;
int recording_track;
int recording_track;
void reset_all_audio();
void assert_audio_device();
+2
View File
@@ -736,6 +736,7 @@ GLuint ViewerWidget::compose_sequence(QVector<Clip*>& nests, bool render_audio)
void ViewerWidget::paintGL() {
drawn_gizmos = false;
force_quit = false;
if (viewer->seq != NULL) {
gizmos = NULL;
@@ -784,6 +785,7 @@ void ViewerWidget::paintGL() {
p.drawLine(playhead_x, 0, playhead_x, height());
}
if (force_quit) break;
if (texture_failed) {
if (rendering) {
dout << "[INFO] Texture failed - looping";
+2
View File
@@ -33,6 +33,8 @@ public:
bool waveform;
Clip* waveform_clip;
MediaStream* waveform_ms;
bool force_quit;
public slots:
void delete_function();
protected: