Merge branch 'master' into otio

This commit is contained in:
itsmattkc
2020-10-22 20:26:16 +11:00
149 changed files with 4350 additions and 2079 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ bool ExportTask::Run()
if (params_.audio_enabled()) {
// Write audio data now
encoder_->WriteAudio(audio_params(), audio_data_.GetPCMFilename());
encoder_->WriteAudio(audio_params(), audio_data_.CreatePlaybackDevice(encoder_));
}
encoder_->Close();
+17 -1
View File
@@ -25,6 +25,7 @@
#include <QXmlStreamReader>
#include "common/xmlutils.h"
#include "core.h"
OLIVE_NAMESPACE_ENTER
@@ -45,7 +46,17 @@ bool ProjectLoadTask::Run()
if (reader.name() == QStringLiteral("olive")) {
while(XMLReadNextStartElement(&reader)) {
if (reader.name() == QStringLiteral("version")) {
qDebug() << "Project version:" << reader.readElementText();
uint project_version = reader.readElementText().toUInt();
if (project_version > Core::kProjectVersion) {
// Project is newer than we support
SetError(tr("This project is newer than this version of Olive and cannot be opened."));
return false;
} else if (project_version < 201003) { // Change this if we drop support for a project version
// Project is older than we support
SetError(tr("This project is from a version of Olive that is no longer supported in this version."));
return false;
}
} else if (reader.name() == QStringLiteral("url")) {
project_saved_url_ = reader.readElementText();
} else if (reader.name() == QStringLiteral("project")) {
@@ -62,6 +73,11 @@ bool ProjectLoadTask::Run()
reader.skipCurrentElement();
}
}
} else if (reader.name() == QStringLiteral("project")) {
// 0.1 projects use "project" as the root instead of Olive. We don't currently support
// these projects
SetError(tr("This project is from a version of Olive that is no longer supported in this version."));
return false;
} else {
reader.skipCurrentElement();
}
+4 -1
View File
@@ -25,6 +25,7 @@
#include <QXmlStreamWriter>
#include "common/filefunctions.h"
#include "core.h"
OLIVE_NAMESPACE_ENTER
@@ -49,7 +50,9 @@ bool ProjectSaveTask::Run()
writer.writeStartElement("olive");
writer.writeTextElement("version", "0.2.0");
// Version is stored in YYMMDD from whenever the project format was last changed
// Allows easy integer math for checking project versions.
writer.writeTextElement("version", QString::number(Core::kProjectVersion));
writer.writeTextElement("url", project_->filename());
+2 -2
View File
@@ -122,7 +122,7 @@ void RenderTask::Render(const TimeRangeList& video_range,
|| !download_futures.empty()
|| !audio_lookup_table.empty())) {
if (!IsCancelled() && !frame_queue.empty()) {
while (!IsCancelled() && !frame_queue.empty()) {
// Pop another frame off the frame queue
const HashTimePair& p = frame_queue.front();
@@ -168,7 +168,7 @@ void RenderTask::Render(const TimeRangeList& video_range,
frame_queue.pop_front();
}
if (!IsCancelled() && !audio_queue.empty()) {
while (!IsCancelled() && !audio_queue.empty()) {
audio_lookup_table.push_back({audio_queue.front(), backend_->RenderAudio(audio_queue.front())});
audio_queue.pop_front();
}