From 1b4c16cf942ffa606f27b9d825683fd4fc4c4af2 Mon Sep 17 00:00:00 2001 From: derpeter Date: Wed, 3 Aug 2016 23:24:16 +0100 Subject: added abiltiy to set a default A for composite modes --- voctocore/lib/pipeline.py | 1 + voctocore/lib/videomix.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'voctocore/lib') 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() -- cgit v1.2.3