xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #849: sound-gstreamer1-as-default.patch

File sound-gstreamer1-as-default.patch, 2.0 KB (added by Antoine Martin, 6 years ago)

makes gstreamer1 the default on platforms where we can easily use it (not osx or win32), pending because it causes problems with exe and log files on win32...

  • scripts/xpra

     
    11#!/usr/bin/env python
    22
    3 from xpra.platform import init
    4 init("Xpra")
    5 
    63import sys
    74from xpra.scripts.main import main
    85sys.exit(main(sys.argv[0], sys.argv))
  • xpra/scripts/main.py

     
    101101
    102102
    103103def main(script_file, cmdline):
    104     from xpra.platform import init as platform_init, clean as platform_clean, command_error, command_info, get_main_fallback
     104    from xpra.platform import clean as platform_clean, command_error, command_info, get_main_fallback
    105105    if len(cmdline)==1:
    106106        fm = get_main_fallback()
    107107        if fm:
     
    108108            return fm()
    109109
    110110    try:
    111         platform_init("Xpra")
    112111        try:
    113112            defaults = make_defaults_struct()
    114113            fixup_defaults(defaults)
     
    864863            prevent_import()
    865864        except:
    866865            pass
     866        from xpra.platform import init
     867        init("Xpra")
    867868
    868869    try:
    869870        ssh_display = len(args)>0 and (args[0].startswith("ssh/") or args[0].startswith("ssh:"))
  • xpra/sound/gstreamer_util.py

     
    2828
    2929
    3030ALLOW_SOUND_LOOP = os.environ.get("XPRA_ALLOW_SOUND_LOOP", "0")=="1"
    31 GSTREAMER1 = os.environ.get("XPRA_GSTREAMER1", "0")=="1"
     31DEFAULT_GSTREAMER1 = not sys.platform.startswith("win") and not sys.platform.startswith("darwin")
     32GSTREAMER1 = os.environ.get("XPRA_GSTREAMER1", str(int(DEFAULT_GSTREAMER1)))=="1"
    3233MONITOR_DEVICE_NAME = os.environ.get("XPRA_MONITOR_DEVICE_NAME", "")
    3334def force_enabled(codec_name):
    3435    return os.environ.get("XPRA_SOUND_CODEC_ENABLE_%s" % codec_name.upper(), "0")=="1"