aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2016-01-06 12:59:40 +0100
committerMaZderMind <github@mazdermind.de>2016-01-06 12:59:40 +0100
commit32b9a74da6a2dc48412f5c5e7756ec447b127f48 (patch)
tree6854bde564fe8a55ad30012340ee43c2fa971fd2
parent84e591a7e5301e9841da474d22b0d6c9f6c1fde5 (diff)
default to disabling the preview encoders and instead warn on the gui
-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()