diff options
author | MaZderMind <github@mazdermind.de> | 2015-05-24 21:01:26 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-05-24 21:01:26 +0200 |
commit | b09c60e18e9f3688571f8e7f6ee4172f64e8920e (patch) | |
tree | 535bd1d87d752a7ffddd1e8edaa2d7e71d92624c /voctocore | |
parent | 33fe27c28bc4aebe95655c91d584b2baf947da0b (diff) |
Make the y-pos in side-by-side composition configurable
Diffstat (limited to 'voctocore')
-rw-r--r-- | voctocore/default-config.ini | 1 | ||||
-rw-r--r-- | voctocore/lib/videomix.py | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini index 479100b..b9c10a2 100644 --- a/voctocore/default-config.ini +++ b/voctocore/default-config.ini @@ -8,6 +8,7 @@ sources=cam1,cam2,grabber [side-by-side-equal] ; defaults to 1% of the video width ;gutter=12 +;ypos=200 [side-by-side-preview] ;asize=1024x576 diff --git a/voctocore/lib/videomix.py b/voctocore/lib/videomix.py index f45b7a3..7eb823f 100644 --- a/voctocore/lib/videomix.py +++ b/voctocore/lib/videomix.py @@ -143,10 +143,16 @@ class VideoMix(object): gutter = int(width / 100) self.log.debug('Gutter calculated to %u', gutter) + 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) + targetWidth = int((width - gutter) / 2) targetHeight = int(targetWidth / width * height) - y = (height - targetHeight) / 2 xa = 0 xb = width - targetWidth |