summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-05-23 13:15:18 +0200
committerMaZderMind <github@mazdermind.de>2015-05-23 13:15:18 +0200
commit73c26dc57606299cd0cb3ce99ed67a1cfe8cd9f4 (patch)
treef50ba9ba54f22cc10ae77896d214794594210d03
parente1fae24a3b145d42eaa40d62f7aed8f00d6bdf51 (diff)
Add a config option for the Side-by-Side gutter
-rw-r--r--voctocore/default-config.ini4
-rw-r--r--voctocore/lib/videomix.py11
2 files changed, 12 insertions, 3 deletions
diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini
index 79f5cb4..c3a867e 100644
--- a/voctocore/default-config.ini
+++ b/voctocore/default-config.ini
@@ -5,6 +5,10 @@ audiocaps=audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000,chan
; tcp-ports will be 10000,10001
sources=cam1,cam2,grabber
+[side-by-side-equal]
+; defaults to 1% of the video width
+;gutter=12
+
[previews]
; disable if ui & server run on the same computer and exchange uncompressed video frames
enabled=true
diff --git a/voctocore/lib/videomix.py b/voctocore/lib/videomix.py
index 73efa04..d996967 100644
--- a/voctocore/lib/videomix.py
+++ b/voctocore/lib/videomix.py
@@ -101,9 +101,14 @@ class VideoMix(object):
self.log.info('Updating Mixer-State for Side-by-side-Equal-Composition')
width, height = self.getInputVideoSize()
- gutter = int(width / 100)
-
- self.log.debug('Video-Size parsed as %u/%u, Gutter calculated to %upx', width, height, gutter)
+ self.log.debug('Video-Size parsed as %ux%u', width, height)
+
+ try:
+ gutter = Config.getint('side-by-side-equal', 'gutter')
+ self.log.debug('Gutter configured to %u', gutter)
+ except:
+ gutter = int(width / 100)
+ self.log.debug('Gutter calculated to %u', gutter)
targetWidth = int((width - gutter) / 2)
targetHeight = int(targetWidth / width * height)