aboutsummaryrefslogtreecommitdiff
path: root/voctocore
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2016-08-12 20:18:42 +0200
committerMaZderMind <git@mazdermind.de>2016-08-12 20:19:15 +0200
commit0195680851cce0bc796ce9bb7c471131baf7b913 (patch)
treef2935689985b682fd22858ad9819e335d02d6cf8 /voctocore
parentd136eddbc773923fba9e6ce63cb8f8da84e2eddb (diff)
makes y-positions in side-by-side-equal mode separate configurable, fixes #71
Diffstat (limited to 'voctocore')
-rw-r--r--voctocore/default-config.ini3
-rw-r--r--voctocore/lib/videomix.py27
2 files changed, 22 insertions, 8 deletions
diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini
index adf8bdd..d5d89fa 100644
--- a/voctocore/default-config.ini
+++ b/voctocore/default-config.ini
@@ -31,7 +31,8 @@ mix_out=10000
[side-by-side-equal]
; defaults to 1% of the video width
;gutter=12
-;ypos=200
+;atop=50
+;btop=200
; if configured, switching to the sbs-equal mode will automatically select these
; sources. if not configured, it will not change the last set sources
diff --git a/voctocore/lib/videomix.py b/voctocore/lib/videomix.py
index 2fa9200..aa2bedc 100644
--- a/voctocore/lib/videomix.py
+++ b/voctocore/lib/videomix.py
@@ -150,30 +150,43 @@ class VideoMix(object):
targetWidth = int((width - gutter) / 2)
targetHeight = int(targetWidth / width * height)
- try:
- y = Config.getint('side-by-side-equal', 'ypos')
- self.log.debug('Y-Pos configured to %u', y)
- except:
- y = (height - targetHeight) / 2
- self.log.debug('Y-Pos calculated to %u', y)
+ self.log.debug('Video-Size calculated to %ux%u', targetWidth, targetHeight)
xa = 0
xb = width - targetWidth
+ y = (height - targetHeight) / 2
+
+ try:
+ ya = Config.getint('side-by-side-equal', 'atop')
+ self.log.debug('A-Video Y-Pos configured to %u', ya)
+ except:
+ ya = y
+ self.log.debug('A-Video Y-Pos calculated to %u', ya)
+
+
+ try:
+ yb = Config.getint('side-by-side-equal', 'btop')
+ self.log.debug('B-Video Y-Pos configured to %u', yb)
+ except:
+ yb = y
+ self.log.debug('B-Video Y-Pos calculated to %u', yb)
+
for idx, name in enumerate(self.names):
pad = self.padState[idx]
pad.reset()
- pad.ypos = y
pad.width = targetWidth
pad.height = targetHeight
if idx == self.sourceA:
pad.xpos = xa
+ pad.ypos = ya
pad.zorder = 1
elif idx == self.sourceB:
pad.xpos = xb
+ pad.ypos = yb
pad.zorder = 2
else: