Skip to content

Commit

Permalink
#1030 webcam fixes
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
totaam committed Mar 29, 2016
1 parent 6ddd58a commit aa0576e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/etc/xpra/xpra.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ av-sync = on
# webcam = auto
# webcam = no
# webcam = /dev/video0
webcam = auto
webcam = %(webcam)s


################################################################################
Expand Down
1 change: 1 addition & 0 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 4 additions & 4 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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")
Expand Down

0 comments on commit aa0576e

Please sign in to comment.