aboutsummaryrefslogtreecommitdiff
path: root/video_thread.py
diff options
context:
space:
mode:
authorMartin Kaistra2017-05-25 18:43:21 +0200
committerMartin Kaistra2017-05-25 18:43:21 +0200
commit5487319dc10c42728ecc0d8f67abe55278348509 (patch)
treea744c6557a4a33fe9c9b3cc4c08e9156dde2e68e /video_thread.py
parentc622f2908ed1e1fed165d3433d7e6932f06c7a22 (diff)
parent624ec8dca2872813789cf2d5fa32c523f4359d86 (diff)
Merge branch 'tassaron2-master'
Diffstat (limited to 'video_thread.py')
-rw-r--r--video_thread.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/video_thread.py b/video_thread.py
index bd832be..6f71d38 100644
--- a/video_thread.py
+++ b/video_thread.py
@@ -19,8 +19,9 @@ class Worker(QtCore.QObject):
self.core = core.Core()
- @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, str, str)
- def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset, inputFile, outputFile):
+ @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, tuple, tuple, str, str)
+ def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment,\
+ xOffset, yOffset, textColor, visColor, inputFile, outputFile):
# print('worker thread id: {}'.format(QtCore.QThread.currentThreadId()))
def getBackgroundAtIndex(i):
return self.core.drawBaseImage(
@@ -30,7 +31,9 @@ class Worker(QtCore.QObject):
fontSize,
alignment,
xOffset,
- yOffset)
+ yOffset,
+ textColor,
+ visColor)
progressBarValue = 0
self.progressBarUpdate.emit(progressBarValue)
@@ -97,9 +100,9 @@ class Worker(QtCore.QObject):
smoothConstantUp,
lastSpectrum)
if imBackground != None:
- im = self.core.drawBars(lastSpectrum, imBackground)
+ im = self.core.drawBars(lastSpectrum, imBackground, visColor)
else:
- im = self.core.drawBars(lastSpectrum, getBackgroundAtIndex(bgI))
+ im = self.core.drawBars(lastSpectrum, getBackgroundAtIndex(bgI), visColor)
if bgI < len(backgroundFrames)-1:
bgI += 1
@@ -124,6 +127,7 @@ class Worker(QtCore.QObject):
# out_pipe.terminate() # don't terminate ffmpeg too early
out_pipe.wait()
print("Video file created")
+ self.core.deleteTempDir()
self.progressBarUpdate.emit(100)
self.progressBarSetText.emit('100%')
self.videoCreated.emit()