From b09c60e18e9f3688571f8e7f6ee4172f64e8920e Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 24 May 2015 21:01:26 +0200 Subject: Make the y-pos in side-by-side composition configurable --- voctocore/default-config.ini | 1 + voctocore/lib/videomix.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'voctocore') 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 -- cgit v1.2.3