refactored import function for greater robustness

The import function was written early on in the rewrite as a multithreaded
background task that was considered somewhat flawed. While it worked for the
most part, there were possibilities of race conditions that could have
potentially been fatal, particularly since media could theoretically be
deleted while the import/probe tasks were running in the background.

With the save/load functions coming in, it became even more complicated as
projects may include metadata about the footage that can't be implemented
easily when the footage is imported/probed in the background. Making importing
a modal task fixes all of these issues, it's still done in a background thread
to not hang the GUI thread, but the GUI thread can be briefly "paused" in a
user friendly way so that all these functions can be safer.
This commit is contained in:
itsmattkc
2020-01-15 15:19:14 +11:00
parent 16904c976f
commit 75a9291cd2
24 changed files with 233 additions and 382 deletions
+1 -1
View File
@@ -284,7 +284,7 @@ Node *NodeInput::get_connected_node() const
{
NodeOutput* output = get_connected_output();
if (output != nullptr) {
if (output) {
return output->parentNode();
}