Skip to content

Commit

Permalink
don't do the full component init (which could trigger errors and warn…
Browse files Browse the repository at this point in the history
…ings to be shown) just for showing the encoding help

git-svn-id: https://xpra.org/svn/Xpra/trunk@12146 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 14, 2016
1 parent 5e0e3e2 commit 63f7660
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/xpra/scripts/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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, ())

Expand Down

0 comments on commit 63f7660

Please sign in to comment.