From 24442c21f86139b6bb640216acdac2b9ed37af98 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 24 Aug 2016 05:35:32 +0000 Subject: [PATCH] #1276 / #1075: remove all gdp options git-svn-id: https://xpra.org/svn/Xpra/trunk@13451 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/client/ui_client_base.py | 10 ---------- src/xpra/sound/common.py | 10 ---------- src/xpra/sound/gstreamer_util.py | 32 ++++++------------------------- 3 files changed, 6 insertions(+), 46 deletions(-) diff --git a/src/xpra/client/ui_client_base.py b/src/xpra/client/ui_client_base.py index b874a2277a..bde045e8cb 100644 --- a/src/xpra/client/ui_client_base.py +++ b/src/xpra/client/ui_client_base.py @@ -216,7 +216,6 @@ def __init__(self): self.sound_out_bytecount = 0 self.server_pulseaudio_id = None self.server_pulseaudio_server = None - self.server_gstreamer_version = None self.server_sound_decoders = [] self.server_sound_encoders = [] self.server_sound_receive = False @@ -1891,7 +1890,6 @@ def process_ui_capabilities(self): from xpra.sound.common import legacy_to_new self.server_sound_decoders = legacy_to_new(c.strlistget("sound.decoders", [])) self.server_sound_encoders = legacy_to_new(c.strlistget("sound.encoders", [])) - self.server_gstreamer_version = c.strlistget("sound.gst.version") except: soundlog("cannot parse server sound codecs", exc_info=True) self.server_codec_full_names = c.boolget("codec-full-names") @@ -2255,14 +2253,6 @@ def send_webcam_frame(self): def get_matching_codecs(self, local_codecs, server_codecs): matching_codecs = [x for x in local_codecs if x in server_codecs] - #gdp has compatibility issues from one version to another.. - gstreamer_version = self.sound_properties.get("gst.version") - soundlog("local gstreamer version=%s, server version=%s", gstreamer_version, self.server_gstreamer_version) - try: - assert gstreamer_version[:2]==self.server_gstreamer_version[:2] - except Exception as e: - soundlog("incompatible gstreamer versions: %s", e) - matching_codecs = [x for x in matching_codecs if x.lower().find("gdp")<0] soundlog("get_matching_codecs(%s, %s)=%s", local_codecs, server_codecs, matching_codecs) return matching_codecs diff --git a/src/xpra/sound/common.py b/src/xpra/sound/common.py index 0756788053..60b20f807b 100755 --- a/src/xpra/sound/common.py +++ b/src/xpra/sound/common.py @@ -19,7 +19,6 @@ SPEEX = "speex" WAVPACK = "wavpack" -GDP = "gdp" OGG = "ogg" MKA = "mka" MPEG4 = "mpeg4" @@ -30,31 +29,22 @@ LZ4 = "lz4" LZO = "lzo" -FLAC_GDP = FLAC+"+"+GDP FLAC_OGG = FLAC+"+"+OGG -OPUS_GDP = OPUS+"+"+GDP OPUS_OGG = OPUS+"+"+OGG -SPEEX_GDP = SPEEX+"+"+GDP SPEEX_OGG = SPEEX+"+"+OGG VORBIS_OGG = VORBIS+"+"+OGG -VORBIS_GDP = VORBIS+"+"+GDP #OPUS_WEBM = OPUS+"+"+WEBM #OPUS_RTP = OPUS+"+"+RTP VORBIS_MKA = VORBIS+"+"+MKA -AAC_GDP = AAC+"+"+GDP AAC_MPEG4 = AAC+"+"+MPEG4 -RAW_GDP = RAW+"+"+GDP WAV_LZ4 = WAV+"+"+LZ4 WAV_LZO = WAV+"+"+LZO -RAW_GDP_LZ4 = RAW+"+"+GDP+"+"+LZ4 -RAW_GDP_LZO = RAW+"+"+GDP+"+"+LZO #when codecs were first added, there was no support for multiple muxers, #but now there is... #since it makes sense to use the full specification including the muxer in the codec name, #this maps it back to the original names LEGACY_CODEC_NAMES = { - VORBIS_GDP : VORBIS, FLAC_OGG : FLAC, OPUS_OGG : OPUS, SPEEX_OGG : SPEEX, diff --git a/src/xpra/sound/gstreamer_util.py b/src/xpra/sound/gstreamer_util.py index 6454a259a7..1685d7a784 100755 --- a/src/xpra/sound/gstreamer_util.py +++ b/src/xpra/sound/gstreamer_util.py @@ -7,10 +7,10 @@ import sys import os -from xpra.sound.common import FLAC_GDP, FLAC_OGG, OPUS_GDP, OPUS_OGG, SPEEX_GDP, SPEEX_OGG, VORBIS_OGG, VORBIS_GDP, VORBIS_MKA, \ - AAC_GDP, AAC_MPEG4, RAW_GDP, WAV_LZ4, WAV_LZO, RAW_GDP_LZ4, RAW_GDP_LZO, \ +from xpra.sound.common import FLAC_OGG, OPUS_OGG, SPEEX_OGG, VORBIS_OGG, VORBIS_MKA, \ + AAC_MPEG4, WAV_LZ4, WAV_LZO, \ VORBIS, FLAC, MP3, OPUS, SPEEX, WAV, WAVPACK, \ - MPEG4, GDP, MKA, OGG + MPEG4, MKA, OGG from xpra.util import csv, engs, parse_simple_dict from xpra.log import Logger @@ -89,7 +89,6 @@ def force_enabled(codec_name): #we keep multiple options here for the same encoding #and will populate the ones that are actually available into the "CODECS" dict CODEC_OPTIONS = [ - (VORBIS_GDP , "vorbisenc", "gdppay", "vorbisdec", "gdpdepay", None), (VORBIS_MKA , "vorbisenc", "webmmux", "vorbisdec", "matroskademux", None), #fails silently - no idea why: #(VORBIS_OGG , "vorbisenc", "oggmux", "vorbisparse ! vorbisdec", "oggdemux"), @@ -97,14 +96,12 @@ def force_enabled(codec_name): #(FLAC , "flacenc", "oggmux", "flacparse ! flacdec", "oggdemux"), #this only works in gstreamer 0.10 and is filtered out during initialization: (FLAC_OGG , "flacenc", "oggmux", "flacdec", "oggdemux", None), - (FLAC_GDP , "flacenc", "gdppay", "flacparse ! flacdec", "gdpdepay", None), (MP3 , "lamemp3enc", None, "mp3parse ! mad", None, None), (MP3 , "lamemp3enc", None, "mpegaudioparse ! mad", None, None), (WAV , "wavenc", None, "wavparse", None, None), (WAV_LZ4 , "wavenc", None, "wavparse", None, "lz4"), (WAV_LZO , "wavenc", None, "wavparse", None, "lzo"), (OPUS_OGG , "opusenc", "oggmux", "opusdec", "oggdemux", None), - (OPUS_GDP , "opusenc", "gdppay", "opusdec", "gdpdepay", None), #for rtp, we would need to send the caps: #(OPUS_RTP , "opusenc", "rtpopuspay", "opusdec", "rtpopusdepay"), #(OPUS_RTP , "opusenc", "rtpopuspay", "opusparse ! opusdec", "rtpopusdepay"), @@ -112,19 +109,12 @@ def force_enabled(codec_name): #(OPUS_WEBM , "opusenc", "webmmux", "opusdec", "matroskademux"), #(OPUS_WEBM , "opusenc", "webmmux", "opusparse ! opusdec", "matroskademux"), (SPEEX_OGG , "speexenc", "oggmux", "speexdec", "oggdemux", None), - (SPEEX_GDP , "speexenc", "gdppay", "speexdec", "gdpdepay", None), (WAVPACK , "wavpackenc", None, "wavpackparse ! wavpackdec", None, None), - (AAC_GDP , "faac", "gdppay", "faad", "gdpdepay", None), - (AAC_GDP , "avenc_aac", "gdppay", "avdec_aac", "gdpdepay", None), (AAC_MPEG4 , "faac", "mp4mux", "faad", "qtdemux", None), (AAC_MPEG4 , "avenc_aac", "mp4mux", "avdec_aac", "qtdemux", None), - (RAW_GDP , None, "gdppay", None, "gdpdepay", None), - (RAW_GDP_LZ4, None, "gdppay", None, "gdpdepay", "lz4"), - (RAW_GDP_LZO, None, "gdppay", None, "gdpdepay", "lzo"), ] MUX_OPTIONS = [ - (GDP, "gdppay", "gdpdepay"), (OGG, "oggmux", "oggdemux"), (MKA, "webmmux", "matroskademux"), (MPEG4, "mp4mux", "qtdemux"), @@ -173,14 +163,10 @@ def force_enabled(codec_name): }, } #we may want to review this if/when we implement UDP transport: -GDPPAY_CRC = False MUXER_DEFAULT_OPTIONS = { "oggmux" : {"max-delay" : OGG_DELAY, "max-page-delay" : OGG_DELAY, }, - "gdppay" : {"crc-header" : int(GDPPAY_CRC), - "crc-payload" : int(GDPPAY_CRC), - }, "webmmux" : {"writing-app" : "Xpra"}, "mp4mux" : { "faststart" : 1, @@ -197,16 +183,13 @@ def force_enabled(codec_name): VORBIS_MKA : 0, MP3 : 250, FLAC : 50, - FLAC_GDP : 50, WAV : 0, WAVPACK : 600, OPUS : 0, - OPUS_GDP : 0, SPEEX : 0, - SPEEX_GDP : 0, } -CODEC_ORDER = [OPUS_OGG, VORBIS_MKA, FLAC_OGG, MP3, AAC_MPEG4, WAV_LZ4, WAV_LZO, WAV, WAVPACK, SPEEX_OGG, OPUS_GDP, VORBIS_GDP, FLAC_GDP, SPEEX_GDP, AAC_GDP, RAW_GDP_LZ4, RAW_GDP_LZO, RAW_GDP] +CODEC_ORDER = [OPUS_OGG, VORBIS_MKA, FLAC_OGG, MP3, AAC_MPEG4, WAV_LZ4, WAV_LZO, WAV, WAVPACK, SPEEX_OGG] gst = None @@ -472,10 +455,7 @@ def add_encoder(encoding, encoder, payloader, stream_compressor): global ENCODERS if encoding in ENCODERS: return - if WIN32 and encoding in (OPUS_GDP, ): - log("avoiding %s on win32", encoding) - return - if OSX and encoding in (OPUS_GDP, OPUS_OGG): + if OSX and encoding in (OPUS_OGG, ): log("avoiding %s on Mac OS X", encoding) return if has_plugins(encoder, payloader): @@ -515,7 +495,7 @@ def validate_encoding(elements): elif encoding==FLAC_OGG: log("skipping %s to avoid obscure 'not-negotiated' errors", encoding) return False - elif WIN32 and encoding in (AAC_GDP, SPEEX_GDP, SPEEX_OGG): + elif WIN32 and encoding in (SPEEX_OGG, ): log("skipping %s on win32", encoding) return False elif encoding.startswith(OPUS):