fixed playback/export flickering and hanging
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <QPainter>
|
||||
#include <QLinearGradient>
|
||||
#include <QtMath>
|
||||
#include <QDebug>
|
||||
|
||||
#define AUDIO_MONITOR_PEAK_HEIGHT 15
|
||||
#define AUDIO_MONITOR_GAP 3
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "ui_timeline.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui/viewerwidget.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "effects/effect.h"
|
||||
#include "effects/transition.h"
|
||||
@@ -22,7 +23,6 @@
|
||||
|
||||
#include <QPainter>
|
||||
#include <QColor>
|
||||
#include <QDebug>
|
||||
#include <QMouseEvent>
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
@@ -231,20 +231,17 @@ void TimelineWidget::dragEnterEvent(QDragEnterEvent *event) {
|
||||
}
|
||||
}
|
||||
|
||||
/*if (config.enable_drag_files_to_timeline && event->mimeData()->hasUrls()) {
|
||||
// TODO for this to work, we need a way to abort PreviewGenerator
|
||||
|
||||
|
||||
qDebug() << "TODO get data for:";
|
||||
if (config.enable_drag_files_to_timeline && event->mimeData()->hasUrls()) {
|
||||
dout << "TODO get data for:";
|
||||
QList<QUrl> urls = event->mimeData()->urls();
|
||||
if (!urls.isEmpty()) {
|
||||
for (int i=0;i<urls.size();i++) {
|
||||
qDebug() << (urls.at(i).toLocalFile());
|
||||
dout << (urls.at(i).toLocalFile());
|
||||
}
|
||||
}
|
||||
|
||||
import_init = true;
|
||||
}*/
|
||||
}
|
||||
|
||||
if (import_init) {
|
||||
event->accept();
|
||||
@@ -1965,7 +1962,7 @@ void draw_waveform(Clip* clip, MediaStream* ms, long media_length, QPainter *p,
|
||||
p->drawLine(clip_rect.left()+i, mid+min, clip_rect.left()+i, mid+max);
|
||||
}
|
||||
}/* else {
|
||||
qDebug() << "[WARNING] Tried to reach" << offset + 1 << ", limit:" << ms->audio_preview.size();
|
||||
dout << "[WARNING] Tried to reach" << offset + 1 << ", limit:" << ms->audio_preview.size();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -13,8 +13,8 @@
|
||||
#include "ui_timeline.h"
|
||||
#include "playback/cacher.h"
|
||||
#include "io/config.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QAudioOutput>
|
||||
#include <QOpenGLShaderProgram>
|
||||
@@ -279,7 +279,7 @@ GLuint ViewerWidget::compose_sequence(Clip* nest, bool render_audio) {
|
||||
Clip* c = current_clips.at(i);
|
||||
|
||||
if (c->media_type == MEDIA_TYPE_FOOTAGE && !c->finished_opening) {
|
||||
qDebug() << "[WARNING] Tried to display clip" << i << "but it's closed";
|
||||
dout << "[WARNING] Tried to display clip" << i << "but it's closed";
|
||||
texture_failed = true;
|
||||
} else {
|
||||
if (c->track < 0) {
|
||||
@@ -306,7 +306,7 @@ GLuint ViewerWidget::compose_sequence(Clip* nest, bool render_audio) {
|
||||
|
||||
if (!texture_failed) {
|
||||
if (textureID == 0 && c->media_type != MEDIA_TYPE_SOLID) {
|
||||
qDebug() << "[WARNING] Texture hasn't been created yet";
|
||||
dout << "[WARNING] Texture hasn't been created yet";
|
||||
texture_failed = true;
|
||||
} else if (playhead >= c->timeline_in) {
|
||||
glPushMatrix();
|
||||
@@ -514,7 +514,7 @@ void ViewerWidget::paintGL() {
|
||||
|
||||
if (texture_failed) {
|
||||
if (rendering) {
|
||||
qDebug() << "[INFO] Texture failed - looping";
|
||||
dout << "[INFO] Texture failed - looping";
|
||||
loop = true;
|
||||
} else {
|
||||
retry_timer.start();
|
||||
|
||||
Reference in New Issue
Block a user