-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
we have a meaningful method, use it instead of explicitly calling res…
…tride git-svn-id: https://xpra.org/svn/Xpra/trunk@19110 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# This file is part of Xpra. | ||
# Copyright (C) 2013-2017 Antoine Martin <[email protected]> | ||
# Copyright (C) 2013-2018 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
|
@@ -782,10 +782,13 @@ def process_damage_region(self, damage_time, x, y, w, h, coding, options, flush= | |
#TODO: encode delay can be derived rather than hard-coded | ||
encode_delay = 50 | ||
av_delay = max(0, av_delay - encode_delay) | ||
must_freeze = av_delay>=0 or coding in self.video_encodings | ||
#freeze if: | ||
# * we want av-sync | ||
# * the video encoder needs a thread safe image | ||
# (the xshm backing may change from underneath us if we don't freeze it) | ||
must_freeze = av_delay>0 or ((coding in self.video_encodings or coding=="auto") and not image.is_thread_safe()) | ||
if must_freeze: | ||
newstride = roundup(image.get_width()*image.get_bytesperpixel(), 4) | ||
image.restride(newstride) | ||
image.freeze() | ||
def call_encode(ew, eh, eimage, encoding, eflush): | ||
self._sequence += 1 | ||
sequence = self._sequence | ||
|