Skip to content

Commit

Permalink
#400 (and #669) sound tweaks:
Browse files Browse the repository at this point in the history
* better error message format
* ignore tag message 'container-format' we get with FLAC
* reduce min queue time to 50ms by default
* allow all codecs to be used (the error I was seeing is gone)

git-svn-id: https://xpra.org/svn/Xpra/trunk@8870 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 30, 2015
1 parent 55a6534 commit 11439e7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ def start_receiving_sound(self):
matching_codecs = [x for x in self.server_sound_encoders if x in self.speaker_codecs]
ordered_codecs = [x for x in CODEC_ORDER if x in matching_codecs]
if len(ordered_codecs)==0:
log.error("no matching codecs between server (%s) and client (%s)", self.server_sound_encoders, self.speaker_codecs)
log.error("no matching codecs between server (%s) and client (%s)", ",".join(self.server_sound_encoders), ",".join(self.speaker_codecs))
return
codec = ordered_codecs[0]
self.speaker_enabled = True
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/sound/gstreamer_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def get_queue_time(default_value=450, prefix=""):
]
CODECS = {}

#CODEC_ORDER = [MP3, WAVPACK, WAV, FLAC, SPEEX]
CODEC_ORDER = [MP3, FLAC, SPEEX]
CODEC_ORDER = [MP3, WAVPACK, WAV, FLAC, SPEEX]
#CODEC_ORDER = [MP3, FLAC, SPEEX]


#code to temporarily redirect stderr and restore it afterwards, adapted from:
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/sound/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
DEFAULT_SINK = SINKS[0]
QUEUE_SILENT = 0
QUEUE_TIME = get_queue_time(450)
QUEUE_MIN_TIME = get_queue_time(QUEUE_TIME//4//MS_TO_NS, "MIN")
QUEUE_MIN_TIME = get_queue_time(QUEUE_TIME//10//MS_TO_NS, "MIN")
assert QUEUE_MIN_TIME<=QUEUE_TIME

VARIABLE_MIN_QUEUE = os.environ.get("XPRA_VARIABLE_MIN_QUEUE", "1")=="1"
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/sound/sound_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def parse_message0(self, message):
found = True
if not found:
#these, we know about, so we just log them:
for x in ("minimum-bitrate", "maximum-bitrate", "channel-mode"):
for x in ("minimum-bitrate", "maximum-bitrate", "channel-mode", "container-format"):
if structure.has_field(x):
v = structure[x]
log("tag message: %s = %s", x, v)
Expand Down

0 comments on commit 11439e7

Please sign in to comment.