diff options
| author | tassaron | 2017-07-15 01:00:03 -0400 |
|---|---|---|
| committer | tassaron | 2017-07-15 01:00:03 -0400 |
| commit | 62ab09e3f36dcaf6c1a4680dc6c4d048fb2e165c (patch) | |
| tree | 3981ebc1a5242699f26717139393aa72912b7bd4 /src/core.py | |
| parent | cbbb7876155cdb057b0d779cb8ab7bc1f31116b0 (diff) | |
Video comp verifies audio streams, videoThread moved into Core
off-by-1 bug fixed in exporting, & use fewer threads for fewer CPUs
Diffstat (limited to 'src/core.py')
| -rw-r--r-- | src/core.py | 16 |
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 |
