diff --git a/src/xpra/client/gtk_base/gtk_tray_menu_base.py b/src/xpra/client/gtk_base/gtk_tray_menu_base.py index 7187844041..9d269ce0c6 100644 --- a/src/xpra/client/gtk_base/gtk_tray_menu_base.py +++ b/src/xpra/client/gtk_base/gtk_tray_menu_base.py @@ -14,7 +14,7 @@ from xpra.gtk_common.gtk_util import set_tooltip_text, CheckMenuItem, ensure_item_selected, menuitem from xpra.client.client_base import EXIT_OK from xpra.client.gtk_base.about import about, close_about -from xpra.codecs.loader import PREFERED_ENCODING_ORDER, ENCODINGS_HELP, ENCODINGS_TO_NAME, HIDDEN_ENCODINGS +from xpra.codecs.loader import PREFERED_ENCODING_ORDER, ENCODINGS_HELP, ENCODINGS_TO_NAME from xpra.log import Logger log = Logger("tray") @@ -544,7 +544,7 @@ def set_encodingsmenuitem(*args): def make_encodingssubmenu(self, handshake_complete=True): all_encodings = [x for x in PREFERED_ENCODING_ORDER if x in self.client.get_encodings()] - encodings = [x for x in all_encodings if x not in HIDDEN_ENCODINGS] + encodings = [x for x in all_encodings if x not in self.client.server_encodings_problematic] if not encodings: #all we have, show the "bad" hidden ones then! encodings = all_encodings diff --git a/src/xpra/client/ui_client_base.py b/src/xpra/client/ui_client_base.py index 61bd528b05..7b0f82d53f 100644 --- a/src/xpra/client/ui_client_base.py +++ b/src/xpra/client/ui_client_base.py @@ -32,7 +32,7 @@ from xpra.platform.features import MMAP_SUPPORTED, SYSTEM_TRAY_SUPPORTED, CLIPBOARD_WANT_TARGETS, CLIPBOARD_GREEDY, CLIPBOARDS from xpra.platform.gui import init as gui_init, ready as gui_ready, get_native_notifier_classes, get_native_tray_classes, get_native_system_tray_classes, get_native_tray_menu_helper_classes, ClientExtras from xpra.codecs.codec_constants import get_PIL_decodings -from xpra.codecs.loader import codec_versions, has_codec, get_codec, PREFERED_ENCODING_ORDER, ALL_NEW_ENCODING_NAMES_TO_OLD, OLD_ENCODING_NAMES_TO_NEW +from xpra.codecs.loader import codec_versions, has_codec, get_codec, PREFERED_ENCODING_ORDER, ALL_NEW_ENCODING_NAMES_TO_OLD, OLD_ENCODING_NAMES_TO_NEW, PROBLEMATIC_ENCODINGS from xpra.codecs.video_helper import getVideoHelper, NO_GFX_CSC_OPTIONS from xpra.simple_stats import std_unit from xpra.net import compression, packet_encoding @@ -166,6 +166,7 @@ def __init__(self): self.server_generic_encodings = False self.server_encodings = [] self.server_core_encodings = [] + self.server_encodings_problematic = PROBLEMATIC_ENCODINGS self.server_encodings_with_speed = () self.server_encodings_with_quality = () self.server_encodings_with_lossless = () @@ -1200,6 +1201,7 @@ def getenclist(k, default_value=[]): self.server_generic_encodings = c.boolget("encoding.generic") self.server_encodings = getenclist("encodings") self.server_core_encodings = getenclist("encodings.core", self.server_encodings) + self.server_encodings_problematic = getenclist("encodings.problematic", PROBLEMATIC_ENCODINGS) #server is telling us to try to avoid those self.server_encodings_with_speed = getenclist("encodings.with_speed", ("h264",)) #old servers only supported x264 self.server_encodings_with_quality = getenclist("encodings.with_quality", ("jpeg", "webp", "h264")) self.server_encodings_with_lossless_mode = getenclist("encodings.with_lossless_mode", ()) diff --git a/src/xpra/codecs/loader.py b/src/xpra/codecs/loader.py index 2128bee0cc..0e182d016b 100755 --- a/src/xpra/codecs/loader.py +++ b/src/xpra/codecs/loader.py @@ -204,8 +204,8 @@ def has_codec(name): HELP_ORDER = ("h264", "h265", "vp8", "vp9", "png", "png/P", "png/L", "webp", "rgb", "jpeg") -#those are so useless that we don't want the user to select them by mistake -HIDDEN_ENCODINGS = ("h265", "vp9") +#those are currently so useless that we don't want the user to select them by mistake +PROBLEMATIC_ENCODINGS = ("h265", "vp9") def encodings_help(encodings): diff --git a/src/xpra/server/server_base.py b/src/xpra/server/server_base.py index 09718f21d2..708bf95ed9 100644 --- a/src/xpra/server/server_base.py +++ b/src/xpra/server/server_base.py @@ -21,7 +21,7 @@ from xpra.os_util import thread, get_hex_uuid from xpra.util import typedict, updict, log_screen_sizes, SERVER_EXIT, SERVER_SHUTDOWN, CLIENT_REQUEST, DETACH_REQUEST, NEW_CLIENT, DONE from xpra.scripts.config import python_platform -from xpra.codecs.loader import PREFERED_ENCODING_ORDER, codec_versions, has_codec, get_codec +from xpra.codecs.loader import PREFERED_ENCODING_ORDER, PROBLEMATIC_ENCODINGS, codec_versions, has_codec, get_codec from xpra.codecs.codec_constants import get_PIL_encodings from xpra.codecs.video_helper import getVideoHelper, ALL_VIDEO_ENCODER_OPTIONS, ALL_CSC_MODULE_OPTIONS if sys.version > '3': @@ -1064,6 +1064,7 @@ def get_encoding_info(self): "core" : self.core_encodings, "allowed" : self.allowed_encodings, "lossless" : self.lossless_encodings, + "problematic" : [x for x in self.core_encodings if x in PROBLEMATIC_ENCODINGS], "with_speed" : [x for x in self.core_encodings if x in ("h264", "vp8", "vp9", "rgb", "png", "png/P", "png/L")], "with_quality" : [x for x in self.core_encodings if x in ("jpeg", "webp", "h264", "vp8", "vp9")], "with_lossless_mode" : self.lossless_mode_encodings}