Skip to content

Commit

Permalink
make it possible to tune the MAX_SOFT_EXPIRED value on the server side
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@12158 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 17, 2016
1 parent d270b38 commit 49f3bc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xpra/server/window/window_source.py
Expand Up @@ -33,6 +33,7 @@
MAX_DELTA_SIZE = int(os.environ.get("XPRA_MAX_DELTA_SIZE", "32768"))
MAX_DELTA_HITS = int(os.environ.get("XPRA_MAX_DELTA_HITS", "20"))
MIN_WINDOW_REGION_SIZE = int(os.environ.get("XPRA_MIN_WINDOW_REGION_SIZE", "1024"))
MAX_SOFT_EXPIRED = int(os.environ.get("XPRA_MAX_SOFT_EXPIRED", "5"))

HAS_ALPHA = os.environ.get("XPRA_ALPHA", "1")=="1"
FORCE_BATCH = os.environ.get("XPRA_FORCE_BATCH", "0")=="1"
Expand Down Expand Up @@ -128,7 +129,7 @@ def __init__(self, queue_size, call_in_encode_thread, queue_packet, compressed_w
ropts = ropts.intersection(set(self.server_core_encodings)) #ensure the server has support for it
ropts = ropts.intersection(set(self.core_encodings)) #ensure the client has support for it
self.client_refresh_encodings = encoding_options.strlistget("auto_refresh_encodings", list(ropts))
self.max_soft_expired = max(0, min(100, encoding_options.intget("max-soft-expired", 5)))
self.max_soft_expired = max(0, min(100, encoding_options.intget("max-soft-expired", MAX_SOFT_EXPIRED)))
self.supports_delta = []
if not window.is_tray() and DELTA:
self.supports_delta = [x for x in encoding_options.strlistget("supports_delta", []) if x in ("png", "rgb24", "rgb32")]
Expand Down Expand Up @@ -259,7 +260,7 @@ def init_vars(self):
self.expire_timer = None
self.soft_timer = None
self.soft_expired = 0
self.max_soft_expired = 5
self.max_soft_expired = MAX_SOFT_EXPIRED
self.min_delta_size = MIN_DELTA_SIZE
self.max_delta_size = MAX_DELTA_SIZE
self.is_OR = False
Expand Down

0 comments on commit 49f3bc4

Please sign in to comment.