Skip to content

Commit

Permalink
#2022: add env var to debug video context cleanup
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@20927 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 4, 2018
1 parent 1bee9a2 commit 43b6daa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
del SCALING_OPTIONS_STR
scalinglog("scaling options: SCALING=%s, HARDCODED=%s, PPS_TARGET=%i, MIN_PPS=%i, OPTIONS=%s", SCALING, SCALING_HARDCODED, SCALING_PPS_TARGET, SCALING_MIN_PPS, SCALING_OPTIONS)

DEBUG_VIDEO_CLEAN = envbool("XPRA_DEBUG_VIDEO_CLEAN", False)

FORCE_AV_DELAY = envint("XPRA_FORCE_AV_DELAY", 0)
B_FRAMES = envbool("XPRA_B_FRAMES", True)
VIDEO_SKIP_EDGE = envbool("XPRA_VIDEO_SKIP_EDGE", False)
Expand Down Expand Up @@ -292,9 +294,15 @@ def video_context_clean(self):
csce = self._csc_encoder
ve = self._video_encoder
if csce or ve:
if DEBUG_VIDEO_CLEAN:
log.warn("video_context_clean()")
import traceback
traceback.print_stack()
self._csc_encoder = None
self._video_encoder = None
def clean():
if DEBUG_VIDEO_CLEAN:
log.warn("video_context_clean() done")
self.csc_clean(csce)
self.ve_clean(ve)
self.call_in_encode_thread(False, clean)
Expand Down

0 comments on commit 43b6daa

Please sign in to comment.