Bug 1530715 - P3: Build cubeb-coreaudio-rs in libcubeb. r=kinetik

Differential Revision: https://phabricator.services.mozilla.com/D23432

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chun-Min Chang 2019-07-10 08:06:12 +00:00
Родитель f6d72027f3
Коммит 0561641171
7 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -60,6 +60,8 @@ if CONFIG['OS_TARGET'] == 'Darwin':
'cubeb_osx_run_loop.c',
]
DEFINES['USE_AUDIOUNIT'] = True
if CONFIG['MOZ_AUDIOUNIT_RUST']:
DEFINES['USE_AUDIOUNIT_RUST'] = True
if CONFIG['OS_TARGET'] == 'WINNT':
SOURCES += [

Просмотреть файл

@ -10,6 +10,7 @@ bindgen = ["gkrust-shared/bindgen"]
servo = ["gkrust-shared/servo"]
quantum_render = ["gkrust-shared/quantum_render"]
cubeb-remoting = ["gkrust-shared/cubeb-remoting"]
cubeb_coreaudio_rust = ["gkrust-shared/cubeb_coreaudio_rust"]
cubeb_pulse_rust = ["gkrust-shared/cubeb_pulse_rust"]
gecko_debug = ["gkrust-shared/gecko_debug"]
gecko_refcount_logging = ["gkrust-shared/gecko_refcount_logging"]

Просмотреть файл

@ -12,6 +12,7 @@ quantum_render = ["gkrust-shared/quantum_render"]
webrender_debugger = ["gkrust-shared/webrender_debugger"]
cubeb-remoting = ["gkrust-shared/cubeb-remoting"]
cubeb_pulse_rust = ["gkrust-shared/cubeb_pulse_rust"]
cubeb_coreaudio_rust = ["gkrust-shared/cubeb_coreaudio_rust"]
gecko_debug = ["gkrust-shared/gecko_debug"]
gecko_refcount_logging = ["gkrust-shared/gecko_refcount_logging"]
simd-accel = ["gkrust-shared/simd-accel"]

Просмотреть файл

@ -19,6 +19,9 @@ if CONFIG['MOZ_WEBRENDER_DEBUGGER']:
if CONFIG['MOZ_PULSEAUDIO']:
gkrust_features += ['cubeb_pulse_rust']
if CONFIG['MOZ_AUDIOUNIT_RUST']:
gkrust_features += ['cubeb_coreaudio_rust']
if CONFIG['MOZ_RUST_SIMD']:
gkrust_features += ['simd-accel']

Просмотреть файл

@ -18,6 +18,7 @@ prefs_parser = { path = "../../../../modules/libpref/parser" }
profiler_helper = { path = "../../../../tools/profiler/rust-helper", optional = true }
mozurl = { path = "../../../../netwerk/base/mozurl" }
webrender_bindings = { path = "../../../../gfx/webrender_bindings", optional = true }
cubeb-coreaudio = { path = "../../../../media/libcubeb/cubeb-coreaudio-rs", optional = true }
cubeb-pulse = { path = "../../../../media/libcubeb/cubeb-pulse-rs", optional = true, features=["pulse-dlopen"] }
cubeb-sys = { version = "0.5.0", optional = true, features=["gecko-in-tree"] }
encoding_c = "0.9.0"
@ -51,6 +52,7 @@ servo = ["geckoservo"]
quantum_render = ["webrender_bindings"]
webrender_debugger = ["webrender_bindings/webrender_debugger"]
cubeb-remoting = ["cubeb-sys", "audioipc-client", "audioipc-server"]
cubeb_coreaudio_rust = ["cubeb-sys", "cubeb-coreaudio"]
cubeb_pulse_rust = ["cubeb-sys", "cubeb-pulse"]
gecko_debug = ["geckoservo/gecko_debug", "nsstring/gecko_debug"]
gecko_refcount_logging = ["geckoservo/gecko_refcount_logging"]

Просмотреть файл

@ -19,6 +19,8 @@ extern crate profiler_helper;
extern crate mozurl;
#[cfg(feature = "quantum_render")]
extern crate webrender_bindings;
#[cfg(feature = "cubeb_coreaudio_rust")]
extern crate cubeb_coreaudio;
#[cfg(feature = "cubeb_pulse_rust")]
extern crate cubeb_pulse;
extern crate encoding_c;

Просмотреть файл

@ -153,6 +153,15 @@ pulseaudio = pkg_check_modules('MOZ_PULSEAUDIO', 'libpulse', when='--enable-puls
set_config('MOZ_PULSEAUDIO', depends_if(pulseaudio)(lambda _: True))
set_define('MOZ_PULSEAUDIO', depends_if(pulseaudio)(lambda _: True))
# AudioUnit cubeb Rust backend
# ==============================================================
@depends(target)
def enable_audiounit_rust(target):
return target.os == 'OSX' and target.kernel == 'Darwin'
set_config('MOZ_AUDIOUNIT_RUST', True, when=enable_audiounit_rust)
set_define('MOZ_AUDIOUNIT_RUST', True, when=enable_audiounit_rust)
# Javascript engine
# ==============================================================
include('../js/moz.configure')