From aa0576eb84a41fbe69a122ddf44b17de3bc54e10 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 29 Mar 2016 12:08:12 +0000 Subject: [PATCH] #1030 webcam fixes * webcam_option variable should always be an uncooked string * osx cannot do webcam yet, so disable by default in config file to avoid the warning git-svn-id: https://xpra.org/svn/Xpra/trunk@12280 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/etc/xpra/xpra.conf.in | 2 +- src/setup.py | 1 + src/xpra/client/ui_client_base.py | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/etc/xpra/xpra.conf.in b/src/etc/xpra/xpra.conf.in index 5e0a579793..d0a7f98e86 100644 --- a/src/etc/xpra/xpra.conf.in +++ b/src/etc/xpra/xpra.conf.in @@ -211,7 +211,7 @@ av-sync = on # webcam = auto # webcam = no # webcam = /dev/video0 -webcam = auto +webcam = %(webcam)s ################################################################################ diff --git a/src/setup.py b/src/setup.py index ec1a5c6efe..44b35fb7f6 100755 --- a/src/setup.py +++ b/src/setup.py @@ -925,6 +925,7 @@ def pretty_cmd(cmd): 'pulseaudio' : bstr(not OSX and not WIN32), 'pdf_printer' : pdf, 'postscript_printer' : postscript, + 'webcam' : ["auto", "no"][OSX], 'printing' : printing_ENABLED, 'dbus_control' : dbus_ENABLED, 'mmap' : bstr(not OSX and not WIN32), diff --git a/src/xpra/client/ui_client_base.py b/src/xpra/client/ui_client_base.py index 46beb32623..78d7bef12a 100644 --- a/src/xpra/client/ui_client_base.py +++ b/src/xpra/client/ui_client_base.py @@ -173,7 +173,7 @@ def __init__(self): self.encoding = None #webcam: - self.webcam_option = False + self.webcam_option = "" self.webcam_forwarding = False self.webcam_device = None self.webcam_device_no = -1 @@ -317,8 +317,8 @@ def init(self, opts): self.mmap_group = opts.mmap_group self.shadow_fullscreen = opts.shadow_fullscreen - self.webcam_option = opts.webcam.lower() - self.webcam_forwarding = self.webcam_option not in ("no", "false") + self.webcam_option = opts.webcam + self.webcam_forwarding = self.webcam_option.lower() not in ("no", "false") self.server_supports_webcam = False self.server_virtual_video_devices = 0 if self.webcam_forwarding: @@ -331,7 +331,7 @@ def init(self, opts): webcamlog.warn(" %s", e) webcamlog.warn(" webcam forwarding is disabled") self.webcam_forwarding = False - webcamlog("webcam forwarding: %s", self.webcam_option) + webcamlog("webcam forwarding: %s", self.webcam_forwarding) self.sound_properties = typedict() self.speaker_allowed = sound_option(opts.speaker) in ("on", "off")