diff options
author | derpeter <vocend@derpeter.net> | 2016-08-03 23:24:16 +0100 |
---|---|---|
committer | derpeter <vocend@derpeter.net> | 2016-08-03 23:24:16 +0100 |
commit | 1b4c16cf942ffa606f27b9d825683fd4fc4c4af2 (patch) | |
tree | 74cec441f688e1ec4d0eae763ef5dd584836c4d4 /voctocore | |
parent | 73a800f74b8a606ce1e970243cc5e707046f0ef6 (diff) |
added abiltiy to set a default A for composite modes
Diffstat (limited to 'voctocore')
-rw-r--r-- | voctocore/default-config.ini | 4 | ||||
-rw-r--r-- | voctocore/lib/pipeline.py | 1 | ||||
-rw-r--r-- | voctocore/lib/videomix.py | 12 |
3 files changed, 16 insertions, 1 deletions
diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini index 398b613..5b552e0 100644 --- a/voctocore/default-config.ini +++ b/voctocore/default-config.ini @@ -4,7 +4,9 @@ audiocaps=audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 ; tcp-ports will be 10000,10001,10002 sources=cam1,cam2,grabber - +; defcompa sets a default A for the composite view. This value can either be -1 (disbaled) or one of the +; sources defined in 'sources' counted startung with zero (e.g. first source is 0) +defcompa=-1 [side-by-side-equal] ; defaults to 1% of the video width ;gutter=12 diff --git a/voctocore/lib/pipeline.py b/voctocore/lib/pipeline.py index a13f1d2..a705871 100644 --- a/voctocore/lib/pipeline.py +++ b/voctocore/lib/pipeline.py @@ -17,6 +17,7 @@ class Pipeline(object): self.log = logging.getLogger('Pipeline') self.log.info('Video-Caps configured to: %s', Config.get('mix', 'videocaps')) self.log.info('Audio-Caps configured to: %s', Config.get('mix', 'audiocaps')) + self.log.info('Default composit a source configured to: %s', Config.get('mix', 'defcompa')) names = Config.getlist('mix', 'sources') if len(names) < 1: diff --git a/voctocore/lib/videomix.py b/voctocore/lib/videomix.py index 7ff98c2..047f0d4 100644 --- a/voctocore/lib/videomix.py +++ b/voctocore/lib/videomix.py @@ -30,6 +30,8 @@ class VideoMix(object): def __init__(self): self.caps = Config.get('mix', 'videocaps') + self.defcompa = int(Config.get('mix', 'defcompa')) + self.names = Config.getlist('mix', 'sources') self.log.info('Configuring Mixer for %u Sources', len(self.names)) @@ -334,6 +336,16 @@ class VideoMix(object): return self.sourceB def setCompositeMode(self, mode): + + print(str(self.sourceA) + ' Source ID') + print(str(self.defcompa) + 'defcomp') + if self.defcompa != -1: + if self.sourceA != self.defcompa: + self.sourceB = self.sourceA + self.sourceA = self.defcompa + print(str(self.sourceA) + ' A ' + str(self.sourceB) + ' B') + + self.compositeMode = mode self.recalculateMixerState() |