Bug 1808667 - Set pipewire flag in CreateDesktopCaptureOptions instead of in libwebrtc. r=ng

This restores the default value of the flag to verbatim libwebrtc code, and adds
a pref so it can be toggled off.

Differential Revision: https://phabricator.services.mozilla.com/D166036
This commit is contained in:
Andreas Pehrson 2023-01-11 16:27:09 +00:00
parent 3b23818135
commit 310a2c2e29
3 changed files with 14 additions and 1 deletions

View File

@ -344,6 +344,12 @@ static DesktopCaptureOptions CreateDesktopCaptureOptions() {
}
#endif
#if defined(WEBRTC_USE_PIPEWIRE)
if (mozilla::StaticPrefs::media_webrtc_capture_allow_pipewire()) {
options.set_allow_pipewire(true);
}
#endif
return options;
}

View File

@ -10547,6 +10547,13 @@
value: true
mirror: always
#if defined(MOZ_WIDGET_GTK)
- name: media.webrtc.capture.allow-pipewire
type: RelaxedAtomicBool
value: true
mirror: always
#endif
- name: media.block-autoplay-until-in-foreground
type: bool
#if !defined(MOZ_WIDGET_ANDROID)

View File

@ -233,7 +233,7 @@ class RTC_EXPORT DesktopCaptureOptions {
bool disable_effects_ = true;
bool detect_updated_region_ = false;
#if defined(WEBRTC_USE_PIPEWIRE)
bool allow_pipewire_ = true;
bool allow_pipewire_ = false;
uint32_t width_ = 0;
uint32_t height_ = 0;
#endif