Skip to content

Commit

Permalink
fix sound source with shadow servers that need an audioconvert (win32…
Browse files Browse the repository at this point in the history
… and osx)

git-svn-id: https://xpra.org/svn/Xpra/trunk@11714 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 21, 2016
1 parent c7b8795 commit b80d029
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/xpra/sound/gstreamer_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def force_enabled(codec_name):

#these encoders require an "audioconvert" element:
ENCODER_NEEDS_AUDIOCONVERT = ("flacenc", "wavpackenc")
#if this is lightweight enough, maybe we should include it unconditionally?
SOURCE_NEEDS_AUDIOCONVERT = ("directsoundsrc", "osxaudiosrc", "autoaudiosrc")

#options we use to tune for low latency:
OGG_DELAY = 20*MS_TO_NS
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/sound/src.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from xpra.sound.sound_pipeline import SoundPipeline
from xpra.gtk_common.gobject_util import n_arg_signal, gobject
from xpra.sound.gstreamer_util import get_source_plugins, plugin_str, get_encoder_formatter, get_encoder_default_options, normv, get_codecs, get_gst_version, get_queue_time, \
MP3, CODEC_ORDER, MUXER_DEFAULT_OPTIONS, ENCODER_NEEDS_AUDIOCONVERT, MS_TO_NS, GST_QUEUE_LEAK_DOWNSTREAM
MP3, CODEC_ORDER, MUXER_DEFAULT_OPTIONS, ENCODER_NEEDS_AUDIOCONVERT, SOURCE_NEEDS_AUDIOCONVERT, MS_TO_NS, GST_QUEUE_LEAK_DOWNSTREAM
from xpra.scripts.config import InitExit
from xpra.log import Logger
log = Logger("sound")
Expand Down Expand Up @@ -79,7 +79,7 @@ def __init__(self, src_type=None, src_options={}, codecs=get_codecs(), codec_opt
"leaky=%s" % GST_QUEUE_LEAK_DOWNSTREAM,
"silent=1"]
pipeline_els += [" ".join(queue_el)]
if encoder in ENCODER_NEEDS_AUDIOCONVERT:
if encoder in ENCODER_NEEDS_AUDIOCONVERT or src_type in SOURCE_NEEDS_AUDIOCONVERT:
pipeline_els += ["audioconvert"]
pipeline_els.append("volume name=volume volume=%s" % volume)
pipeline_els += [encoder_str,
Expand Down

0 comments on commit b80d029

Please sign in to comment.