Skip to content

Commit

Permalink
make it possible to tune:
Browse files Browse the repository at this point in the history
* MIN_VIDEO_FPS=10 minimum fps to match "real" video
* MIN_VIDEO_EVENTS=20 minimum number of events before we consider a video region for "real" video


git-svn-id: https://xpra.org/svn/Xpra/trunk@13446 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 23, 2016
1 parent 38fee43 commit acc89b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def envint(name, d):
return d

MAX_NONVIDEO_PIXELS = envint("XPRA_MAX_NONVIDEO_PIXELS", 1024*4)
MIN_VIDEO_FPS = envint("XPRA_MIN_VIDEO_FPS", 10)
MIN_VIDEO_EVENTS = envint("XPRA_MIN_VIDEO_EVENTS", 20)

FORCE_CSC_MODE = os.environ.get("XPRA_FORCE_CSC_MODE", "") #ie: "YUV444P"
if FORCE_CSC_MODE and FORCE_CSC_MODE not in RGB_FORMATS and FORCE_CSC_MODE not in PIXEL_SUBSAMPLING:
Expand Down Expand Up @@ -581,9 +583,9 @@ def subregion_is_video(self):
if not vr:
return None
events_count = self.statistics.damage_events_count - self.video_subregion.set_at
if events_count<20:
if events_count<MIN_VIDEO_EVENTS:
return False
return self.video_subregion.fps>=10
return self.video_subregion.fps>=MIN_VIDEO_FPS


def do_send_delayed_regions(self, damage_time, regions, coding, options):
Expand Down

0 comments on commit acc89b5

Please sign in to comment.