From 6459e642807a73d568c42dd4b2dfd0280529d1c7 Mon Sep 17 00:00:00 2001 From: Martin Keßler Date: Tue, 1 Nov 2016 15:22:59 +0100 Subject: ignore vim temp files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7216adb..1e87f32 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ target/ #editor backups *~ +*.swp # this ain't an example anymore: example-scripts/config.sh -- cgit v1.2.3 From 7ac47d6cd98a4f8d2fd124cd391a7b3d2914d5ca Mon Sep 17 00:00:00 2001 From: Martin Keßler Date: Tue, 1 Nov 2016 15:23:40 +0100 Subject: fixed log message when reading "side-by-side-preview" config --- voctocore/lib/videomix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voctocore/lib/videomix.py b/voctocore/lib/videomix.py index 4ab740f..38432e8 100644 --- a/voctocore/lib/videomix.py +++ b/voctocore/lib/videomix.py @@ -222,14 +222,14 @@ class VideoMix(object): try: apos = [int(i) for i in Config.get('side-by-side-preview', 'apos').split('/', 1)] - self.log.debug('B-Video-Position configured to %u/%u', + self.log.debug('A-Video-Position configured to %u/%u', apos[0], apos[1]) except: apos = [ int(width / 100), # 1% int(width / 100) # 1% ] - self.log.debug('B-Video-Position calculated to %u/%u', + self.log.debug('A-Video-Position calculated to %u/%u', apos[0], apos[1]) try: -- cgit v1.2.3 From b52dd80c6e2b7c95e798bff9d6b075080b63aa1c Mon Sep 17 00:00:00 2001 From: Martin Keßler Date: Tue, 1 Nov 2016 15:24:41 +0100 Subject: fixed undefined variable when no previews are used --- voctogui/lib/videodisplay.py | 1 + 1 file changed, 1 insertion(+) diff --git a/voctogui/lib/videodisplay.py b/voctogui/lib/videodisplay.py index 6c225ae..0714f80 100644 --- a/voctogui/lib/videodisplay.py +++ b/voctogui/lib/videodisplay.py @@ -44,6 +44,7 @@ class VideoDisplay(object): else: self.log.info('using raw-video instead of encoded-previews') + vdec = None # Setup Server-Connection, Demuxing and Decoding pipeline = """ -- cgit v1.2.3 From 197e6d8244af1132441f7bba4a904c205a8d4d63 Mon Sep 17 00:00:00 2001 From: Martin Keßler Date: Sun, 6 Nov 2016 13:16:37 +0100 Subject: added configuration option to specify initial audio source if such an initial source is specified, removed the GUI element to change it later. this is to avoid accidentally changing the source during production. --- voctocore/default-config.ini | 3 +++ voctocore/lib/audiomix.py | 4 ++-- voctocore/lib/pipeline.py | 8 +++++++- voctogui/lib/ui.py | 16 ++++++++++------ 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini index 4c85abb..168e3e8 100644 --- a/voctocore/default-config.ini +++ b/voctocore/default-config.ini @@ -5,6 +5,9 @@ audiocaps=audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 ; tcp-ports will be 10000,10001,10002 sources=cam1,cam2,grabber +; set the initial audio source +audiosource=cam1 + [output-buffers] ; voctocore has a buffer on all video-outputs, that store video-frames for your diff --git a/voctocore/lib/audiomix.py b/voctocore/lib/audiomix.py index 37376fd..f35dd0c 100644 --- a/voctocore/lib/audiomix.py +++ b/voctocore/lib/audiomix.py @@ -8,10 +8,10 @@ from lib.clock import Clock class AudioMix(object): - def __init__(self): + def __init__(self, source=0): self.log = logging.getLogger('AudioMix') - self.selectedSource = 0 + self.selectedSource = source self.caps = Config.get('mix', 'audiocaps') self.names = Config.getlist('mix', 'sources') diff --git a/voctocore/lib/pipeline.py b/voctocore/lib/pipeline.py index 1a1349e..6213ac6 100644 --- a/voctocore/lib/pipeline.py +++ b/voctocore/lib/pipeline.py @@ -60,8 +60,14 @@ class Pipeline(object): self.log.info('Creating Videmixer') self.vmix = VideoMix() + # check if there is an audio source preconfigured + try: + audiosource = names.index(Config.get('mix', 'audiosource')) + except: + audiosource = 0 + self.log.info('Creating Audiomixer') - self.amix = AudioMix() + self.amix = AudioMix(audiosource) port = 16000 self.log.info('Creating Mixer-Background VSource at tcp-port %u', port) diff --git a/voctogui/lib/ui.py b/voctogui/lib/ui.py index 92d0692..a8fb6a9 100644 --- a/voctogui/lib/ui.py +++ b/voctogui/lib/ui.py @@ -58,12 +58,16 @@ class Ui(UiBuilder): uibuilder=self ) - drawing_area = self.find_widget_recursive(self.win, 'combo_audio') - self.audio_selector_controller = AudioSelectorController( - drawing_area, - win=self.win, - uibuilder=self - ) + # check if there is a fixed audio source configured. + # if so, remove the combo-box entirely instead of setting it up. + if Config.has_option('mix', 'audiosource'): + drawing_area.remove(self.find_widget_recursive(self.win, 'box_audio')) + else: + self.audio_selector_controller = AudioSelectorController( + drawing_area=self.find_widget_recursive(self.win, 'combo_audio'), + win=self.win, + uibuilder=self + ) # Setup Toolbar Controllers toolbar = self.find_widget_recursive(self.win, 'toolbar') -- cgit v1.2.3