Bug 1407487 - P1: Remove --enable-cubeb-remoting. r?kinetik, rillian
Replace with conditional compilation enabled for Linux targets.
MozReview-Commit-ID: GjD0Ix8aeJW
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -43,16 +43,20 @@
#define MASK_3F1_LFE (MASK_3F1 | (1 << AudioConfig::CHANNEL_LFE))
#define MASK_2F2 (MASK_STEREO | (1 << AudioConfig::CHANNEL_LS) | (1 << AudioConfig::CHANNEL_RS))
#define MASK_2F2_LFE (MASK_2F2 | (1 << AudioConfig::CHANNEL_LFE))
#define MASK_3F2 (MASK_3F | (1 << AudioConfig::CHANNEL_LS) | (1 << AudioConfig::CHANNEL_RS))
#define MASK_3F2_LFE (MASK_3F2 | (1 << AudioConfig::CHANNEL_LFE))
#define MASK_3F3R_LFE (MASK_3F2_LFE | (1 << AudioConfig::CHANNEL_RCENTER))
#define MASK_3F4_LFE (MASK_3F2_LFE | (1 << AudioConfig::CHANNEL_RLS) | (1 << AudioConfig::CHANNEL_RRS))
+#ifdef XP_LINUX
+#define MOZ_CUBEB_REMOTING
+#endif
+
extern "C" {
// These functions are provided by audioipc-server crate
extern void* audioipc_server_start();
extern void audioipc_server_stop(void*);
// These functions are provided by audioipc-client crate
extern int audioipc_client_init(cubeb**, const char*);
}
--- a/dom/media/MediaPrefs.h
+++ b/dom/media/MediaPrefs.h
@@ -201,19 +201,18 @@ private:
// Error/warning handling, Decoder Doctor
DECL_MEDIA_PREF("media.playback.warnings-as-errors", MediaWarningsAsErrors, bool, false);
DECL_MEDIA_PREF("media.playback.warnings-as-errors.stagefright-vs-rust",
MediaWarningsAsErrorsStageFrightVsRust, bool, false);
// resume background video decoding when the cursor is hovering over the tab.
DECL_MEDIA_PREF("media.resume-bkgnd-video-on-tabhover", ResumeVideoDecodingOnTabHover, bool, false);
-#ifdef MOZ_CUBEB_REMOTING
+ // Enable sandboxing support for cubeb
DECL_MEDIA_PREF("media.cubeb.sandbox", CubebSandbox, bool, false);
-#endif // MOZ_CUBEB_REMOTING
DECL_MEDIA_PREF("media.videocontrols.lock-video-orientation", VideoOrientationLockEnabled, bool, false);
public:
// Manage the singleton:
static MediaPrefs& GetSingleton();
static bool SingletonExists();
private:
--- a/toolkit/library/rust/gkrust-features.mozbuild
+++ b/toolkit/library/rust/gkrust-features.mozbuild
@@ -18,12 +18,14 @@ if CONFIG['MOZ_BUILD_WEBRENDER']:
gkrust_features += ['quantum_render']
if CONFIG['MOZ_PULSEAUDIO']:
gkrust_features += ['cubeb_pulse_rust']
if CONFIG['MOZ_RUST_SIMD']:
gkrust_features += ['simd-accel']
-if CONFIG['MOZ_CUBEB_REMOTING']:
+# This feature is only supported on Linux and this check needs to
+# match XP_LINUX.
+if CONFIG['OS_ARCH'] == 'Linux':
gkrust_features += ['cubeb-remoting']
gkrust_features += ['no-static-ideograph-encoder-tables']
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1139,30 +1139,16 @@ def geckodriver(enable, automation, comp
linux32 = target.kernel == 'Linux' and target.cpu == 'x86'
broken_platforms = cross_compile or linux32 or hazard
if automation and compile_env and not broken_platforms:
return True
set_config('ENABLE_GECKODRIVER', geckodriver)
-# Cubeb Audio Remoting
-# ==============================================================
-
-option('--enable-cubeb-remoting', env='MOZ_CUBEB_REMOTING',
- help='Enable cubeb audio remoting')
-
-@depends('--enable-cubeb-remoting')
-def cubeb_remoting(value):
- if value:
- return True
-
-set_config('MOZ_CUBEB_REMOTING', cubeb_remoting)
-set_define('MOZ_CUBEB_REMOTING', cubeb_remoting)
-
# WebRTC
# ========================================================
@depends(target)
def webrtc_default(target):
# Turn off webrtc for OS's we don't handle yet, but allow
# --enable-webrtc to override.
os_match = False
for os_fragment in ('linux', 'mingw', 'android', 'linuxandroid',