aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authortassaron2017-07-27 22:15:41 -0400
committertassaron2017-07-27 22:15:41 -0400
commit6ecb6df23628de65c9efd8cac4810fdf74238c3d (patch)
treebb2f950b3a4bdc3da1c29891b634e68e12b92610 /src/components
parent6fc0398602c42a3d219ec92163c480c1833ab0c2 (diff)
some minor bugfixes
Diffstat (limited to 'src/components')
-rw-r--r--src/components/sound.py3
-rw-r--r--src/components/video.py14
2 files changed, 9 insertions, 8 deletions
diff --git a/src/components/sound.py b/src/components/sound.py
index aff43d3..26ecf93 100644
--- a/src/components/sound.py
+++ b/src/components/sound.py
@@ -21,9 +21,6 @@ class Component(Component):
'sound': None,
})
- def preFrameRender(self, **kwargs):
- pass
-
def properties(self):
props = ['static', 'audio']
if not os.path.exists(self.sound):
diff --git a/src/components/video.py b/src/components/video.py
index 48ac557..b2487c1 100644
--- a/src/components/video.py
+++ b/src/components/video.py
@@ -59,7 +59,7 @@ class Video:
self.thread = threading.Thread(
target=self.fillBuffer,
- name=self.__doc__
+ name='Video Frame-Fetcher'
)
self.thread.daemon = True
self.thread.start()
@@ -150,6 +150,10 @@ class Component(Component):
def properties(self):
props = []
+ if hasattr(self.parent, 'window'):
+ outputFile = self.parent.window.lineEdit_outputFile.text()
+ else:
+ outputFile = str(self.parent.args.output)
if not self.videoPath:
self.lockError("There is no video selected.")
@@ -157,9 +161,7 @@ class Component(Component):
self.lockError("Could not identify an audio stream in this video.")
elif not os.path.exists(self.videoPath):
self.lockError("The video selected does not exist!")
- elif (os.path.realpath(self.videoPath) ==
- os.path.realpath(
- self.parent.window.lineEdit_outputFile.text())):
+ elif os.path.realpath(self.videoPath) == os.path.realpath(outputFile):
self.lockError("Input and output paths match.")
if self.useAudio:
@@ -193,7 +195,7 @@ class Component(Component):
raise Video.threadError
return self.video.frame(frameNo)
- def renderFinished(self):
+ def postFrameRender(self):
self.video.pipe.stdout.close()
self.video.pipe.send_signal(signal.SIGINT)
@@ -238,6 +240,8 @@ class Component(Component):
def updateChunksize(self):
if self.scale != 100 and not self.distort:
width, height = scale(self.scale, self.width, self.height, int)
+ else:
+ width, height = self.width, self.height
self.chunkSize = 4 * width * height
def command(self, arg):