aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/original.py2
-rw-r--r--src/components/sound.py2
-rw-r--r--src/components/video.py24
3 files changed, 15 insertions, 13 deletions
diff --git a/src/components/original.py b/src/components/original.py
index 2bda878..570465d 100644
--- a/src/components/original.py
+++ b/src/components/original.py
@@ -15,7 +15,7 @@ class Component(Component):
name = 'Classic Visualizer'
version = '1.0.0'
- def names():
+ def names(*args):
return ['Original Audio Visualization']
def widget(self, *args):
diff --git a/src/components/sound.py b/src/components/sound.py
index dd3cbab..b3a627a 100644
--- a/src/components/sound.py
+++ b/src/components/sound.py
@@ -18,6 +18,8 @@ class Component(Component):
'chorus': self.page.checkBox_chorus,
'delay': self.page.spinBox_delay,
'volume': self.page.spinBox_volume,
+ }, commandArgs={
+ 'sound': None,
})
def previewRender(self, previewWorker):
diff --git a/src/components/video.py b/src/components/video.py
index 677e3ee..d3696d4 100644
--- a/src/components/video.py
+++ b/src/components/video.py
@@ -14,7 +14,7 @@ from toolkit import openPipe, checkOutput
class Video:
- '''Video Component Frame-Fetcher'''
+ '''Opens a pipe to ffmpeg and stores a buffer of raw video frames.'''
def __init__(self, **kwargs):
mandatoryArgs = [
'ffmpeg', # path to ffmpeg, usually self.core.FFMPEG_BIN
@@ -28,10 +28,7 @@ class Video:
'component', # component object
]
for arg in mandatoryArgs:
- try:
- setattr(self, arg, kwargs[arg])
- except KeyError:
- raise BadComponentInit(arg, self.__doc__)
+ setattr(self, arg, kwargs[arg])
self.frameNo = -1
self.currentFrame = 'None'
@@ -196,13 +193,16 @@ class Component(Component):
height = int(self.settings.value('outputHeight'))
self.blankFrame_ = BlankFrame(width, height)
self.updateChunksize(width, height)
- self.video = Video(
- ffmpeg=self.core.FFMPEG_BIN, videoPath=self.videoPath,
- width=width, height=height, chunkSize=self.chunkSize,
- frameRate=int(self.settings.value("outputFrameRate")),
- parent=self.parent, loopVideo=self.loopVideo,
- component=self, scale=self.scale
- ) if os.path.exists(self.videoPath) else None
+ try:
+ self.video = Video(
+ ffmpeg=self.core.FFMPEG_BIN, #videoPath=self.videoPath,
+ width=width, height=height, chunkSize=self.chunkSize,
+ frameRate=int(self.settings.value("outputFrameRate")),
+ parent=self.parent, loopVideo=self.loopVideo,
+ component=self, scale=self.scale
+ ) if os.path.exists(self.videoPath) else None
+ except KeyError:
+ raise BadComponentInit(self, 'Frame Fetcher initialization')
def frameRender(self, layerNo, frameNo):
if self.video: