From 63f766006ab45cc95a82027d2be109f5d3570ba5 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 14 Mar 2016 11:40:46 +0000 Subject: [PATCH] don't do the full component init (which could trigger errors and warnings to be shown) just for showing the encoding help git-svn-id: https://xpra.org/svn/Xpra/trunk@12146 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/scripts/server.py | 2 +- src/xpra/server/server_base.py | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/xpra/scripts/server.py b/src/xpra/scripts/server.py index b6cd30ce8b..eb7e899da7 100644 --- a/src/xpra/scripts/server.py +++ b/src/xpra/scripts/server.py @@ -897,7 +897,7 @@ def run_server(error_cb, opts, mode, xpra_file, extra_args, desktop_display=None x.logger.setLevel(logging.WARN) from xpra.server.server_base import ServerBase sb = ServerBase() - sb.init(opts) + sb.init_options(opts) #ensures that the threaded video helper init has completed #(by running it again, which will block on the init lock) from xpra.codecs.video_helper import getVideoHelper diff --git a/src/xpra/server/server_base.py b/src/xpra/server/server_base.py index 8db31cc1a9..b3bc6b7d67 100644 --- a/src/xpra/server/server_base.py +++ b/src/xpra/server/server_base.py @@ -207,6 +207,10 @@ def source_remove(self, timer): def init(self, opts): ServerCore.init(self, opts) log("ServerBase.init(%s)", opts) + self.init_options(opts) + self.init_components(opts) + + def init_options(self, opts): self.supports_mmap = opts.mmap self.allowed_encodings = opts.encodings self.init_encoding(opts.encoding) @@ -252,6 +256,12 @@ def init(self, opts): self.pulseaudio = opts.pulseaudio self.pulseaudio_command = opts.pulseaudio_command + #video init: default to ALL if not specified + video_encoders = opts.video_encoders or ALL_VIDEO_ENCODER_OPTIONS + csc_modules = opts.csc_modules or ALL_CSC_MODULE_OPTIONS + getVideoHelper().set_modules(video_encoders=video_encoders, csc_modules=csc_modules) + + def init_components(self, opts): log("starting component init") self.init_webcam() self.init_clipboard() @@ -262,11 +272,6 @@ def init(self, opts): self.init_dbus_helper() self.init_dbus_server() - #video init: default to ALL if not specified - video_encoders = opts.video_encoders or ALL_VIDEO_ENCODER_OPTIONS - csc_modules = opts.csc_modules or ALL_CSC_MODULE_OPTIONS - getVideoHelper().set_modules(video_encoders=video_encoders, csc_modules=csc_modules) - self.load_existing_windows(opts.system_tray) thread.start_new_thread(self.threaded_init, ())