Merge branch 'render-singleton'

This commit is contained in:
itsmattkc
2020-11-17 00:41:28 +11:00
268 changed files with 8039 additions and 8302 deletions
+2 -2
View File
@@ -110,8 +110,8 @@ void ProjectImportTask::Import(Folder *folder, QFileInfoList import, int &counte
} else {
FootagePtr item = Decoder::ProbeMedia(model_->project(), file_info.absoluteFilePath(),
&IsCancelled());
FootagePtr item = Decoder::Probe(model_->project(), file_info.absoluteFilePath(),
&IsCancelled());
if (item) {
// See if this footage is an image sequence
+1 -1
View File
@@ -166,7 +166,7 @@ bool LoadOTIOTask::Run()
if (imported_footage.contains(footage_url)) {
probed_item = imported_footage.value(footage_url);
} else {
probed_item = Decoder::ProbeMedia(project_.get(), footage_url, &IsCancelled());
probed_item = Decoder::Probe(project_.get(), footage_url, &IsCancelled());
imported_footage.insert(footage_url, probed_item);
project_->root()->add_child(probed_item);
}
+5 -6
View File
@@ -38,7 +38,7 @@ ProjectSaveTask::ProjectSaveTask(ProjectPtr project) :
bool ProjectSaveTask::Run()
{
// File to temporarily save to (ensures we can't half-write the user's main file and crash)
QString temp_save = QDir(FileFunctions::GetTempFilePath()).filePath(QStringLiteral("tempsv"));
QString temp_save = FileFunctions::GetSafeTemporaryFilename(project_->filename());
QFile project_file(temp_save);
@@ -74,16 +74,15 @@ bool ProjectSaveTask::Run()
}
// Save was successful, we can now rewrite the original file
QFile original(project_->filename());
if ((!original.exists() || original.remove())
&& QFile::copy(temp_save, project_->filename())) {
if (FileFunctions::RenameFileAllowOverwrite(temp_save, project_->filename())) {
return true;
} else {
SetError(tr("Failed to write to \"%1\".").arg(project_->filename()));
SetError(tr("Failed to overwrite \"%1\". Project has been saved as \"%2\" instead.")
.arg(project_->filename(), temp_save));
return false;
}
} else {
SetError(tr("Failed to open file \"%1\" for writing.").arg(project_->filename()));
SetError(tr("Failed to open temporary file \"%1\" for writing.").arg(temp_save));
return false;
}
}
+1 -1
View File
@@ -133,7 +133,7 @@ opentimelineio::v1_0::Track *SaveOTIOTask::SerializeTrack(TrackOutput *track)
otio_clip->set_source_range(opentimelineio::v1_0::TimeRange(block->in().toRationalTime(),
block->length().toRationalTime()));
QList<MediaInput*> media_nodes = block->FindInputNodes<MediaInput>();
QVector<MediaInput*> media_nodes = block->FindInputNodes<MediaInput>();
if (!media_nodes.isEmpty()) {
auto media_ref = new opentimelineio::v1_0::ExternalReference(media_nodes.first()->stream()->footage()->filename().toStdString());
otio_clip->set_media_reference(media_ref);