summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--voctocore/default-config.ini2
-rwxr-xr-xvoctogui/voctogui.py13
2 files changed, 14 insertions, 1 deletions
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()