From 29ca6140d2db8f900bade9ec1f410cfdd168df21 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 6 Jul 2020 12:08:48 +0000 Subject: [PATCH] we have to use video if that's all we have (no non video encodings), in 8-bit grayscale mode choose 'png/L', make it easier to distinguish why we went to video_fallback() git-svn-id: https://xpra.org/svn/Xpra/trunk@26896 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/server/window/window_video_source.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/xpra/server/window/window_video_source.py b/src/xpra/server/window/window_video_source.py index b95d471fbd..ada7cb9d0a 100644 --- a/src/xpra/server/window/window_video_source.py +++ b/src/xpra/server/window/window_video_source.py @@ -1123,7 +1123,7 @@ def check_pipeline_score(self, force_reload): if self._mmap and self._mmap_size>0: scorelog("cannot score: mmap enabled") return - if self.content_type=="text": + if self.content_type=="text" and self.non_video_encodings: scorelog("no pipelines for 'text' content-type") return elapsed = monotonic_time()-self._last_pipeline_check @@ -2064,7 +2064,10 @@ def video_fallback(self, image, options, order=None, warn=False): if warn: videolog.warn("using non-video fallback encoding") if self.image_depth==8: - encoding = "png/P" + if self.encoding_is_grayscale(): + encoding = "png/L" + else: + encoding = "png/P" else: encoding = self.get_video_fallback_encoding(order) if not encoding: @@ -2124,9 +2127,12 @@ def do_video_encode(self, encoding, image, options): #scroll encoding has dealt with this image return None - if not self.common_video_encodings or self.image_depth not in (24, 32): + if not self.common_video_encodings: #we have to send using a non-video encoding as that's all we have! return self.video_fallback(image, options) + if self.image_depth not in (24, 32): + #this image depth is not supported for video + return self.video_fallback(image, options) if self.encoding=="grayscale": from xpra.codecs.csc_libyuv.colorspace_converter import argb_to_gray #@UnresolvedImport