зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c25c591841cd (bug 1351378) for causing multiple failures. CLOSED TREE
This commit is contained in:
Родитель
6c42eedf49
Коммит
866f261a7d
|
@ -766,6 +766,7 @@ system_headers = [
|
|||
'SIOUX.h',
|
||||
'size_t.h',
|
||||
'smime.h',
|
||||
'sndio.h',
|
||||
'someincludefile.h',
|
||||
'soundcard.h',
|
||||
'Sound.h',
|
||||
|
@ -1243,11 +1244,6 @@ if CONFIG['MOZ_JACK']:
|
|||
'jack/statistics.h',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_SNDIO']:
|
||||
system_headers += [
|
||||
'sndio.h',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_JPEG']:
|
||||
system_headers += [
|
||||
'jpeglib.h',
|
||||
|
|
|
@ -40,21 +40,20 @@ if CONFIG['MOZ_JACK']:
|
|||
]
|
||||
DEFINES['USE_JACK'] = True
|
||||
|
||||
if CONFIG['MOZ_OSS']:
|
||||
if CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD', 'SunOS'):
|
||||
SOURCES += [
|
||||
'cubeb_oss.c',
|
||||
]
|
||||
DEFINES['USE_OSS'] = True
|
||||
|
||||
if CONFIG['MOZ_SNDIO']:
|
||||
if CONFIG['OS_ARCH'] == 'OpenBSD':
|
||||
SOURCES += [
|
||||
'cubeb_sndio.c',
|
||||
]
|
||||
DEFINES['USE_SNDIO'] = True
|
||||
if CONFIG['OS_ARCH'] == 'OpenBSD':
|
||||
DEFINES['DISABLE_LIBSNDIO_DLOPEN'] = True
|
||||
DEFINES['DISABLE_LIBSNDIO_DLOPEN'] = True
|
||||
|
||||
if CONFIG['MOZ_AUDIOUNIT'] or CONFIG['MOZ_AUDIOUNIT_RUST']:
|
||||
if CONFIG['OS_TARGET'] == 'Darwin':
|
||||
SOURCES += [
|
||||
'cubeb_audiounit.cpp',
|
||||
'cubeb_resampler.cpp'
|
||||
|
@ -67,7 +66,7 @@ if CONFIG['MOZ_AUDIOUNIT'] or CONFIG['MOZ_AUDIOUNIT_RUST']:
|
|||
if CONFIG['MOZ_AUDIOUNIT_RUST']:
|
||||
DEFINES['USE_AUDIOUNIT_RUST'] = True
|
||||
|
||||
if CONFIG['MOZ_WASAPI']:
|
||||
if CONFIG['OS_TARGET'] == 'WINNT':
|
||||
SOURCES += [
|
||||
'cubeb_resampler.cpp',
|
||||
'cubeb_wasapi.cpp',
|
||||
|
@ -83,17 +82,13 @@ if CONFIG['MOZ_WASAPI']:
|
|||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
CXXFLAGS += ['-Wno-macro-redefined'] # '_USE_MATH_DEFINES' : macro redefinition
|
||||
|
||||
if CONFIG['MOZ_AAUDIO']:
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
SOURCES += ['cubeb_aaudio.cpp']
|
||||
SOURCES += ['cubeb_resampler.cpp']
|
||||
SOURCES += ['cubeb-jni.cpp']
|
||||
DEFINES['USE_AAUDIO'] = True
|
||||
|
||||
if CONFIG['MOZ_OPENSL']:
|
||||
SOURCES += ['cubeb_opensl.c']
|
||||
SOURCES += ['cubeb_resampler.cpp']
|
||||
SOURCES += ['cubeb-jni.cpp']
|
||||
DEFINES['USE_OPENSL'] = True
|
||||
DEFINES['USE_AAUDIO'] = True
|
||||
|
||||
FINAL_LIBRARY = 'gkmedias'
|
||||
|
||||
|
|
|
@ -183,147 +183,6 @@ def midir_support(target, midir_linux_support):
|
|||
|
||||
set_config("MOZ_WEBMIDI_MIDIR_IMPL", midir_support)
|
||||
|
||||
# Enable various cubeb backends
|
||||
# ==============================================================
|
||||
@depends(target)
|
||||
def audio_backends_default(target):
|
||||
if target.os == "Android":
|
||||
return (
|
||||
"aaudio",
|
||||
"opensl",
|
||||
)
|
||||
elif target.os in ("DragonFly", "FreeBSD", "SunOS"):
|
||||
return ("oss",)
|
||||
elif target.os == "OpenBSD":
|
||||
return ("sndio",)
|
||||
elif target.os == "OSX":
|
||||
return ("audiounit",)
|
||||
elif target.os == "WINNT":
|
||||
return ("wasapi",)
|
||||
else:
|
||||
return ("pulseaudio",)
|
||||
|
||||
|
||||
option(
|
||||
"--enable-audio-backends",
|
||||
nargs="+",
|
||||
choices=(
|
||||
"aaudio",
|
||||
"alsa",
|
||||
"audiounit",
|
||||
"jack",
|
||||
"opensl",
|
||||
"oss",
|
||||
"pulseaudio",
|
||||
"sndio",
|
||||
"wasapi",
|
||||
),
|
||||
default=audio_backends_default,
|
||||
help="Enable various cubeb backends",
|
||||
)
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_aaudio(value, target):
|
||||
if "aaudio" in value and target.os != "Android":
|
||||
die("Cannot enable AAudio on %s", target.os)
|
||||
return "aaudio" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_alsa(value, target):
|
||||
if "alsa" in value and target.kernel != "Linux" and target.os != "FreeBSD":
|
||||
die("Cannot enable ALSA on %s", target.os)
|
||||
return "alsa" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_audiounit(value, target):
|
||||
if "audiounit" in value and target.os != "OSX" and target.kernel != "Darwin":
|
||||
die("Cannot enable AudioUnit on %s", target.os)
|
||||
return "audiounit" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_jack(value, target):
|
||||
if (
|
||||
"jack" in value
|
||||
and target.os == "Android"
|
||||
or target.os == "OSX"
|
||||
or target.os == "WINNT"
|
||||
):
|
||||
die("Cannot enable JACK on %s", target.os)
|
||||
return "jack" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_opensl(value, target):
|
||||
if "opensl" in value and target.os != "Android":
|
||||
die("Cannot enable OpenSL on %s", target.os)
|
||||
return "opensl" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_oss(value, target):
|
||||
if (
|
||||
"oss" in value
|
||||
and target.os == "Android"
|
||||
or target.os == "OSX"
|
||||
or target.os == "WINNT"
|
||||
):
|
||||
die("Cannot enable OSS on %s", target.os)
|
||||
return "oss" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_pulseaudio(value, target):
|
||||
if (
|
||||
"pulseaudio" in value
|
||||
and target.os == "Android"
|
||||
or target.os == "OSX"
|
||||
or target.os == "WINNT"
|
||||
):
|
||||
die("Cannot enable PulseAudio on %s", target.os)
|
||||
return "pulseaudio" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_sndio(value, target):
|
||||
if (
|
||||
"sndio" in value
|
||||
and target.os == "Android"
|
||||
or target.os == "OSX"
|
||||
or target.os == "WINNT"
|
||||
):
|
||||
die("Cannot enable sndio on %s", target.os)
|
||||
return "sndio" in value
|
||||
|
||||
|
||||
@depends("--enable-audio-backends", target)
|
||||
def imply_wasapi(value, target):
|
||||
if "wasapi" in value and target.os != "WINNT":
|
||||
die("Cannot enable WASAPI on %s", target.os)
|
||||
return "wasapi" in value
|
||||
|
||||
|
||||
set_config("MOZ_AAUDIO", imply_aaudio, when="--enable-audio-backends")
|
||||
|
||||
imply_option("--enable-alsa", imply_alsa, reason="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_AUDIOUNIT_RUST", imply_audiounit, when="--enable-audio-backends")
|
||||
|
||||
imply_option("--enable-jack", imply_jack, reason="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_OPENSL", imply_opensl, when="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_OSS", imply_oss, when="--enable-audio-backends")
|
||||
|
||||
imply_option("--enable-pulseaudio", imply_pulseaudio, reason="--enable-audio-backends")
|
||||
|
||||
imply_option("--enable-sndio", imply_sndio, reason="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_WASAPI", imply_wasapi, when="--enable-audio-backends")
|
||||
|
||||
# ALSA cubeb backend
|
||||
# ==============================================================
|
||||
option("--enable-alsa", env="MOZ_ALSA", help="Enable ALSA audio backend.")
|
||||
|
@ -337,6 +196,7 @@ def enable_alsa_or_midir_linux_support(alsa_enabled, midir_linux_support):
|
|||
pkg_check_modules("MOZ_ALSA", "alsa", when=enable_alsa_or_midir_linux_support)
|
||||
|
||||
set_config("MOZ_ALSA", True, when="--enable-alsa")
|
||||
set_define("MOZ_ALSA", True, when="--enable-alsa")
|
||||
|
||||
# JACK cubeb backend
|
||||
# ==============================================================
|
||||
|
@ -345,26 +205,36 @@ system_lib_option("--enable-jack", env="MOZ_JACK", help="Enable JACK audio backe
|
|||
jack = pkg_check_modules("MOZ_JACK", "jack", when="--enable-jack")
|
||||
|
||||
set_config("MOZ_JACK", depends_if(jack)(lambda _: True))
|
||||
set_define("MOZ_JACK", depends_if(jack)(lambda _: True))
|
||||
|
||||
# PulseAudio cubeb backend
|
||||
# ==============================================================
|
||||
@depends(target)
|
||||
def pulseaudio_default(target):
|
||||
return target.os not in ("WINNT", "OSX", "Android", "OpenBSD")
|
||||
|
||||
|
||||
option(
|
||||
"--enable-pulseaudio",
|
||||
env="MOZ_PULSEAUDIO",
|
||||
default=pulseaudio_default,
|
||||
help="{Enable|Disable} PulseAudio audio backend.",
|
||||
)
|
||||
|
||||
pulseaudio = pkg_check_modules("MOZ_PULSEAUDIO", "libpulse", when="--enable-pulseaudio")
|
||||
|
||||
set_config("MOZ_PULSEAUDIO", depends_if(pulseaudio)(lambda _: True))
|
||||
set_define("MOZ_PULSEAUDIO", depends_if(pulseaudio)(lambda _: True))
|
||||
|
||||
# sndio cubeb backend
|
||||
# AudioUnit cubeb Rust backend
|
||||
# ==============================================================
|
||||
system_lib_option("--enable-sndio", env="MOZ_SNDIO", help="Enable sndio audio backend.")
|
||||
@depends(target)
|
||||
def enable_audiounit_rust(target):
|
||||
return target.os == "OSX" and target.kernel == "Darwin"
|
||||
|
||||
sndio = pkg_check_modules("MOZ_SNDIO", "sndio", when="--enable-sndio")
|
||||
|
||||
set_config("MOZ_SNDIO", depends_if(sndio)(lambda _: True))
|
||||
set_config("MOZ_AUDIOUNIT_RUST", True, when=enable_audiounit_rust)
|
||||
set_define("MOZ_AUDIOUNIT_RUST", True, when=enable_audiounit_rust)
|
||||
|
||||
# Javascript engine
|
||||
# ==============================================================
|
||||
|
|
Загрузка…
Ссылка в новой задаче