aboutsummaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index 2500fa6..55bf261 100644
--- a/src/core.py
+++ b/src/core.py
@@ -12,6 +12,7 @@ from PyQt5.QtCore import QStandardPaths
import toolkit
from frame import Frame
+import video_thread
class Core:
@@ -633,6 +634,21 @@ class Core:
return completeAudioArray
+ def newVideoWorker(self, loader, audioFile, outputPath):
+ self.videoThread = QtCore.QThread(loader)
+ videoWorker = video_thread.Worker(
+ loader, audioFile, outputPath, self.selectedComponents
+ )
+ videoWorker.moveToThread(self.videoThread)
+ videoWorker.videoCreated.connect(self.videoCreated)
+
+ self.videoThread.start()
+ return videoWorker
+
+ def videoCreated(self):
+ self.videoThread.quit()
+ self.videoThread.wait()
+
def cancel(self):
self.canceled = True