From 32b9a74da6a2dc48412f5c5e7756ec447b127f48 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 6 Jan 2016 12:59:40 +0100 Subject: default to disabling the preview encoders and instead warn on the gui --- voctocore/default-config.ini | 2 +- voctogui/voctogui.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini index 6173822..87fc125 100644 --- a/voctocore/default-config.ini +++ b/voctocore/default-config.ini @@ -22,7 +22,7 @@ sources=cam1,cam2,grabber [previews] ; disable if ui & server run on the same computer and can exchange uncompressed video frames -enabled=true +enabled=false ; default to mix-videocaps ; you can change the framerate and the width/height, but nothing else diff --git a/voctogui/voctogui.py b/voctogui/voctogui.py index 083b004..123a305 100755 --- a/voctogui/voctogui.py +++ b/voctogui/voctogui.py @@ -112,6 +112,19 @@ def main(): # fetch config from server Config.fetchServerConfig() + # Warn when connecting to a non-local core without preview-encoders enabled + # the list-comparison is not complete (one could use a local hostname or the local system ip) + # but it's only here to warn that one might be making a mistake + use_previews = Config.getboolean('previews', 'enabled') and Config.getboolean('previews', 'use') + looks_like_localhost = Config.get('server', 'host') in ['::1', '127.0.0.1', 'localhost'] + if not use_previews and not looks_like_localhost: + logging.warn( + 'Connecting to `%s` (which looks like a remote host) might not work without enabeling ' + 'the preview encoders (set `[previews] enabled=true` on the core) or it might saturate ' + 'your ethernet link between the two machines.', + Config.get('server', 'host') + ) + # switch connection to nonblocking, event-driven mode Connection.enterNonblockingMode() -- cgit v1.2.3