tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit daa0543385fb69af5c3830b9f2e7414a724ccb82
parent b72bee702ed0f8dd225251404e870c0a4791a8ee
Author: Dan Baker <dbaker@mozilla.com>
Date:   Wed, 22 Oct 2025 15:51:29 -0600

Bug 1995393 - Vendor libwebrtc from f6aade0ada

Upstream commit: https://webrtc.googlesource.com/src/+/f6aade0adad9ae1bc880c9246e2854a5276045c0
    Separate assignment statements in echo_canceller3

    Two variable assignments had been combined into one statement as they
    were separated by commas, not semicolons. Based on the formatting of
    surrounding code this looks unintentional.

    (While not a logical bug, fixing as this caused a compilation issue in
    one particular internal build configuration)

    Bug: None
    Change-Id: I076209010e012bc59617439523edba637d54bb10
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403186
    Reviewed-by: Per Ã…hgren <peah@webrtc.org>
    Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
    Commit-Queue: Joachim Reiersen <joachimr@meta.com>
    Cr-Commit-Position: refs/heads/main@{#45318}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0100.patch | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
Mthird_party/libwebrtc/moz-patch-stack/s0101.patch | 148++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0102.patch | 946+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
Mthird_party/libwebrtc/moz-patch-stack/s0103.patch | 905++++---------------------------------------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0104.patch | 70+++++++++++++++++++---------------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0105.patch | 46+++++++++++++++++++++++++++-------------------
Mthird_party/libwebrtc/moz-patch-stack/s0106.patch | 48+++++++++++++++++++++---------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0107.patch | 189+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mthird_party/libwebrtc/moz-patch-stack/s0108.patch | 187+++++++++----------------------------------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0109.patch | 57+++++++++++++++++++++++++++++++++++++--------------------
Mthird_party/libwebrtc/moz-patch-stack/s0110.patch | 79++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0111.patch | 64+++++++++++++++++++---------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0112.patch | 41++++++++++++++++++++++-------------------
Mthird_party/libwebrtc/moz-patch-stack/s0113.patch | 39++++++++++++++++++---------------------
Mthird_party/libwebrtc/moz-patch-stack/s0114.patch | 78+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
Mthird_party/libwebrtc/moz-patch-stack/s0115.patch | 77+++++++++++++++++++----------------------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0116.patch | 46+++++++++++++++++++++++++++-------------------
Mthird_party/libwebrtc/moz-patch-stack/s0117.patch | 42++++++++++++++++++------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0118.patch | 83++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
Mthird_party/libwebrtc/moz-patch-stack/s0119.patch | 135+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0120.patch | 101+++++++++++++++++++------------------------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0121.patch | 60++++++++++++++++++++++++++++++++++++------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0122.patch | 73+++++++++++++++++++++++++++++++++++++------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0123.patch | 94++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0124.patch | 102++++++++++++++++++++++++++++++-------------------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0125.patch | 73++++++++++++++++++++++++++++++++++---------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0126.patch | 31+++++++------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0127.patch | 59++++++++++++++++++++++++++++++++++++++++++-----------------
Mthird_party/libwebrtc/moz-patch-stack/s0128.patch | 73+++++++++++++++++++++++++++++++++----------------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0129.patch | 53++++++++++++++++++-----------------------------------
Mthird_party/libwebrtc/moz-patch-stack/s0130.patch | 37++++++++++++++++++-------------------
Dthird_party/libwebrtc/moz-patch-stack/s0131.patch | 22----------------------
33 files changed, 2062 insertions(+), 2086 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-22T21:48:46.465357+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-22T21:51:10.236824+00:00. # base of lastest vendoring -85642b2e08 +f6aade0ada diff --git a/third_party/libwebrtc/moz-patch-stack/s0100.patch b/third_party/libwebrtc/moz-patch-stack/s0100.patch @@ -1,24 +1,68 @@ -From: Randell Jesup <rjesup@mozilla.com> -Date: Tue, 1 Oct 2024 21:28:00 +0000 -Subject: Bug 1922048: fix comma instead of semicolon in libwebrtc AEC code - r=mjf,webrtc-reviewers +From: Michael Froman <mfroman@mozilla.com> +Date: Thu, 10 Oct 2024 13:42:00 +0000 +Subject: Bug 1921707 - libwebrtc preprocessor, .json, .gni, and *.gn changes + r=ng,webrtc-reviewers -Differential Revision: https://phabricator.services.mozilla.com/D224242 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/fd7a2f8d10cf9d6e862b8f8bb8e675f0d9ddb4bf +Differential Revision: https://phabricator.services.mozilla.com/D224076 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/7017edc7cfc880bb19f94115d4f48a8c58920a9b --- - modules/audio_processing/aec3/echo_canceller3.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .gn | 2 +- + media/BUILD.gn | 2 +- + modules/video_coding/BUILD.gn | 2 +- + webrtc.gni | 4 ++-- + 4 files changed, 5 insertions(+), 5 deletions(-) -diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc -index b6752efe73..068a0fd7f4 100644 ---- a/modules/audio_processing/aec3/echo_canceller3.cc -+++ b/modules/audio_processing/aec3/echo_canceller3.cc -@@ -811,7 +811,7 @@ EchoCanceller3::EchoCanceller3( - linear_output_framer_.reset( - new BlockFramer(/*num_bands=*/1, num_capture_channels_)); - linear_output_block_ = -- std::make_unique<Block>(/*num_bands=*/1, num_capture_channels_), -+ std::make_unique<Block>(/*num_bands=*/1, num_capture_channels_); - linear_output_sub_frame_view_ = std::vector<std::vector<ArrayView<float>>>( - 1, std::vector<ArrayView<float>>(num_capture_channels_)); - } +diff --git a/.gn b/.gn +index 851c745732..cdbd705ec2 100644 +--- a/.gn ++++ b/.gn +@@ -18,7 +18,7 @@ script_executable = "python3" + # The secondary source root is a parallel directory tree where + # GN build files are placed when they can not be placed directly + # in the source tree, e.g. for third party source trees. +-secondary_source = "//build/secondary/" ++secondary_source = "//libwebrtc/" + + # These are the targets to skip header checking by default. The files in targets + # matching these patterns (see "gn help label_pattern" for format) will not have +diff --git a/media/BUILD.gn b/media/BUILD.gn +index 0f2341a462..51d055bcf0 100644 +--- a/media/BUILD.gn ++++ b/media/BUILD.gn +@@ -7,7 +7,7 @@ + # be found in the AUTHORS file in the root of the source tree. + + import("//build/config/linux/pkg_config.gni") +-import("//third_party/libaom/options.gni") ++import("//libwebrtc/third_party/libaom/options.gni") + import("../webrtc.gni") + + group("media") { +diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn +index 2ef666d59a..2eddb81fd7 100644 +--- a/modules/video_coding/BUILD.gn ++++ b/modules/video_coding/BUILD.gn +@@ -7,7 +7,7 @@ + # be found in the AUTHORS file in the root of the source tree. + + import("//build/config/linux/pkg_config.gni") +-import("//third_party/libaom/options.gni") ++import("//libwebrtc/third_party/libaom/options.gni") + import("../../webrtc.gni") + + rtc_library("encoded_frame") { +diff --git a/webrtc.gni b/webrtc.gni +index 10cc7468f6..afacae1027 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -487,8 +487,8 @@ all_poison_types = [ + "software_video_codecs", + ] + +-absl_include_config = "//third_party/abseil-cpp:absl_include_config" +-absl_define_config = "//third_party/abseil-cpp:absl_define_config" ++absl_include_config = "//libwebrtc/third_party/abseil-cpp:absl_include_config" ++absl_define_config = "//libwebrtc/third_party/abseil-cpp:absl_define_config" + + # Abseil Flags are testonly, so this config will only be applied to WebRTC targets + # that are testonly. diff --git a/third_party/libwebrtc/moz-patch-stack/s0101.patch b/third_party/libwebrtc/moz-patch-stack/s0101.patch @@ -1,68 +1,100 @@ From: Michael Froman <mfroman@mozilla.com> Date: Thu, 10 Oct 2024 13:42:00 +0000 -Subject: Bug 1921707 - libwebrtc preprocessor, .json, .gni, and *.gn changes - r=ng,webrtc-reviewers +Subject: Bug 1921707 - webrtc.gni - filter out '//third_party/abseil-cpp/' + deps r=ng,webrtc-reviewers -Differential Revision: https://phabricator.services.mozilla.com/D224076 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/7017edc7cfc880bb19f94115d4f48a8c58920a9b +Differential Revision: https://phabricator.services.mozilla.com/D224079 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/45b99d1ba95b46896506de1c7dd92f19e4dc9207 --- - .gn | 2 +- - media/BUILD.gn | 2 +- - modules/video_coding/BUILD.gn | 2 +- - webrtc.gni | 4 ++-- - 4 files changed, 5 insertions(+), 5 deletions(-) + webrtc.gni | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 71 insertions(+) -diff --git a/.gn b/.gn -index 851c745732..cdbd705ec2 100644 ---- a/.gn -+++ b/.gn -@@ -18,7 +18,7 @@ script_executable = "python3" - # The secondary source root is a parallel directory tree where - # GN build files are placed when they can not be placed directly - # in the source tree, e.g. for third party source trees. --secondary_source = "//build/secondary/" -+secondary_source = "//libwebrtc/" - - # These are the targets to skip header checking by default. The files in targets - # matching these patterns (see "gn help label_pattern" for format) will not have -diff --git a/media/BUILD.gn b/media/BUILD.gn -index 0f2341a462..51d055bcf0 100644 ---- a/media/BUILD.gn -+++ b/media/BUILD.gn -@@ -7,7 +7,7 @@ - # be found in the AUTHORS file in the root of the source tree. - - import("//build/config/linux/pkg_config.gni") --import("//third_party/libaom/options.gni") -+import("//libwebrtc/third_party/libaom/options.gni") - import("../webrtc.gni") - - group("media") { -diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn -index 2ef666d59a..2eddb81fd7 100644 ---- a/modules/video_coding/BUILD.gn -+++ b/modules/video_coding/BUILD.gn -@@ -7,7 +7,7 @@ - # be found in the AUTHORS file in the root of the source tree. - - import("//build/config/linux/pkg_config.gni") --import("//third_party/libaom/options.gni") -+import("//libwebrtc/third_party/libaom/options.gni") - import("../../webrtc.gni") - - rtc_library("encoded_frame") { diff --git a/webrtc.gni b/webrtc.gni -index 10cc7468f6..afacae1027 100644 +index afacae1027..bf4535e14c 100644 --- a/webrtc.gni +++ b/webrtc.gni -@@ -487,8 +487,8 @@ all_poison_types = [ - "software_video_codecs", - ] +@@ -691,6 +691,36 @@ template("rtc_source_set") { + deps += [ "//third_party/abseil-cpp:absl" ] + } + } ++ ++ # Rather than widespread changes to most, if not all, BUILD.gn files ++ # we'll do some filtering on dependencies here. ++ if (build_with_mozilla && defined(deps)) { ++ # Now that abseil-cpp is moved to Mozilla's third_party directory ++ # we remove all the abseil-cpp dependency listings so moz.build ++ # generation succeed. ++ filtered_deps = [] ++ foreach (dep, deps) { ++ newdep = string_replace(dep, "//third_party/abseil-cpp/", "") ++ if (newdep == dep) { ++ filtered_deps += [ dep ] ++ } ++ } ++ deps = [] ++ deps = filtered_deps ++ ++ # We don't build any of the test code, but many of the test ++ # targets list gtest/gmock as a dependency. We can simply ++ # filter them out here. ++ filtered_deps = [] ++ foreach (dep, deps) { ++ newdep = string_replace(dep, "//testing/g", "") ++ if (newdep == dep) { ++ filtered_deps += [ dep ] ++ } ++ } ++ deps = [] ++ deps = filtered_deps ++ } + } + } --absl_include_config = "//third_party/abseil-cpp:absl_include_config" --absl_define_config = "//third_party/abseil-cpp:absl_define_config" -+absl_include_config = "//libwebrtc/third_party/abseil-cpp:absl_include_config" -+absl_define_config = "//libwebrtc/third_party/abseil-cpp:absl_define_config" +@@ -925,6 +955,47 @@ template("rtc_library") { + deps += [ "//third_party/abseil-cpp:absl" ] + } + } ++ ++ # Rather than widespread changes to most, if not all, BUILD.gn files ++ # we'll do some filtering on dependencies here. ++ if (build_with_mozilla && defined(deps)) { ++ # Now that abseil-cpp is moved to Mozilla's third_party directory ++ # we remove all the abseil-cpp dependency listings so moz.build ++ # generation succeed. ++ filtered_deps = [] ++ foreach (dep, deps) { ++ newdep = string_replace(dep, "//third_party/abseil-cpp/", "") ++ if (newdep == dep) { ++ filtered_deps += [ dep ] ++ } ++ } ++ deps = [] ++ deps = filtered_deps ++ ++ # We don't build any of the test code, but many of the test ++ # targets list gtest/gmock as a dependency. We can simply ++ # filter them out here. ++ filtered_deps = [] ++ foreach (dep, deps) { ++ newdep = string_replace(dep, "//testing/g", "") ++ if (newdep == dep) { ++ filtered_deps += [ dep ] ++ } ++ } ++ deps = [] ++ deps = filtered_deps ++ ++ # Moving the google build directory requires looking for libwebrtc's ++ # third_party dependencies under libwebrtc/third_party instead of ++ # simply third_party. ++ modified_deps = [] ++ foreach (dep, deps) { ++ newdep = string_replace(dep, "//third_party/", "//libwebrtc/third_party/") ++ modified_deps += [ newdep ] ++ } ++ deps = [] ++ deps = modified_deps ++ } + } + } - # Abseil Flags are testonly, so this config will only be applied to WebRTC targets - # that are testonly. diff --git a/third_party/libwebrtc/moz-patch-stack/s0102.patch b/third_party/libwebrtc/moz-patch-stack/s0102.patch @@ -1,100 +1,874 @@ From: Michael Froman <mfroman@mozilla.com> Date: Thu, 10 Oct 2024 13:42:00 +0000 -Subject: Bug 1921707 - webrtc.gni - filter out '//third_party/abseil-cpp/' - deps r=ng,webrtc-reviewers +Subject: Bug 1921707 - point to new build directory location in + third_party/libwebrtc r=ng,webrtc-reviewers -Differential Revision: https://phabricator.services.mozilla.com/D224079 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/45b99d1ba95b46896506de1c7dd92f19e4dc9207 +Ran: +ack -l "\"//build/config" third_party/libwebrtc | xargs sed -i.bak -E 's/\"\/\/build\/config/\"\/\/chromium\/build\/config/' +ack -l "\"//build/dot" third_party/libwebrtc | xargs sed -i.bak -E 's/\"\/\/build\/dot/\"\/\/chromium\/build\/dot/' +ack -l "\"//build/mac" third_party/libwebrtc | xargs sed -i.bak -E 's/\"\/\/build\/mac/\"\/\/chromium\/build\/mac/' +find third_party -name "*.bak" | xargs rm +hg revert third_party/libwebrtc/moz-patch-stack + +Differential Revision: https://phabricator.services.mozilla.com/D224543 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/a342f5eca8622c8b918d6119f74aff96cc8cf582 --- - webrtc.gni | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 71 insertions(+) + .gn | 4 +-- + BUILD.gn | 14 +++++----- + api/BUILD.gn | 4 +-- + api/audio/test/BUILD.gn | 4 +-- + api/audio_codecs/BUILD.gn | 4 +-- + api/audio_codecs/L16/BUILD.gn | 4 +-- + api/audio_codecs/g711/BUILD.gn | 4 +-- + api/audio_codecs/g722/BUILD.gn | 4 +-- + api/audio_codecs/opus/BUILD.gn | 4 +-- + api/audio_codecs/test/BUILD.gn | 4 +-- + api/video/BUILD.gn | 4 +-- + api/video_codecs/BUILD.gn | 4 +-- + audio/BUILD.gn | 4 +-- + common_audio/BUILD.gn | 4 +-- + common_audio/third_party/ooura/BUILD.gn | 2 +- + examples/BUILD.gn | 14 +++++----- + .../androidapp/third_party/autobanh/BUILD.gn | 2 +- + examples/androidnativeapi/BUILD.gn | 4 +-- + examples/androidvoip/BUILD.gn | 4 +-- + logging/BUILD.gn | 4 +-- + media/BUILD.gn | 2 +- + modules/audio_device/BUILD.gn | 4 +-- + modules/audio_processing/aec3/BUILD.gn | 2 +- + modules/audio_processing/aecm/BUILD.gn | 2 +- + modules/audio_processing/agc/BUILD.gn | 2 +- + modules/audio_processing/agc2/BUILD.gn | 2 +- + .../audio_processing/agc2/rnn_vad/BUILD.gn | 8 +++--- + modules/audio_processing/ns/BUILD.gn | 2 +- + modules/desktop_capture/BUILD.gn | 4 +-- + modules/portal/BUILD.gn | 2 +- + modules/video_coding/BUILD.gn | 2 +- + pc/BUILD.gn | 4 +-- + rtc_base/BUILD.gn | 8 +++--- + rtc_base/memory/BUILD.gn | 4 +-- + rtc_base/synchronization/BUILD.gn | 4 +-- + rtc_base/system/BUILD.gn | 4 +-- + rtc_tools/network_tester/BUILD.gn | 4 +-- + sdk/BUILD.gn | 12 ++++---- + system_wrappers/BUILD.gn | 4 +-- + test/BUILD.gn | 6 ++-- + test/fuzzers/BUILD.gn | 4 +-- + webrtc.gni | 28 +++++++++---------- + 42 files changed, 105 insertions(+), 105 deletions(-) -diff --git a/webrtc.gni b/webrtc.gni -index afacae1027..bf4535e14c 100644 ---- a/webrtc.gni -+++ b/webrtc.gni -@@ -691,6 +691,36 @@ template("rtc_source_set") { - deps += [ "//third_party/abseil-cpp:absl" ] - } +diff --git a/.gn b/.gn +index cdbd705ec2..4ee826ec58 100644 +--- a/.gn ++++ b/.gn +@@ -6,10 +6,10 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/dotfile_settings.gni") ++import("//chromium/build/dotfile_settings.gni") + + # The location of the build configuration file. +-buildconfig = "//build/config/BUILDCONFIG.gn" ++buildconfig = "//chromium/build/config/BUILDCONFIG.gn" + + # The python interpreter to use by default. On Windows, this will look + # for vpython3.exe and vpython3.bat. +diff --git a/BUILD.gn b/BUILD.gn +index 550c75bafb..28fb57a248 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -21,15 +21,15 @@ + # - visibility = [ ":*" ] - directory private. + # As a general guideline, only targets in api/ should have public visibility. + +-import("//build/config/linux/pkg_config.gni") +-import("//build/config/sanitizers/sanitizers.gni") ++import("//chromium/build/config/linux/pkg_config.gni") ++import("//chromium/build/config/sanitizers/sanitizers.gni") + import("webrtc.gni") + if (rtc_enable_protobuf) { + import("//third_party/protobuf/proto_library.gni") + } + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + import("//third_party/jni_zero/jni_zero.gni") + } + +@@ -536,7 +536,7 @@ if (!build_with_chromium) { + sources = [] + + complete_static_lib = true +- suppressed_configs += [ "//build/config/compiler:thin_archive" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:thin_archive" ] + defines = [] + + deps = [ +@@ -852,7 +852,7 @@ rtc_static_library("dcsctp") { + visibility = [ "//:default" ] + sources = [] + complete_static_lib = true +- suppressed_configs += [ "//build/config/compiler:thin_archive" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:thin_archive" ] + defines = [] + deps = [ + "net/dcsctp/public:factory", +@@ -887,7 +887,7 @@ group("poison_software_video_codecs") { + if (!build_with_chromium) { + # Write debug logs to gn_logs.txt. + # This is also required for Siso builds. +- import("//build/gn_logs.gni") ++ import("//chromium/build/gn_logs.gni") + lines = [ + "Generated during 'gn gen' by //BUILD.gn.", + "", +diff --git a/api/BUILD.gn b/api/BUILD.gn +index ac2234a065..2aee479f4c 100644 +--- a/api/BUILD.gn ++++ b/api/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + group("api") { +diff --git a/api/audio/test/BUILD.gn b/api/audio/test/BUILD.gn +index b1060faae3..c567b6b0f3 100644 +--- a/api/audio/test/BUILD.gn ++++ b/api/audio/test/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + if (rtc_include_tests) { +diff --git a/api/audio_codecs/BUILD.gn b/api/audio_codecs/BUILD.gn +index 25ea12557b..aca296a06c 100644 +--- a/api/audio_codecs/BUILD.gn ++++ b/api/audio_codecs/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("audio_codecs_api") { +diff --git a/api/audio_codecs/L16/BUILD.gn b/api/audio_codecs/L16/BUILD.gn +index 8ce7122cec..b7ec211eaf 100644 +--- a/api/audio_codecs/L16/BUILD.gn ++++ b/api/audio_codecs/L16/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("audio_encoder_L16") { +diff --git a/api/audio_codecs/g711/BUILD.gn b/api/audio_codecs/g711/BUILD.gn +index 6c00e040fe..380e167dc6 100644 +--- a/api/audio_codecs/g711/BUILD.gn ++++ b/api/audio_codecs/g711/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("audio_encoder_g711") { +diff --git a/api/audio_codecs/g722/BUILD.gn b/api/audio_codecs/g722/BUILD.gn +index a3ee0d4e0c..322c52ac64 100644 +--- a/api/audio_codecs/g722/BUILD.gn ++++ b/api/audio_codecs/g722/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_source_set("audio_encoder_g722_config") { +diff --git a/api/audio_codecs/opus/BUILD.gn b/api/audio_codecs/opus/BUILD.gn +index 6df8361dbb..a86f34a973 100644 +--- a/api/audio_codecs/opus/BUILD.gn ++++ b/api/audio_codecs/opus/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("audio_encoder_opus_config") { +diff --git a/api/audio_codecs/test/BUILD.gn b/api/audio_codecs/test/BUILD.gn +index 40714b196e..2c6b39f59e 100644 +--- a/api/audio_codecs/test/BUILD.gn ++++ b/api/audio_codecs/test/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + if (rtc_include_tests) { +diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn +index cd74281a22..16af840261 100644 +--- a/api/video/BUILD.gn ++++ b/api/video/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("video_rtp_headers") { +diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn +index eddc2b7782..c767531ecd 100644 +--- a/api/video_codecs/BUILD.gn ++++ b/api/video_codecs/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("scalability_mode") { +diff --git a/audio/BUILD.gn b/audio/BUILD.gn +index eda3161da8..612028625a 100644 +--- a/audio/BUILD.gn ++++ b/audio/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("audio") { +diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn +index 1e17368bf8..2dad7c98df 100644 +--- a/common_audio/BUILD.gn ++++ b/common_audio/BUILD.gn +@@ -289,7 +289,7 @@ if (rtc_build_with_neon) { + + if (target_cpu != "arm64") { + # Enable compilation for the NEON instruction set. +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +@@ -312,7 +312,7 @@ if (rtc_build_with_neon) { + + if (target_cpu != "arm64") { + # Enable compilation for the NEON instruction set. +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +diff --git a/common_audio/third_party/ooura/BUILD.gn b/common_audio/third_party/ooura/BUILD.gn +index 589142b014..2ee80ded55 100644 +--- a/common_audio/third_party/ooura/BUILD.gn ++++ b/common_audio/third_party/ooura/BUILD.gn +@@ -40,7 +40,7 @@ rtc_library("fft_size_128") { + + if (target_cpu != "arm64") { + # Enable compilation for the NEON instruction set. +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags += [ "-mfpu=neon" ] } -+ -+ # Rather than widespread changes to most, if not all, BUILD.gn files -+ # we'll do some filtering on dependencies here. -+ if (build_with_mozilla && defined(deps)) { -+ # Now that abseil-cpp is moved to Mozilla's third_party directory -+ # we remove all the abseil-cpp dependency listings so moz.build -+ # generation succeed. -+ filtered_deps = [] -+ foreach (dep, deps) { -+ newdep = string_replace(dep, "//third_party/abseil-cpp/", "") -+ if (newdep == dep) { -+ filtered_deps += [ dep ] -+ } -+ } -+ deps = [] -+ deps = filtered_deps -+ -+ # We don't build any of the test code, but many of the test -+ # targets list gtest/gmock as a dependency. We can simply -+ # filter them out here. -+ filtered_deps = [] -+ foreach (dep, deps) { -+ newdep = string_replace(dep, "//testing/g", "") -+ if (newdep == dep) { -+ filtered_deps += [ dep ] -+ } -+ } -+ deps = [] -+ deps = filtered_deps -+ } } +diff --git a/examples/BUILD.gn b/examples/BUILD.gn +index 6ec5e65609..73ef4bf072 100644 +--- a/examples/BUILD.gn ++++ b/examples/BUILD.gn +@@ -9,15 +9,15 @@ + import("../webrtc.gni") + + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + import("//third_party/jni_zero/jni_zero.gni") + } else if (is_mac) { +- import("//build/config/mac/rules.gni") ++ import("//chromium/build/config/mac/rules.gni") + } else if (is_ios) { +- import("//build/config/ios/rules.gni") ++ import("//chromium/build/config/ios/rules.gni") + } else if (is_linux || is_chromeos) { +- import("//build/config/linux/pkg_config.gni") ++ import("//chromium/build/config/linux/pkg_config.gni") } -@@ -925,6 +955,47 @@ template("rtc_library") { - deps += [ "//third_party/abseil-cpp:absl" ] + group("examples") { +@@ -632,7 +632,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { + "../sdk:mediaconstraints_objc", + "../sdk:peerconnectionfactory_base_objc", + "../sdk:videocapture_objc", +- "//build/config/ios:xctest", ++ "//chromium/build/config/ios:xctest", + "//third_party/ocmock", + ] } +@@ -737,7 +737,7 @@ if (is_linux || is_chromeos || is_win) { + "peerconnection/client/main_wnd.cc", + "peerconnection/client/main_wnd.h", + ] +- configs += [ "//build/config/win:windowed" ] ++ configs += [ "//chromium/build/config/win:windowed" ] + deps += [ + "../rtc_base:win32", + "../rtc_base:win32_socket_init", +diff --git a/examples/androidapp/third_party/autobanh/BUILD.gn b/examples/androidapp/third_party/autobanh/BUILD.gn +index b671239bae..e545b2cde3 100644 +--- a/examples/androidapp/third_party/autobanh/BUILD.gn ++++ b/examples/androidapp/third_party/autobanh/BUILD.gn +@@ -7,7 +7,7 @@ + # be found in the AUTHORS file in the root of the source tree. + + if (is_android) { +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/rules.gni") + + android_java_prebuilt("autobanh_java") { + jar_path = "lib/autobanh.jar" +diff --git a/examples/androidnativeapi/BUILD.gn b/examples/androidnativeapi/BUILD.gn +index 64cd43e923..6d36129869 100644 +--- a/examples/androidnativeapi/BUILD.gn ++++ b/examples/androidnativeapi/BUILD.gn +@@ -41,8 +41,8 @@ if (is_android) { + "jni/onload.cc", + ] + +- suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] +- configs += [ "//build/config/android:hide_all_but_jni" ] ++ suppressed_configs += [ "//chromium/build/config/android:hide_all_but_jni_onload" ] ++ configs += [ "//chromium/build/config/android:hide_all_but_jni" ] + + deps = [ + ":generated_jni", +diff --git a/examples/androidvoip/BUILD.gn b/examples/androidvoip/BUILD.gn +index 657e7a71f9..881dd69b03 100644 +--- a/examples/androidvoip/BUILD.gn ++++ b/examples/androidvoip/BUILD.gn +@@ -50,8 +50,8 @@ if (is_android) { + "jni/onload.cc", + ] + +- suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] +- configs += [ "//build/config/android:hide_all_but_jni" ] ++ suppressed_configs += [ "//chromium/build/config/android:hide_all_but_jni_onload" ] ++ configs += [ "//chromium/build/config/android:hide_all_but_jni" ] + + deps = [ + ":generated_jni", +diff --git a/logging/BUILD.gn b/logging/BUILD.gn +index 187019693e..e1edf6befb 100644 +--- a/logging/BUILD.gn ++++ b/logging/BUILD.gn +@@ -11,8 +11,8 @@ if (rtc_enable_protobuf) { + import("//third_party/protobuf/proto_library.gni") + } + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + group("logging") { +diff --git a/media/BUILD.gn b/media/BUILD.gn +index 51d055bcf0..e50b924806 100644 +--- a/media/BUILD.gn ++++ b/media/BUILD.gn +@@ -6,7 +6,7 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/linux/pkg_config.gni") ++import("//chromium/build/config/linux/pkg_config.gni") + import("//libwebrtc/third_party/libaom/options.gni") + import("../webrtc.gni") + +diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn +index a90fac2f4c..ae05c9d228 100644 +--- a/modules/audio_device/BUILD.gn ++++ b/modules/audio_device/BUILD.gn +@@ -9,8 +9,8 @@ + import("../../webrtc.gni") + + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + config("audio_device_warnings_config") { +diff --git a/modules/audio_processing/aec3/BUILD.gn b/modules/audio_processing/aec3/BUILD.gn +index 847e5ccbea..2f6be208d2 100644 +--- a/modules/audio_processing/aec3/BUILD.gn ++++ b/modules/audio_processing/aec3/BUILD.gn +@@ -124,7 +124,7 @@ rtc_library("aec3") { + + defines = [] + if (rtc_build_with_neon && target_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +diff --git a/modules/audio_processing/aecm/BUILD.gn b/modules/audio_processing/aecm/BUILD.gn +index f01637f2da..d5bdc070be 100644 +--- a/modules/audio_processing/aecm/BUILD.gn ++++ b/modules/audio_processing/aecm/BUILD.gn +@@ -30,7 +30,7 @@ rtc_library("aecm_core") { + + if (target_cpu != "arm64") { + # Enable compilation for the NEON instruction set. +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags += [ "-mfpu=neon" ] + } + } +diff --git a/modules/audio_processing/agc/BUILD.gn b/modules/audio_processing/agc/BUILD.gn +index 45d08ad066..2d6f3ca0b4 100644 +--- a/modules/audio_processing/agc/BUILD.gn ++++ b/modules/audio_processing/agc/BUILD.gn +@@ -86,7 +86,7 @@ rtc_library("legacy_agc") { + if (rtc_build_with_neon) { + if (target_cpu != "arm64") { + # Enable compilation for the NEON instruction set. +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + } +diff --git a/modules/audio_processing/agc2/BUILD.gn b/modules/audio_processing/agc2/BUILD.gn +index 83f8889fff..54fcde3a18 100644 +--- a/modules/audio_processing/agc2/BUILD.gn ++++ b/modules/audio_processing/agc2/BUILD.gn +@@ -258,7 +258,7 @@ rtc_library("vad_wrapper") { + + defines = [] + if (rtc_build_with_neon && current_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +diff --git a/modules/audio_processing/agc2/rnn_vad/BUILD.gn b/modules/audio_processing/agc2/rnn_vad/BUILD.gn +index 0fb06b2a86..6ce62e7818 100644 +--- a/modules/audio_processing/agc2/rnn_vad/BUILD.gn ++++ b/modules/audio_processing/agc2/rnn_vad/BUILD.gn +@@ -19,7 +19,7 @@ rtc_library("rnn_vad") { + + defines = [] + if (rtc_build_with_neon && target_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +@@ -87,7 +87,7 @@ rtc_library("rnn_vad_layers") { + + defines = [] + if (rtc_build_with_neon && current_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +@@ -148,7 +148,7 @@ rtc_library("rnn_vad_pitch") { + + defines = [] + if (rtc_build_with_neon && current_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +@@ -271,7 +271,7 @@ if (rtc_include_tests) { + + defines = [] + if (rtc_build_with_neon && current_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] } -+ -+ # Rather than widespread changes to most, if not all, BUILD.gn files -+ # we'll do some filtering on dependencies here. -+ if (build_with_mozilla && defined(deps)) { -+ # Now that abseil-cpp is moved to Mozilla's third_party directory -+ # we remove all the abseil-cpp dependency listings so moz.build -+ # generation succeed. -+ filtered_deps = [] -+ foreach (dep, deps) { -+ newdep = string_replace(dep, "//third_party/abseil-cpp/", "") -+ if (newdep == dep) { -+ filtered_deps += [ dep ] -+ } -+ } -+ deps = [] -+ deps = filtered_deps -+ -+ # We don't build any of the test code, but many of the test -+ # targets list gtest/gmock as a dependency. We can simply -+ # filter them out here. -+ filtered_deps = [] -+ foreach (dep, deps) { -+ newdep = string_replace(dep, "//testing/g", "") -+ if (newdep == dep) { -+ filtered_deps += [ dep ] -+ } -+ } -+ deps = [] -+ deps = filtered_deps -+ -+ # Moving the google build directory requires looking for libwebrtc's -+ # third_party dependencies under libwebrtc/third_party instead of -+ # simply third_party. -+ modified_deps = [] -+ foreach (dep, deps) { -+ newdep = string_replace(dep, "//third_party/", "//libwebrtc/third_party/") -+ modified_deps += [ newdep ] -+ } -+ deps = [] -+ deps = modified_deps -+ } + +diff --git a/modules/audio_processing/ns/BUILD.gn b/modules/audio_processing/ns/BUILD.gn +index 0e96125f40..c72b3714c4 100644 +--- a/modules/audio_processing/ns/BUILD.gn ++++ b/modules/audio_processing/ns/BUILD.gn +@@ -44,7 +44,7 @@ rtc_static_library("ns") { + + defines = [] + if (rtc_build_with_neon && target_cpu != "arm64") { +- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] ++ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } + +diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn +index 6f18642622..4b5acc5bdb 100644 +--- a/modules/desktop_capture/BUILD.gn ++++ b/modules/desktop_capture/BUILD.gn +@@ -6,8 +6,8 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/linux/gtk/gtk.gni") +-import("//build/config/ui.gni") ++import("//chromium/build/config/linux/gtk/gtk.gni") ++import("//chromium/build/config/ui.gni") + import("../../webrtc.gni") + + use_desktop_capture_differ_sse2 = target_cpu == "x86" || target_cpu == "x64" +diff --git a/modules/portal/BUILD.gn b/modules/portal/BUILD.gn +index a693604389..72972d18e1 100644 +--- a/modules/portal/BUILD.gn ++++ b/modules/portal/BUILD.gn +@@ -6,7 +6,7 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/linux/pkg_config.gni") ++import("//chromium/build/config/linux/pkg_config.gni") + import("//tools/generate_stubs/rules.gni") + import("../../webrtc.gni") + +diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn +index 2eddb81fd7..11da028bd3 100644 +--- a/modules/video_coding/BUILD.gn ++++ b/modules/video_coding/BUILD.gn +@@ -6,7 +6,7 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/linux/pkg_config.gni") ++import("//chromium/build/config/linux/pkg_config.gni") + import("//libwebrtc/third_party/libaom/options.gni") + import("../../webrtc.gni") + +diff --git a/pc/BUILD.gn b/pc/BUILD.gn +index 0c5df79fb4..70075055cf 100644 +--- a/pc/BUILD.gn ++++ b/pc/BUILD.gn +@@ -30,8 +30,8 @@ + + import("../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + if (rtc_build_libsrtp) { +diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn +index 9d319d5326..9653fd651f 100644 +--- a/rtc_base/BUILD.gn ++++ b/rtc_base/BUILD.gn +@@ -9,8 +9,8 @@ + import("../webrtc.gni") + + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_source_set("protobuf_utils") { +@@ -1894,8 +1894,8 @@ if (!rtc_rusty_base64) { + ] } + } else { +- import("//build/config/rust.gni") +- import("//build/rust/rust_static_library.gni") ++ import("//chromium/build/config/rust.gni") ++ import("//chromium/build/rust/rust_static_library.gni") + + rust_static_library("base64_rust_bridge") { + allow_unsafe = true # Needed for FFI with cxx crate. +diff --git a/rtc_base/memory/BUILD.gn b/rtc_base/memory/BUILD.gn +index 9a55af3ea9..3d272ba975 100644 +--- a/rtc_base/memory/BUILD.gn ++++ b/rtc_base/memory/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("aligned_malloc") { +diff --git a/rtc_base/synchronization/BUILD.gn b/rtc_base/synchronization/BUILD.gn +index 2a197152b9..4d5008874e 100644 +--- a/rtc_base/synchronization/BUILD.gn ++++ b/rtc_base/synchronization/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + rtc_library("yield") { +diff --git a/rtc_base/system/BUILD.gn b/rtc_base/system/BUILD.gn +index 4a772795ed..de27f01bb0 100644 +--- a/rtc_base/system/BUILD.gn ++++ b/rtc_base/system/BUILD.gn +@@ -8,8 +8,8 @@ + + import("../../webrtc.gni") + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") } + rtc_source_set("arch") { +diff --git a/rtc_tools/network_tester/BUILD.gn b/rtc_tools/network_tester/BUILD.gn +index 4fa98d73a2..72c01d50ab 100644 +--- a/rtc_tools/network_tester/BUILD.gn ++++ b/rtc_tools/network_tester/BUILD.gn +@@ -180,8 +180,8 @@ if (is_android) { + "../../rtc_base:threading", + ] + +- suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] +- configs += [ "//build/config/android:hide_all_but_jni" ] ++ suppressed_configs += [ "//chromium/build/config/android:hide_all_but_jni_onload" ] ++ configs += [ "//chromium/build/config/android:hide_all_but_jni" ] + + output_extension = "so" + } +diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn +index c78cdec7cc..cc5d90b42f 100644 +--- a/sdk/BUILD.gn ++++ b/sdk/BUILD.gn +@@ -9,12 +9,12 @@ + import("//third_party/libaom/options.gni") + import("../webrtc.gni") + if (is_ios) { +- import("//build/config/apple/mobile_config.gni") +- import("//build/config/ios/ios_sdk.gni") +- import("//build/config/ios/rules.gni") ++ import("//chromium/build/config/apple/mobile_config.gni") ++ import("//chromium/build/config/ios/ios_sdk.gni") ++ import("//chromium/build/config/ios/rules.gni") + } + if (is_mac) { +- import("//build/config/mac/rules.gni") ++ import("//chromium/build/config/mac/rules.gni") + } + + group("sdk") { +@@ -67,7 +67,7 @@ if (is_ios || is_mac) { + ] + + if (use_clang_coverage) { +- configs = [ "//build/config/coverage:default_coverage" ] ++ configs = [ "//chromium/build/config/coverage:default_coverage" ] + } + } + +@@ -1280,7 +1280,7 @@ if (is_ios || is_mac) { + } + + public_deps = [ +- "//build/config/ios:xctest", ++ "//chromium/build/config/ios:xctest", + "//third_party/ocmock", + ] + } +diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn +index 822b565610..f2ea548824 100644 +--- a/system_wrappers/BUILD.gn ++++ b/system_wrappers/BUILD.gn +@@ -7,8 +7,8 @@ + # be found in the AUTHORS file in the root of the source tree. + + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + import("../webrtc.gni") + +diff --git a/test/BUILD.gn b/test/BUILD.gn +index f5039000f6..27fbece69e 100644 +--- a/test/BUILD.gn ++++ b/test/BUILD.gn +@@ -6,10 +6,10 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/ui.gni") ++import("//chromium/build/config/ui.gni") + import("../webrtc.gni") + if (is_android) { +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/rules.gni") + import("//third_party/jni_zero/jni_zero.gni") + } + +@@ -415,7 +415,7 @@ if (is_ios && !build_with_chromium) { + testonly = true + visibility = [ "*" ] + sources = [ "ios/google_test_runner.mm" ] +- configs += [ "//build/config/ios:xctest_config" ] ++ configs += [ "//chromium/build/config/ios:xctest_config" ] + frameworks = [ "UIKit.framework" ] + deps = [ ":google_test_runner_delegate" ] + } +diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn +index 9d61ce653a..8d61065eab 100644 +--- a/test/fuzzers/BUILD.gn ++++ b/test/fuzzers/BUILD.gn +@@ -6,7 +6,7 @@ + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. + +-import("//build/config/features.gni") ++import("//chromium/build/config/features.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + import("../../webrtc.gni") + +@@ -73,7 +73,7 @@ template("webrtc_fuzzer_test") { + } + + if (!build_with_chromium && is_clang) { +- suppressed_configs = [ "//build/config/clang:find_bad_constructs" ] ++ suppressed_configs = [ "//chromium/build/config/clang:find_bad_constructs" ] + } + } + } +diff --git a/webrtc.gni b/webrtc.gni +index bf4535e14c..b9c2178996 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -5,12 +5,12 @@ + # tree. An additional intellectual property rights grant can be found + # in the file PATENTS. All contributing project authors may + # be found in the AUTHORS file in the root of the source tree. +-import("//build/config/arm.gni") +-import("//build/config/features.gni") +-import("//build/config/mips.gni") +-import("//build/config/ozone.gni") +-import("//build/config/sanitizers/sanitizers.gni") +-import("//build/config/sysroot.gni") ++import("//chromium/build/config/arm.gni") ++import("//chromium/build/config/features.gni") ++import("//chromium/build/config/mips.gni") ++import("//chromium/build/config/ozone.gni") ++import("//chromium/build/config/sanitizers/sanitizers.gni") ++import("//chromium/build/config/sysroot.gni") + import("//build_overrides/build.gni") + + if (!build_with_chromium && is_component_build) { +@@ -28,20 +28,20 @@ if (!build_with_chromium && is_component_build) { + } + + if (is_ios) { +- import("//build/config/ios/rules.gni") ++ import("//chromium/build/config/ios/rules.gni") + } + + if (is_mac) { +- import("//build/config/mac/rules.gni") ++ import("//chromium/build/config/mac/rules.gni") + } + + if (is_android) { +- import("//build/config/android/config.gni") +- import("//build/config/android/rules.gni") ++ import("//chromium/build/config/android/config.gni") ++ import("//chromium/build/config/android/rules.gni") + } + + if (is_fuchsia) { +- import("//build/config/fuchsia/config.gni") ++ import("//chromium/build/config/fuchsia/config.gni") + } + + if (build_with_chromium) { +@@ -373,8 +373,8 @@ rtc_common_configs = [ webrtc_root + ":common_config" ] + + if (is_mac || is_ios) { + if (filter_include(default_compiler_configs, +- [ "//build/config/compiler:enable_arc" ]) == []) { +- rtc_common_configs += [ "//build/config/compiler:enable_arc" ] ++ [ "//chromium/build/config/compiler:enable_arc" ]) == []) { ++ rtc_common_configs += [ "//chromium/build/config/compiler:enable_arc" ] + } + } + +@@ -392,7 +392,7 @@ rtc_common_inherited_config = webrtc_root + ":common_inherited_config" + # Common configs to remove or add in all rtc targets. + rtc_remove_configs = [] + if (!build_with_chromium && is_clang) { +- rtc_remove_configs += [ "//build/config/clang:find_bad_constructs" ] ++ rtc_remove_configs += [ "//chromium/build/config/clang:find_bad_constructs" ] + } + rtc_add_configs = rtc_common_configs + rtc_prod_configs = [ webrtc_root + ":rtc_prod_config" ] diff --git a/third_party/libwebrtc/moz-patch-stack/s0103.patch b/third_party/libwebrtc/moz-patch-stack/s0103.patch @@ -1,874 +1,55 @@ From: Michael Froman <mfroman@mozilla.com> Date: Thu, 10 Oct 2024 13:42:00 +0000 -Subject: Bug 1921707 - point to new build directory location in - third_party/libwebrtc r=ng,webrtc-reviewers +Subject: Bug 1921707 - add filtering for new build directory location in + third_party/libwebrtc/webrtc.gni r=ng,webrtc-reviewers -Ran: -ack -l "\"//build/config" third_party/libwebrtc | xargs sed -i.bak -E 's/\"\/\/build\/config/\"\/\/chromium\/build\/config/' -ack -l "\"//build/dot" third_party/libwebrtc | xargs sed -i.bak -E 's/\"\/\/build\/dot/\"\/\/chromium\/build\/dot/' -ack -l "\"//build/mac" third_party/libwebrtc | xargs sed -i.bak -E 's/\"\/\/build\/mac/\"\/\/chromium\/build\/mac/' -find third_party -name "*.bak" | xargs rm -hg revert third_party/libwebrtc/moz-patch-stack - -Differential Revision: https://phabricator.services.mozilla.com/D224543 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/a342f5eca8622c8b918d6119f74aff96cc8cf582 +Differential Revision: https://phabricator.services.mozilla.com/D224545 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f18c05287ce831369f44715a4174facff4f12652 --- - .gn | 4 +-- - BUILD.gn | 14 +++++----- - api/BUILD.gn | 4 +-- - api/audio/test/BUILD.gn | 4 +-- - api/audio_codecs/BUILD.gn | 4 +-- - api/audio_codecs/L16/BUILD.gn | 4 +-- - api/audio_codecs/g711/BUILD.gn | 4 +-- - api/audio_codecs/g722/BUILD.gn | 4 +-- - api/audio_codecs/opus/BUILD.gn | 4 +-- - api/audio_codecs/test/BUILD.gn | 4 +-- - api/video/BUILD.gn | 4 +-- - api/video_codecs/BUILD.gn | 4 +-- - audio/BUILD.gn | 4 +-- - common_audio/BUILD.gn | 4 +-- - common_audio/third_party/ooura/BUILD.gn | 2 +- - examples/BUILD.gn | 14 +++++----- - .../androidapp/third_party/autobanh/BUILD.gn | 2 +- - examples/androidnativeapi/BUILD.gn | 4 +-- - examples/androidvoip/BUILD.gn | 4 +-- - logging/BUILD.gn | 4 +-- - media/BUILD.gn | 2 +- - modules/audio_device/BUILD.gn | 4 +-- - modules/audio_processing/aec3/BUILD.gn | 2 +- - modules/audio_processing/aecm/BUILD.gn | 2 +- - modules/audio_processing/agc/BUILD.gn | 2 +- - modules/audio_processing/agc2/BUILD.gn | 2 +- - .../audio_processing/agc2/rnn_vad/BUILD.gn | 8 +++--- - modules/audio_processing/ns/BUILD.gn | 2 +- - modules/desktop_capture/BUILD.gn | 4 +-- - modules/portal/BUILD.gn | 2 +- - modules/video_coding/BUILD.gn | 2 +- - pc/BUILD.gn | 4 +-- - rtc_base/BUILD.gn | 8 +++--- - rtc_base/memory/BUILD.gn | 4 +-- - rtc_base/synchronization/BUILD.gn | 4 +-- - rtc_base/system/BUILD.gn | 4 +-- - rtc_tools/network_tester/BUILD.gn | 4 +-- - sdk/BUILD.gn | 12 ++++---- - system_wrappers/BUILD.gn | 4 +-- - test/BUILD.gn | 6 ++-- - test/fuzzers/BUILD.gn | 4 +-- - webrtc.gni | 28 +++++++++---------- - 42 files changed, 105 insertions(+), 105 deletions(-) + webrtc.gni | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) -diff --git a/.gn b/.gn -index cdbd705ec2..4ee826ec58 100644 ---- a/.gn -+++ b/.gn -@@ -6,10 +6,10 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/dotfile_settings.gni") -+import("//chromium/build/dotfile_settings.gni") - - # The location of the build configuration file. --buildconfig = "//build/config/BUILDCONFIG.gn" -+buildconfig = "//chromium/build/config/BUILDCONFIG.gn" - - # The python interpreter to use by default. On Windows, this will look - # for vpython3.exe and vpython3.bat. -diff --git a/BUILD.gn b/BUILD.gn -index 550c75bafb..28fb57a248 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -21,15 +21,15 @@ - # - visibility = [ ":*" ] - directory private. - # As a general guideline, only targets in api/ should have public visibility. - --import("//build/config/linux/pkg_config.gni") --import("//build/config/sanitizers/sanitizers.gni") -+import("//chromium/build/config/linux/pkg_config.gni") -+import("//chromium/build/config/sanitizers/sanitizers.gni") - import("webrtc.gni") - if (rtc_enable_protobuf) { - import("//third_party/protobuf/proto_library.gni") - } - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - import("//third_party/jni_zero/jni_zero.gni") - } - -@@ -536,7 +536,7 @@ if (!build_with_chromium) { - sources = [] - - complete_static_lib = true -- suppressed_configs += [ "//build/config/compiler:thin_archive" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:thin_archive" ] - defines = [] - - deps = [ -@@ -852,7 +852,7 @@ rtc_static_library("dcsctp") { - visibility = [ "//:default" ] - sources = [] - complete_static_lib = true -- suppressed_configs += [ "//build/config/compiler:thin_archive" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:thin_archive" ] - defines = [] - deps = [ - "net/dcsctp/public:factory", -@@ -887,7 +887,7 @@ group("poison_software_video_codecs") { - if (!build_with_chromium) { - # Write debug logs to gn_logs.txt. - # This is also required for Siso builds. -- import("//build/gn_logs.gni") -+ import("//chromium/build/gn_logs.gni") - lines = [ - "Generated during 'gn gen' by //BUILD.gn.", - "", -diff --git a/api/BUILD.gn b/api/BUILD.gn -index ac2234a065..2aee479f4c 100644 ---- a/api/BUILD.gn -+++ b/api/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - group("api") { -diff --git a/api/audio/test/BUILD.gn b/api/audio/test/BUILD.gn -index b1060faae3..c567b6b0f3 100644 ---- a/api/audio/test/BUILD.gn -+++ b/api/audio/test/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - if (rtc_include_tests) { -diff --git a/api/audio_codecs/BUILD.gn b/api/audio_codecs/BUILD.gn -index 25ea12557b..aca296a06c 100644 ---- a/api/audio_codecs/BUILD.gn -+++ b/api/audio_codecs/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("audio_codecs_api") { -diff --git a/api/audio_codecs/L16/BUILD.gn b/api/audio_codecs/L16/BUILD.gn -index 8ce7122cec..b7ec211eaf 100644 ---- a/api/audio_codecs/L16/BUILD.gn -+++ b/api/audio_codecs/L16/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("audio_encoder_L16") { -diff --git a/api/audio_codecs/g711/BUILD.gn b/api/audio_codecs/g711/BUILD.gn -index 6c00e040fe..380e167dc6 100644 ---- a/api/audio_codecs/g711/BUILD.gn -+++ b/api/audio_codecs/g711/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("audio_encoder_g711") { -diff --git a/api/audio_codecs/g722/BUILD.gn b/api/audio_codecs/g722/BUILD.gn -index a3ee0d4e0c..322c52ac64 100644 ---- a/api/audio_codecs/g722/BUILD.gn -+++ b/api/audio_codecs/g722/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_source_set("audio_encoder_g722_config") { -diff --git a/api/audio_codecs/opus/BUILD.gn b/api/audio_codecs/opus/BUILD.gn -index 6df8361dbb..a86f34a973 100644 ---- a/api/audio_codecs/opus/BUILD.gn -+++ b/api/audio_codecs/opus/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("audio_encoder_opus_config") { -diff --git a/api/audio_codecs/test/BUILD.gn b/api/audio_codecs/test/BUILD.gn -index 40714b196e..2c6b39f59e 100644 ---- a/api/audio_codecs/test/BUILD.gn -+++ b/api/audio_codecs/test/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - if (rtc_include_tests) { -diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn -index cd74281a22..16af840261 100644 ---- a/api/video/BUILD.gn -+++ b/api/video/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("video_rtp_headers") { -diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn -index eddc2b7782..c767531ecd 100644 ---- a/api/video_codecs/BUILD.gn -+++ b/api/video_codecs/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("scalability_mode") { -diff --git a/audio/BUILD.gn b/audio/BUILD.gn -index eda3161da8..612028625a 100644 ---- a/audio/BUILD.gn -+++ b/audio/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("audio") { -diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn -index 1e17368bf8..2dad7c98df 100644 ---- a/common_audio/BUILD.gn -+++ b/common_audio/BUILD.gn -@@ -289,7 +289,7 @@ if (rtc_build_with_neon) { - - if (target_cpu != "arm64") { - # Enable compilation for the NEON instruction set. -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -@@ -312,7 +312,7 @@ if (rtc_build_with_neon) { - - if (target_cpu != "arm64") { - # Enable compilation for the NEON instruction set. -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -diff --git a/common_audio/third_party/ooura/BUILD.gn b/common_audio/third_party/ooura/BUILD.gn -index 589142b014..2ee80ded55 100644 ---- a/common_audio/third_party/ooura/BUILD.gn -+++ b/common_audio/third_party/ooura/BUILD.gn -@@ -40,7 +40,7 @@ rtc_library("fft_size_128") { - - if (target_cpu != "arm64") { - # Enable compilation for the NEON instruction set. -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags += [ "-mfpu=neon" ] - } - } -diff --git a/examples/BUILD.gn b/examples/BUILD.gn -index 6ec5e65609..73ef4bf072 100644 ---- a/examples/BUILD.gn -+++ b/examples/BUILD.gn -@@ -9,15 +9,15 @@ - import("../webrtc.gni") - - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - import("//third_party/jni_zero/jni_zero.gni") - } else if (is_mac) { -- import("//build/config/mac/rules.gni") -+ import("//chromium/build/config/mac/rules.gni") - } else if (is_ios) { -- import("//build/config/ios/rules.gni") -+ import("//chromium/build/config/ios/rules.gni") - } else if (is_linux || is_chromeos) { -- import("//build/config/linux/pkg_config.gni") -+ import("//chromium/build/config/linux/pkg_config.gni") - } - - group("examples") { -@@ -632,7 +632,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { - "../sdk:mediaconstraints_objc", - "../sdk:peerconnectionfactory_base_objc", - "../sdk:videocapture_objc", -- "//build/config/ios:xctest", -+ "//chromium/build/config/ios:xctest", - "//third_party/ocmock", - ] - } -@@ -737,7 +737,7 @@ if (is_linux || is_chromeos || is_win) { - "peerconnection/client/main_wnd.cc", - "peerconnection/client/main_wnd.h", - ] -- configs += [ "//build/config/win:windowed" ] -+ configs += [ "//chromium/build/config/win:windowed" ] +diff --git a/webrtc.gni b/webrtc.gni +index b9c2178996..34a8ee592d 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -536,7 +536,7 @@ template("rtc_test") { + min_sdk_version = 21 + target_sdk_version = 24 deps += [ - "../rtc_base:win32", - "../rtc_base:win32_socket_init", -diff --git a/examples/androidapp/third_party/autobanh/BUILD.gn b/examples/androidapp/third_party/autobanh/BUILD.gn -index b671239bae..e545b2cde3 100644 ---- a/examples/androidapp/third_party/autobanh/BUILD.gn -+++ b/examples/androidapp/third_party/autobanh/BUILD.gn -@@ -7,7 +7,7 @@ - # be found in the AUTHORS file in the root of the source tree. - - if (is_android) { -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/rules.gni") - - android_java_prebuilt("autobanh_java") { - jar_path = "lib/autobanh.jar" -diff --git a/examples/androidnativeapi/BUILD.gn b/examples/androidnativeapi/BUILD.gn -index 64cd43e923..6d36129869 100644 ---- a/examples/androidnativeapi/BUILD.gn -+++ b/examples/androidnativeapi/BUILD.gn -@@ -41,8 +41,8 @@ if (is_android) { - "jni/onload.cc", - ] - -- suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] -- configs += [ "//build/config/android:hide_all_but_jni" ] -+ suppressed_configs += [ "//chromium/build/config/android:hide_all_but_jni_onload" ] -+ configs += [ "//chromium/build/config/android:hide_all_but_jni" ] - - deps = [ - ":generated_jni", -diff --git a/examples/androidvoip/BUILD.gn b/examples/androidvoip/BUILD.gn -index 657e7a71f9..881dd69b03 100644 ---- a/examples/androidvoip/BUILD.gn -+++ b/examples/androidvoip/BUILD.gn -@@ -50,8 +50,8 @@ if (is_android) { - "jni/onload.cc", - ] - -- suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] -- configs += [ "//build/config/android:hide_all_but_jni" ] -+ suppressed_configs += [ "//chromium/build/config/android:hide_all_but_jni_onload" ] -+ configs += [ "//chromium/build/config/android:hide_all_but_jni" ] - - deps = [ - ":generated_jni", -diff --git a/logging/BUILD.gn b/logging/BUILD.gn -index 187019693e..e1edf6befb 100644 ---- a/logging/BUILD.gn -+++ b/logging/BUILD.gn -@@ -11,8 +11,8 @@ if (rtc_enable_protobuf) { - import("//third_party/protobuf/proto_library.gni") - } - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - group("logging") { -diff --git a/media/BUILD.gn b/media/BUILD.gn -index 51d055bcf0..e50b924806 100644 ---- a/media/BUILD.gn -+++ b/media/BUILD.gn -@@ -6,7 +6,7 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/linux/pkg_config.gni") -+import("//chromium/build/config/linux/pkg_config.gni") - import("//libwebrtc/third_party/libaom/options.gni") - import("../webrtc.gni") - -diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn -index a90fac2f4c..ae05c9d228 100644 ---- a/modules/audio_device/BUILD.gn -+++ b/modules/audio_device/BUILD.gn -@@ -9,8 +9,8 @@ - import("../../webrtc.gni") - - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - config("audio_device_warnings_config") { -diff --git a/modules/audio_processing/aec3/BUILD.gn b/modules/audio_processing/aec3/BUILD.gn -index 847e5ccbea..2f6be208d2 100644 ---- a/modules/audio_processing/aec3/BUILD.gn -+++ b/modules/audio_processing/aec3/BUILD.gn -@@ -124,7 +124,7 @@ rtc_library("aec3") { - - defines = [] - if (rtc_build_with_neon && target_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -diff --git a/modules/audio_processing/aecm/BUILD.gn b/modules/audio_processing/aecm/BUILD.gn -index f01637f2da..d5bdc070be 100644 ---- a/modules/audio_processing/aecm/BUILD.gn -+++ b/modules/audio_processing/aecm/BUILD.gn -@@ -30,7 +30,7 @@ rtc_library("aecm_core") { - - if (target_cpu != "arm64") { - # Enable compilation for the NEON instruction set. -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags += [ "-mfpu=neon" ] - } - } -diff --git a/modules/audio_processing/agc/BUILD.gn b/modules/audio_processing/agc/BUILD.gn -index 45d08ad066..2d6f3ca0b4 100644 ---- a/modules/audio_processing/agc/BUILD.gn -+++ b/modules/audio_processing/agc/BUILD.gn -@@ -86,7 +86,7 @@ rtc_library("legacy_agc") { - if (rtc_build_with_neon) { - if (target_cpu != "arm64") { - # Enable compilation for the NEON instruction set. -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - } -diff --git a/modules/audio_processing/agc2/BUILD.gn b/modules/audio_processing/agc2/BUILD.gn -index 83f8889fff..54fcde3a18 100644 ---- a/modules/audio_processing/agc2/BUILD.gn -+++ b/modules/audio_processing/agc2/BUILD.gn -@@ -258,7 +258,7 @@ rtc_library("vad_wrapper") { - - defines = [] - if (rtc_build_with_neon && current_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -diff --git a/modules/audio_processing/agc2/rnn_vad/BUILD.gn b/modules/audio_processing/agc2/rnn_vad/BUILD.gn -index 0fb06b2a86..6ce62e7818 100644 ---- a/modules/audio_processing/agc2/rnn_vad/BUILD.gn -+++ b/modules/audio_processing/agc2/rnn_vad/BUILD.gn -@@ -19,7 +19,7 @@ rtc_library("rnn_vad") { - - defines = [] - if (rtc_build_with_neon && target_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -@@ -87,7 +87,7 @@ rtc_library("rnn_vad_layers") { - - defines = [] - if (rtc_build_with_neon && current_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -@@ -148,7 +148,7 @@ rtc_library("rnn_vad_pitch") { - - defines = [] - if (rtc_build_with_neon && current_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -@@ -271,7 +271,7 @@ if (rtc_include_tests) { - - defines = [] - if (rtc_build_with_neon && current_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -diff --git a/modules/audio_processing/ns/BUILD.gn b/modules/audio_processing/ns/BUILD.gn -index 0e96125f40..c72b3714c4 100644 ---- a/modules/audio_processing/ns/BUILD.gn -+++ b/modules/audio_processing/ns/BUILD.gn -@@ -44,7 +44,7 @@ rtc_static_library("ns") { - - defines = [] - if (rtc_build_with_neon && target_cpu != "arm64") { -- suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] -+ suppressed_configs += [ "//chromium/build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] - } - -diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 6f18642622..4b5acc5bdb 100644 ---- a/modules/desktop_capture/BUILD.gn -+++ b/modules/desktop_capture/BUILD.gn -@@ -6,8 +6,8 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/linux/gtk/gtk.gni") --import("//build/config/ui.gni") -+import("//chromium/build/config/linux/gtk/gtk.gni") -+import("//chromium/build/config/ui.gni") - import("../../webrtc.gni") - - use_desktop_capture_differ_sse2 = target_cpu == "x86" || target_cpu == "x64" -diff --git a/modules/portal/BUILD.gn b/modules/portal/BUILD.gn -index a693604389..72972d18e1 100644 ---- a/modules/portal/BUILD.gn -+++ b/modules/portal/BUILD.gn -@@ -6,7 +6,7 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/linux/pkg_config.gni") -+import("//chromium/build/config/linux/pkg_config.gni") - import("//tools/generate_stubs/rules.gni") - import("../../webrtc.gni") - -diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn -index 2eddb81fd7..11da028bd3 100644 ---- a/modules/video_coding/BUILD.gn -+++ b/modules/video_coding/BUILD.gn -@@ -6,7 +6,7 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/linux/pkg_config.gni") -+import("//chromium/build/config/linux/pkg_config.gni") - import("//libwebrtc/third_party/libaom/options.gni") - import("../../webrtc.gni") - -diff --git a/pc/BUILD.gn b/pc/BUILD.gn -index 0c5df79fb4..70075055cf 100644 ---- a/pc/BUILD.gn -+++ b/pc/BUILD.gn -@@ -30,8 +30,8 @@ - - import("../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - if (rtc_build_libsrtp) { -diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 9d319d5326..9653fd651f 100644 ---- a/rtc_base/BUILD.gn -+++ b/rtc_base/BUILD.gn -@@ -9,8 +9,8 @@ - import("../webrtc.gni") - - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_source_set("protobuf_utils") { -@@ -1894,8 +1894,8 @@ if (!rtc_rusty_base64) { - ] - } - } else { -- import("//build/config/rust.gni") -- import("//build/rust/rust_static_library.gni") -+ import("//chromium/build/config/rust.gni") -+ import("//chromium/build/rust/rust_static_library.gni") - - rust_static_library("base64_rust_bridge") { - allow_unsafe = true # Needed for FFI with cxx crate. -diff --git a/rtc_base/memory/BUILD.gn b/rtc_base/memory/BUILD.gn -index 9a55af3ea9..3d272ba975 100644 ---- a/rtc_base/memory/BUILD.gn -+++ b/rtc_base/memory/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("aligned_malloc") { -diff --git a/rtc_base/synchronization/BUILD.gn b/rtc_base/synchronization/BUILD.gn -index 2a197152b9..4d5008874e 100644 ---- a/rtc_base/synchronization/BUILD.gn -+++ b/rtc_base/synchronization/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_library("yield") { -diff --git a/rtc_base/system/BUILD.gn b/rtc_base/system/BUILD.gn -index 4a772795ed..de27f01bb0 100644 ---- a/rtc_base/system/BUILD.gn -+++ b/rtc_base/system/BUILD.gn -@@ -8,8 +8,8 @@ - - import("../../webrtc.gni") - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - rtc_source_set("arch") { -diff --git a/rtc_tools/network_tester/BUILD.gn b/rtc_tools/network_tester/BUILD.gn -index 4fa98d73a2..72c01d50ab 100644 ---- a/rtc_tools/network_tester/BUILD.gn -+++ b/rtc_tools/network_tester/BUILD.gn -@@ -180,8 +180,8 @@ if (is_android) { - "../../rtc_base:threading", - ] - -- suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] -- configs += [ "//build/config/android:hide_all_but_jni" ] -+ suppressed_configs += [ "//chromium/build/config/android:hide_all_but_jni_onload" ] -+ configs += [ "//chromium/build/config/android:hide_all_but_jni" ] - - output_extension = "so" - } -diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn -index c78cdec7cc..cc5d90b42f 100644 ---- a/sdk/BUILD.gn -+++ b/sdk/BUILD.gn -@@ -9,12 +9,12 @@ - import("//third_party/libaom/options.gni") - import("../webrtc.gni") - if (is_ios) { -- import("//build/config/apple/mobile_config.gni") -- import("//build/config/ios/ios_sdk.gni") -- import("//build/config/ios/rules.gni") -+ import("//chromium/build/config/apple/mobile_config.gni") -+ import("//chromium/build/config/ios/ios_sdk.gni") -+ import("//chromium/build/config/ios/rules.gni") - } - if (is_mac) { -- import("//build/config/mac/rules.gni") -+ import("//chromium/build/config/mac/rules.gni") - } - - group("sdk") { -@@ -67,7 +67,7 @@ if (is_ios || is_mac) { - ] - - if (use_clang_coverage) { -- configs = [ "//build/config/coverage:default_coverage" ] -+ configs = [ "//chromium/build/config/coverage:default_coverage" ] +- "//build/android/gtest_apk:native_test_instrumentation_test_runner_java", ++ "//chromium/build/android/gtest_apk:native_test_instrumentation_test_runner_java", + webrtc_root + "sdk/android:native_test_jni_onload", + webrtc_root + "sdk/android:base_java", + webrtc_root + "test:native_test_java", +@@ -991,11 +991,21 @@ template("rtc_library") { + modified_deps = [] + foreach (dep, deps) { + newdep = string_replace(dep, "//third_party/", "//libwebrtc/third_party/") ++ newdep = string_replace(newdep, "//build", "//chromium/build") + modified_deps += [ newdep ] + } + deps = [] + deps = modified_deps } ++ if (build_with_mozilla && defined(data_deps)) { ++ modified_deps = [] ++ foreach (dep, data_deps) { ++ newdep = string_replace(dep, "//build/", "//chromium/build/") ++ modified_deps += [ newdep ] ++ } ++ data_deps = [] ++ data_deps = modified_deps ++ } } - -@@ -1280,7 +1280,7 @@ if (is_ios || is_mac) { - } - - public_deps = [ -- "//build/config/ios:xctest", -+ "//chromium/build/config/ios:xctest", - "//third_party/ocmock", - ] - } -diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn -index 822b565610..f2ea548824 100644 ---- a/system_wrappers/BUILD.gn -+++ b/system_wrappers/BUILD.gn -@@ -7,8 +7,8 @@ - # be found in the AUTHORS file in the root of the source tree. - - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") } - import("../webrtc.gni") -diff --git a/test/BUILD.gn b/test/BUILD.gn -index f5039000f6..27fbece69e 100644 ---- a/test/BUILD.gn -+++ b/test/BUILD.gn -@@ -6,10 +6,10 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/ui.gni") -+import("//chromium/build/config/ui.gni") - import("../webrtc.gni") - if (is_android) { -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/rules.gni") - import("//third_party/jni_zero/jni_zero.gni") - } - -@@ -415,7 +415,7 @@ if (is_ios && !build_with_chromium) { - testonly = true - visibility = [ "*" ] - sources = [ "ios/google_test_runner.mm" ] -- configs += [ "//build/config/ios:xctest_config" ] -+ configs += [ "//chromium/build/config/ios:xctest_config" ] - frameworks = [ "UIKit.framework" ] - deps = [ ":google_test_runner_delegate" ] - } -diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn -index 9d61ce653a..8d61065eab 100644 ---- a/test/fuzzers/BUILD.gn -+++ b/test/fuzzers/BUILD.gn -@@ -6,7 +6,7 @@ - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - --import("//build/config/features.gni") -+import("//chromium/build/config/features.gni") - import("//testing/libfuzzer/fuzzer_test.gni") - import("../../webrtc.gni") - -@@ -73,7 +73,7 @@ template("webrtc_fuzzer_test") { +@@ -1033,7 +1043,7 @@ template("rtc_executable") { + if (is_win) { + deps += [ + # Give executables the default manifest on Windows (a no-op elsewhere). +- "//build/win:default_exe_manifest", ++ "//chromium/build/win:default_exe_manifest", + ] } - if (!build_with_chromium && is_clang) { -- suppressed_configs = [ "//build/config/clang:find_bad_constructs" ] -+ suppressed_configs = [ "//chromium/build/config/clang:find_bad_constructs" ] - } - } - } -diff --git a/webrtc.gni b/webrtc.gni -index bf4535e14c..b9c2178996 100644 ---- a/webrtc.gni -+++ b/webrtc.gni -@@ -5,12 +5,12 @@ - # tree. An additional intellectual property rights grant can be found - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. --import("//build/config/arm.gni") --import("//build/config/features.gni") --import("//build/config/mips.gni") --import("//build/config/ozone.gni") --import("//build/config/sanitizers/sanitizers.gni") --import("//build/config/sysroot.gni") -+import("//chromium/build/config/arm.gni") -+import("//chromium/build/config/features.gni") -+import("//chromium/build/config/mips.gni") -+import("//chromium/build/config/ozone.gni") -+import("//chromium/build/config/sanitizers/sanitizers.gni") -+import("//chromium/build/config/sysroot.gni") - import("//build_overrides/build.gni") - - if (!build_with_chromium && is_component_build) { -@@ -28,20 +28,20 @@ if (!build_with_chromium && is_component_build) { - } - - if (is_ios) { -- import("//build/config/ios/rules.gni") -+ import("//chromium/build/config/ios/rules.gni") - } - - if (is_mac) { -- import("//build/config/mac/rules.gni") -+ import("//chromium/build/config/mac/rules.gni") - } - - if (is_android) { -- import("//build/config/android/config.gni") -- import("//build/config/android/rules.gni") -+ import("//chromium/build/config/android/config.gni") -+ import("//chromium/build/config/android/rules.gni") - } - - if (is_fuchsia) { -- import("//build/config/fuchsia/config.gni") -+ import("//chromium/build/config/fuchsia/config.gni") - } - - if (build_with_chromium) { -@@ -373,8 +373,8 @@ rtc_common_configs = [ webrtc_root + ":common_config" ] - - if (is_mac || is_ios) { - if (filter_include(default_compiler_configs, -- [ "//build/config/compiler:enable_arc" ]) == []) { -- rtc_common_configs += [ "//build/config/compiler:enable_arc" ] -+ [ "//chromium/build/config/compiler:enable_arc" ]) == []) { -+ rtc_common_configs += [ "//chromium/build/config/compiler:enable_arc" ] - } - } - -@@ -392,7 +392,7 @@ rtc_common_inherited_config = webrtc_root + ":common_inherited_config" - # Common configs to remove or add in all rtc targets. - rtc_remove_configs = [] - if (!build_with_chromium && is_clang) { -- rtc_remove_configs += [ "//build/config/clang:find_bad_constructs" ] -+ rtc_remove_configs += [ "//chromium/build/config/clang:find_bad_constructs" ] - } - rtc_add_configs = rtc_common_configs - rtc_prod_configs = [ webrtc_root + ":rtc_prod_config" ] diff --git a/third_party/libwebrtc/moz-patch-stack/s0104.patch b/third_party/libwebrtc/moz-patch-stack/s0104.patch @@ -1,55 +1,23 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Thu, 10 Oct 2024 13:42:00 +0000 -Subject: Bug 1921707 - add filtering for new build directory location in - third_party/libwebrtc/webrtc.gni r=ng,webrtc-reviewers +Date: Tue, 15 Oct 2024 16:46:00 -0500 +Subject: Bug 1924098 - (fix-e432503389) upstream changed signature of + LibvpxVp9Encoder::InitAndSetControlSettings -Differential Revision: https://phabricator.services.mozilla.com/D224545 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f18c05287ce831369f44715a4174facff4f12652 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/fadad7695efe0d9cc6b999a613b9e1f536e660bd --- - webrtc.gni | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) + modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/webrtc.gni b/webrtc.gni -index b9c2178996..34a8ee592d 100644 ---- a/webrtc.gni -+++ b/webrtc.gni -@@ -536,7 +536,7 @@ template("rtc_test") { - min_sdk_version = 21 - target_sdk_version = 24 - deps += [ -- "//build/android/gtest_apk:native_test_instrumentation_test_runner_java", -+ "//chromium/build/android/gtest_apk:native_test_instrumentation_test_runner_java", - webrtc_root + "sdk/android:native_test_jni_onload", - webrtc_root + "sdk/android:base_java", - webrtc_root + "test:native_test_java", -@@ -991,11 +991,21 @@ template("rtc_library") { - modified_deps = [] - foreach (dep, deps) { - newdep = string_replace(dep, "//third_party/", "//libwebrtc/third_party/") -+ newdep = string_replace(newdep, "//build", "//chromium/build") - modified_deps += [ newdep ] - } - deps = [] - deps = modified_deps - } -+ if (build_with_mozilla && defined(data_deps)) { -+ modified_deps = [] -+ foreach (dep, data_deps) { -+ newdep = string_replace(dep, "//build/", "//chromium/build/") -+ modified_deps += [ newdep ] -+ } -+ data_deps = [] -+ data_deps = modified_deps -+ } - } - } - -@@ -1033,7 +1043,7 @@ template("rtc_executable") { - if (is_win) { - deps += [ - # Give executables the default manifest on Windows (a no-op elsewhere). -- "//build/win:default_exe_manifest", -+ "//chromium/build/win:default_exe_manifest", - ] - } - +diff --git a/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc b/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc +index f0f2e3b853..34f50ee61a 100644 +--- a/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc ++++ b/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc +@@ -1338,7 +1338,7 @@ int LibvpxVp9Encoder::UpdateCodecFrameSize( + // bugs in trying to do it the "right" way, we basically re-do + // the initialization. + vpx_codec_destroy(encoder_); // clean up old state +- int result = InitAndSetControlSettings(&codec_); ++ int result = InitAndSetControlSettings(); + if (result == WEBRTC_VIDEO_CODEC_OK) { + // TODO: Mozilla rates have become much more complicated, we need to store + // more state or find another way of doing this. diff --git a/third_party/libwebrtc/moz-patch-stack/s0105.patch b/third_party/libwebrtc/moz-patch-stack/s0105.patch @@ -1,23 +1,31 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Tue, 15 Oct 2024 16:46:00 -0500 -Subject: Bug 1924098 - (fix-e432503389) upstream changed signature of - LibvpxVp9Encoder::InitAndSetControlSettings +Date: Tue, 29 Oct 2024 18:20:00 +0000 +Subject: Bug 1925119 - add dcsctp to libwebrtc build. r=bwc,webrtc-reviewers -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/fadad7695efe0d9cc6b999a613b9e1f536e660bd +Differential Revision: https://phabricator.services.mozilla.com/D225892 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/90a33b06e51017d25542a95c2a460bfed41c553b --- - modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + BUILD.gn | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc b/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc -index f0f2e3b853..34f50ee61a 100644 ---- a/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc -+++ b/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc -@@ -1338,7 +1338,7 @@ int LibvpxVp9Encoder::UpdateCodecFrameSize( - // bugs in trying to do it the "right" way, we basically re-do - // the initialization. - vpx_codec_destroy(encoder_); // clean up old state -- int result = InitAndSetControlSettings(&codec_); -+ int result = InitAndSetControlSettings(); - if (result == WEBRTC_VIDEO_CODEC_OK) { - // TODO: Mozilla rates have become much more complicated, we need to store - // more state or find another way of doing this. +diff --git a/BUILD.gn b/BUILD.gn +index 28fb57a248..2e315c79c4 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -565,6 +565,7 @@ if (!build_with_chromium) { + "call", + "common_audio", + "common_video", ++ ":dcsctp", + "logging:rtc_event_log_api", + "media", + "modules", +@@ -849,7 +850,7 @@ if (rtc_include_tests && !build_with_chromium) { + # Build target for standalone dcsctp + rtc_static_library("dcsctp") { + # Only the root target should depend on this. +- visibility = [ "//:default" ] ++ visibility = [ "//:default", "//libwebrtc:webrtc" ] + sources = [] + complete_static_lib = true + suppressed_configs += [ "//chromium/build/config/compiler:thin_archive" ] diff --git a/third_party/libwebrtc/moz-patch-stack/s0106.patch b/third_party/libwebrtc/moz-patch-stack/s0106.patch @@ -1,31 +1,25 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Tue, 29 Oct 2024 18:20:00 +0000 -Subject: Bug 1925119 - add dcsctp to libwebrtc build. r=bwc,webrtc-reviewers +Date: Tue, 19 Nov 2024 16:05:00 -0600 +Subject: Bug 1928110 - (fix-b9c4c242d4) handle upstream last_arrival_timestamp + to last_arrival_ntp_timestamp -Differential Revision: https://phabricator.services.mozilla.com/D225892 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/90a33b06e51017d25542a95c2a460bfed41c553b +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/6918cf2d9126fa3e3676386349f6e383c298d8ab --- - BUILD.gn | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + modules/rtp_rtcp/source/rtcp_receiver.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/BUILD.gn b/BUILD.gn -index 28fb57a248..2e315c79c4 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -565,6 +565,7 @@ if (!build_with_chromium) { - "call", - "common_audio", - "common_video", -+ ":dcsctp", - "logging:rtc_event_log_api", - "media", - "modules", -@@ -849,7 +850,7 @@ if (rtc_include_tests && !build_with_chromium) { - # Build target for standalone dcsctp - rtc_static_library("dcsctp") { - # Only the root target should depend on this. -- visibility = [ "//:default" ] -+ visibility = [ "//:default", "//libwebrtc:webrtc" ] - sources = [] - complete_static_lib = true - suppressed_configs += [ "//chromium/build/config/compiler:thin_archive" ] +diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc +index 9061eec513..cb3111127a 100644 +--- a/modules/rtp_rtcp/source/rtcp_receiver.cc ++++ b/modules/rtp_rtcp/source/rtcp_receiver.cc +@@ -393,8 +393,8 @@ void RTCPReceiver::RemoteRTCPSenderInfo(uint32_t* packet_count, + MutexLock lock(&rtcp_receiver_lock_); + *packet_count = remote_sender_.packets_sent; + *octet_count = remote_sender_.bytes_sent; +- *ntp_timestamp_ms = remote_sender_.last_arrival_timestamp.ToMs(); +- *remote_ntp_timestamp_ms = remote_sender_.last_remote_timestamp.ToMs(); ++ *ntp_timestamp_ms = remote_sender_.last_arrival_ntp_timestamp.ToMs(); ++ *remote_ntp_timestamp_ms = remote_sender_.last_remote_ntp_timestamp.ToMs(); + } + + std::vector<ReportBlockData> RTCPReceiver::GetLatestReportBlockData() const { diff --git a/third_party/libwebrtc/moz-patch-stack/s0107.patch b/third_party/libwebrtc/moz-patch-stack/s0107.patch @@ -1,25 +1,170 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Tue, 19 Nov 2024 16:05:00 -0600 -Subject: Bug 1928110 - (fix-b9c4c242d4) handle upstream last_arrival_timestamp - to last_arrival_ntp_timestamp +From: Nico Grunbaum <na-g@nostrum.com> +Date: Wed, 27 Nov 2024 03:41:00 +0000 +Subject: Bug 1921154 - libwebrtc build related changes for + AV1;r=mjf,webrtc-reviewers -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/6918cf2d9126fa3e3676386349f6e383c298d8ab +These are most of the changes needed to get a build with AV1. +The crypto/openssl changes are later altered in the stack adding an NSPR based implementation of the functionality that was missing. + +Differential Revision: https://phabricator.services.mozilla.com/D228540 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/4527c41ef71d7683c60d9c435991a0d93bc5ce4d --- - modules/rtp_rtcp/source/rtcp_receiver.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + BUILD.gn | 4 ++++ + media/BUILD.gn | 24 ++++++++++++++---------- + rtc_base/BUILD.gn | 4 ++++ + webrtc.gni | 4 ++-- + 4 files changed, 24 insertions(+), 12 deletions(-) -diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc -index 9061eec513..cb3111127a 100644 ---- a/modules/rtp_rtcp/source/rtcp_receiver.cc -+++ b/modules/rtp_rtcp/source/rtcp_receiver.cc -@@ -393,8 +393,8 @@ void RTCPReceiver::RemoteRTCPSenderInfo(uint32_t* packet_count, - MutexLock lock(&rtcp_receiver_lock_); - *packet_count = remote_sender_.packets_sent; - *octet_count = remote_sender_.bytes_sent; -- *ntp_timestamp_ms = remote_sender_.last_arrival_timestamp.ToMs(); -- *remote_ntp_timestamp_ms = remote_sender_.last_remote_timestamp.ToMs(); -+ *ntp_timestamp_ms = remote_sender_.last_arrival_ntp_timestamp.ToMs(); -+ *remote_ntp_timestamp_ms = remote_sender_.last_remote_ntp_timestamp.ToMs(); - } - - std::vector<ReportBlockData> RTCPReceiver::GetLatestReportBlockData() const { +diff --git a/BUILD.gn b/BUILD.gn +index 2e315c79c4..174ce0d2f4 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -521,6 +521,9 @@ if (!rtc_build_ssl) { + "crypto", + "ssl", + ] ++ if (build_with_mozilla) { ++ libs = [] ++ } + } + } + +@@ -615,6 +618,7 @@ if (!build_with_chromium) { + "api/environment:environment_factory", + "api/video:video_frame", + "api/video:video_rtp_headers", ++ "api/video_codecs:builtin_video_decoder_factory", + "test:rtp_test_utils", + ] + # Added when we removed deps in other places to avoid building +diff --git a/media/BUILD.gn b/media/BUILD.gn +index e50b924806..ac722ddda3 100644 +--- a/media/BUILD.gn ++++ b/media/BUILD.gn +@@ -12,12 +12,10 @@ import("../webrtc.gni") + + group("media") { + deps = [] +- if (!build_with_mozilla) { +- deps += [ +- ":rtc_media", +- ":rtc_media_base", +- ] +- } ++ deps += [ ++ ":rtc_media", ++ ":rtc_media_base", ++ ] + } + + config("rtc_media_defines_config") { +@@ -281,6 +279,9 @@ rtc_library("media_engine") { + "base/media_engine.cc", + "base/media_engine.h", + ] ++ deps -= [ ++ ":media_channel_impl", ++ ] + } + } + +@@ -432,6 +433,7 @@ rtc_library("codec_list") { + ] + } + ++# MOZILLA Bug 1931241 - how much of this do we need? + rtc_library("rtp_utils") { + if (!build_with_mozilla) { + sources = [ +@@ -478,7 +480,6 @@ rtc_library("media_constants") { + } + + rtc_library("turn_utils") { +-if (!build_with_mozilla) { + sources = [ + "base/turn_utils.cc", + "base/turn_utils.h", +@@ -489,17 +490,14 @@ if (!build_with_mozilla) { + "../rtc_base/system:rtc_export", + ] + } +-} + + rtc_library("rid_description") { +-if (!build_with_mozilla) { + sources = [ + "base/rid_description.cc", + "base/rid_description.h", + ] + deps = [ ":codec" ] + } +-} + + rtc_library("rtc_simulcast_encoder_adapter") { + visibility = [ "*" ] +@@ -717,6 +715,12 @@ rtc_library("rtc_audio_video") { + "engine/webrtc_voice_engine.cc", + "engine/webrtc_voice_engine.h", + ] ++ if (build_with_mozilla) { ++ sources -= [ ++ "engine/webrtc_video_engine.cc", ++ "engine/webrtc_voice_engine.cc", ++ ] ++ } + + public_configs = [] + if (!build_with_chromium) { +diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn +index 9653fd651f..82b050a559 100644 +--- a/rtc_base/BUILD.gn ++++ b/rtc_base/BUILD.gn +@@ -1533,6 +1533,7 @@ rtc_source_set("ssl_header") { + } + + rtc_library("digest") { ++if (!build_with_mozilla) { + visibility = [ "*" ] + sources = [ + "message_digest.cc", +@@ -1554,8 +1555,10 @@ rtc_library("digest") { + configs += [ "..:external_ssl_library" ] + } + } ++} + + rtc_library("crypto_random") { ++if (!build_with_mozilla) { + visibility = [ "*" ] + sources = [ + "crypto_random.cc", +@@ -1576,6 +1579,7 @@ rtc_library("crypto_random") { + configs += [ "..:external_ssl_library" ] + } + } ++} + + rtc_library("ssl") { + if (!build_with_mozilla) { +diff --git a/webrtc.gni b/webrtc.gni +index 34a8ee592d..d29a86112b 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -116,7 +116,7 @@ declare_args() { + + # Used to specify an external OpenSSL include path when not compiling the + # library that comes with WebRTC (i.e. rtc_build_ssl == 0). +- rtc_ssl_root = "unused" ++ rtc_ssl_root = "" + + # Enable when an external authentication mechanism is used for performing + # packet authentication for RTP packets instead of libsrtp. +@@ -341,7 +341,7 @@ declare_args() { + } + + # Enable liboam only on non-mozilla builds. +-enable_libaom = !build_with_mozilla ++enable_libaom = true + + # Make it possible to provide custom locations for some libraries (move these + # up into declare_args should we need to actually use them for the GN build). diff --git a/third_party/libwebrtc/moz-patch-stack/s0108.patch b/third_party/libwebrtc/moz-patch-stack/s0108.patch @@ -1,170 +1,23 @@ -From: Nico Grunbaum <na-g@nostrum.com> -Date: Wed, 27 Nov 2024 03:41:00 +0000 -Subject: Bug 1921154 - libwebrtc build related changes for - AV1;r=mjf,webrtc-reviewers +From: Michael Froman <mfroman@mozilla.com> +Date: Mon, 13 Jan 2025 08:14:00 -0600 +Subject: Bug 1942428 - (fix-69cc695699) uncomment an arg that upstream thinks + is unused -These are most of the changes needed to get a build with AV1. -The crypto/openssl changes are later altered in the stack adding an NSPR based implementation of the functionality that was missing. - -Differential Revision: https://phabricator.services.mozilla.com/D228540 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/4527c41ef71d7683c60d9c435991a0d93bc5ce4d +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/73f9e0e64eb65e9f2579b0f3eb34b88e2b5e5d74 --- - BUILD.gn | 4 ++++ - media/BUILD.gn | 24 ++++++++++++++---------- - rtc_base/BUILD.gn | 4 ++++ - webrtc.gni | 4 ++-- - 4 files changed, 24 insertions(+), 12 deletions(-) + modules/rtp_rtcp/source/rtcp_sender.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/BUILD.gn b/BUILD.gn -index 2e315c79c4..174ce0d2f4 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -521,6 +521,9 @@ if (!rtc_build_ssl) { - "crypto", - "ssl", - ] -+ if (build_with_mozilla) { -+ libs = [] -+ } - } - } - -@@ -615,6 +618,7 @@ if (!build_with_chromium) { - "api/environment:environment_factory", - "api/video:video_frame", - "api/video:video_rtp_headers", -+ "api/video_codecs:builtin_video_decoder_factory", - "test:rtp_test_utils", - ] - # Added when we removed deps in other places to avoid building -diff --git a/media/BUILD.gn b/media/BUILD.gn -index e50b924806..ac722ddda3 100644 ---- a/media/BUILD.gn -+++ b/media/BUILD.gn -@@ -12,12 +12,10 @@ import("../webrtc.gni") - - group("media") { - deps = [] -- if (!build_with_mozilla) { -- deps += [ -- ":rtc_media", -- ":rtc_media_base", -- ] -- } -+ deps += [ -+ ":rtc_media", -+ ":rtc_media_base", -+ ] - } - - config("rtc_media_defines_config") { -@@ -281,6 +279,9 @@ rtc_library("media_engine") { - "base/media_engine.cc", - "base/media_engine.h", - ] -+ deps -= [ -+ ":media_channel_impl", -+ ] - } - } - -@@ -432,6 +433,7 @@ rtc_library("codec_list") { - ] - } - -+# MOZILLA Bug 1931241 - how much of this do we need? - rtc_library("rtp_utils") { - if (!build_with_mozilla) { - sources = [ -@@ -478,7 +480,6 @@ rtc_library("media_constants") { - } - - rtc_library("turn_utils") { --if (!build_with_mozilla) { - sources = [ - "base/turn_utils.cc", - "base/turn_utils.h", -@@ -489,17 +490,14 @@ if (!build_with_mozilla) { - "../rtc_base/system:rtc_export", - ] - } --} - - rtc_library("rid_description") { --if (!build_with_mozilla) { - sources = [ - "base/rid_description.cc", - "base/rid_description.h", - ] - deps = [ ":codec" ] - } --} - - rtc_library("rtc_simulcast_encoder_adapter") { - visibility = [ "*" ] -@@ -717,6 +715,12 @@ rtc_library("rtc_audio_video") { - "engine/webrtc_voice_engine.cc", - "engine/webrtc_voice_engine.h", - ] -+ if (build_with_mozilla) { -+ sources -= [ -+ "engine/webrtc_video_engine.cc", -+ "engine/webrtc_voice_engine.cc", -+ ] -+ } - - public_configs = [] - if (!build_with_chromium) { -diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 9653fd651f..82b050a559 100644 ---- a/rtc_base/BUILD.gn -+++ b/rtc_base/BUILD.gn -@@ -1533,6 +1533,7 @@ rtc_source_set("ssl_header") { - } - - rtc_library("digest") { -+if (!build_with_mozilla) { - visibility = [ "*" ] - sources = [ - "message_digest.cc", -@@ -1554,8 +1555,10 @@ rtc_library("digest") { - configs += [ "..:external_ssl_library" ] - } - } -+} - - rtc_library("crypto_random") { -+if (!build_with_mozilla) { - visibility = [ "*" ] - sources = [ - "crypto_random.cc", -@@ -1576,6 +1579,7 @@ rtc_library("crypto_random") { - configs += [ "..:external_ssl_library" ] - } - } -+} - - rtc_library("ssl") { - if (!build_with_mozilla) { -diff --git a/webrtc.gni b/webrtc.gni -index 34a8ee592d..d29a86112b 100644 ---- a/webrtc.gni -+++ b/webrtc.gni -@@ -116,7 +116,7 @@ declare_args() { - - # Used to specify an external OpenSSL include path when not compiling the - # library that comes with WebRTC (i.e. rtc_build_ssl == 0). -- rtc_ssl_root = "unused" -+ rtc_ssl_root = "" - - # Enable when an external authentication mechanism is used for performing - # packet authentication for RTP packets instead of libsrtp. -@@ -341,7 +341,7 @@ declare_args() { - } - - # Enable liboam only on non-mozilla builds. --enable_libaom = !build_with_mozilla -+enable_libaom = true - - # Make it possible to provide custom locations for some libraries (move these - # up into declare_args should we need to actually use them for the GN build). +diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc +index 4f7ec4f751..14dcdd9cfa 100644 +--- a/modules/rtp_rtcp/source/rtcp_sender.cc ++++ b/modules/rtp_rtcp/source/rtcp_sender.cc +@@ -215,7 +215,7 @@ bool RTCPSender::Sending() const { + return sending_; + } + +-void RTCPSender::SetSendingStatus(const FeedbackState& /* feedback_state */, ++void RTCPSender::SetSendingStatus(const FeedbackState& feedback_state, + bool sending) { + bool sendRTCPBye = false; + { diff --git a/third_party/libwebrtc/moz-patch-stack/s0109.patch b/third_party/libwebrtc/moz-patch-stack/s0109.patch @@ -1,23 +1,40 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Mon, 13 Jan 2025 08:14:00 -0600 -Subject: Bug 1942428 - (fix-69cc695699) uncomment an arg that upstream thinks - is unused +From: Andreas Pehrson <apehrson@mozilla.com> +Date: Tue, 28 Jan 2025 21:45:00 +0000 +Subject: Bug 1938047 - Link adapted_video_track_source.cc and generate webrtc + moz.build files. r=ng,webrtc-reviewers -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/73f9e0e64eb65e9f2579b0f3eb34b88e2b5e5d74 +Differential Revision: https://phabricator.services.mozilla.com/D234863 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b6dd815fc9d2df718a1b48b96f58f99c0cfb7e19 --- - modules/rtp_rtcp/source/rtcp_sender.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + media/BUILD.gn | 11 ----------- + 1 file changed, 11 deletions(-) -diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc -index 4f7ec4f751..14dcdd9cfa 100644 ---- a/modules/rtp_rtcp/source/rtcp_sender.cc -+++ b/modules/rtp_rtcp/source/rtcp_sender.cc -@@ -215,7 +215,7 @@ bool RTCPSender::Sending() const { - return sending_; - } - --void RTCPSender::SetSendingStatus(const FeedbackState& /* feedback_state */, -+void RTCPSender::SetSendingStatus(const FeedbackState& feedback_state, - bool sending) { - bool sendRTCPBye = false; - { +diff --git a/media/BUILD.gn b/media/BUILD.gn +index ac722ddda3..31df4610c7 100644 +--- a/media/BUILD.gn ++++ b/media/BUILD.gn +@@ -54,11 +54,6 @@ rtc_library("rtc_media_base") { + "base/video_broadcaster.h", # Used downstream + "base/video_common.h", # Used downstream + ] +- if (build_with_mozilla) { +- sources -= [ +- "base/adapted_video_track_source.h", +- ] +- } + deps = [ + ":adapted_video_track_source", + ":codec", +@@ -139,12 +134,6 @@ rtc_library("adapted_video_track_source") { + "base/adapted_video_track_source.cc", + "base/adapted_video_track_source.h", + ] +- if (build_with_mozilla) { +- sources -= [ +- "base/adapted_video_track_source.cc", +- "base/adapted_video_track_source.h", +- ] +- } + deps = [ + ":video_adapter", + ":video_broadcaster", diff --git a/third_party/libwebrtc/moz-patch-stack/s0110.patch b/third_party/libwebrtc/moz-patch-stack/s0110.patch @@ -1,40 +1,49 @@ From: Andreas Pehrson <apehrson@mozilla.com> Date: Tue, 28 Jan 2025 21:45:00 +0000 -Subject: Bug 1938047 - Link adapted_video_track_source.cc and generate webrtc - moz.build files. r=ng,webrtc-reviewers +Subject: Bug 1938047 - Hook up VideoStreamFactory with EncoderInfo like the + libwebrtc factory. r=webrtc-reviewers,dbaker -Differential Revision: https://phabricator.services.mozilla.com/D234863 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b6dd815fc9d2df718a1b48b96f58f99c0cfb7e19 +This is necessary for the factory to factor in the encoder's resolution +alignment requirements when calculating stream resolutions. + +Differential Revision: https://phabricator.services.mozilla.com/D235702 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8b5653392e88ccd0c2b0675c761bb22733364225 --- - media/BUILD.gn | 11 ----------- - 1 file changed, 11 deletions(-) + video/config/video_encoder_config.h | 4 ++++ + video/video_stream_encoder.cc | 1 + + 2 files changed, 5 insertions(+) -diff --git a/media/BUILD.gn b/media/BUILD.gn -index ac722ddda3..31df4610c7 100644 ---- a/media/BUILD.gn -+++ b/media/BUILD.gn -@@ -54,11 +54,6 @@ rtc_library("rtc_media_base") { - "base/video_broadcaster.h", # Used downstream - "base/video_common.h", # Used downstream - ] -- if (build_with_mozilla) { -- sources -= [ -- "base/adapted_video_track_source.h", -- ] -- } - deps = [ - ":adapted_video_track_source", - ":codec", -@@ -139,12 +134,6 @@ rtc_library("adapted_video_track_source") { - "base/adapted_video_track_source.cc", - "base/adapted_video_track_source.h", - ] -- if (build_with_mozilla) { -- sources -= [ -- "base/adapted_video_track_source.cc", -- "base/adapted_video_track_source.h", -- ] -- } - deps = [ - ":video_adapter", - ":video_broadcaster", +diff --git a/video/config/video_encoder_config.h b/video/config/video_encoder_config.h +index 7fda03ffa8..8ca8462dd0 100644 +--- a/video/config/video_encoder_config.h ++++ b/video/config/video_encoder_config.h +@@ -26,6 +26,7 @@ + #include "api/video_codecs/sdp_video_format.h" + #include "api/video_codecs/spatial_layer.h" + #include "api/video_codecs/video_codec.h" ++#include "api/video_codecs/video_encoder.h" + + namespace webrtc { + +@@ -153,6 +154,9 @@ class VideoEncoderConfig { + int frame_height, + const VideoEncoderConfig& encoder_config) = 0; + ++ // Mozilla: Patching in necessary info our custom VideoStreamFactory will need to know. ++ virtual void SetEncoderInfo(const VideoEncoder::EncoderInfo& info) {} ++ + protected: + ~VideoStreamFactoryInterface() override {} + }; +diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc +index fa0308f0f7..22d03dba57 100644 +--- a/video/video_stream_encoder.cc ++++ b/video/video_stream_encoder.cc +@@ -1055,6 +1055,7 @@ void VideoStreamEncoder::ReconfigureEncoder() { + std::vector<VideoStream> streams; + if (encoder_config_.video_stream_factory) { + // Note: only tests set their own EncoderStreamFactory... ++ encoder_config_.video_stream_factory->SetEncoderInfo(encoder_->GetEncoderInfo()); + streams = encoder_config_.video_stream_factory->CreateEncoderStreams( + env_.field_trials(), last_frame_info_->width, last_frame_info_->height, + encoder_config_); diff --git a/third_party/libwebrtc/moz-patch-stack/s0111.patch b/third_party/libwebrtc/moz-patch-stack/s0111.patch @@ -1,49 +1,23 @@ -From: Andreas Pehrson <apehrson@mozilla.com> -Date: Tue, 28 Jan 2025 21:45:00 +0000 -Subject: Bug 1938047 - Hook up VideoStreamFactory with EncoderInfo like the - libwebrtc factory. r=webrtc-reviewers,dbaker +From: Michael Froman <mfroman@mozilla.com> +Date: Wed, 5 Feb 2025 18:03:00 +0000 +Subject: Bug 1942171 - add builtin_audio_processing_builder to the libwebrtc + build. r=pehrsons,webrtc-reviewers -This is necessary for the factory to factor in the encoder's resolution -alignment requirements when calculating stream resolutions. - -Differential Revision: https://phabricator.services.mozilla.com/D235702 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8b5653392e88ccd0c2b0675c761bb22733364225 +Differential Revision: https://phabricator.services.mozilla.com/D234594 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/27c29807e6f46562d2b6bae4b7b06a5966290afe --- - video/config/video_encoder_config.h | 4 ++++ - video/video_stream_encoder.cc | 1 + - 2 files changed, 5 insertions(+) + BUILD.gn | 1 + + 1 file changed, 1 insertion(+) -diff --git a/video/config/video_encoder_config.h b/video/config/video_encoder_config.h -index 7fda03ffa8..8ca8462dd0 100644 ---- a/video/config/video_encoder_config.h -+++ b/video/config/video_encoder_config.h -@@ -26,6 +26,7 @@ - #include "api/video_codecs/sdp_video_format.h" - #include "api/video_codecs/spatial_layer.h" - #include "api/video_codecs/video_codec.h" -+#include "api/video_codecs/video_encoder.h" - - namespace webrtc { - -@@ -153,6 +154,9 @@ class VideoEncoderConfig { - int frame_height, - const VideoEncoderConfig& encoder_config) = 0; +diff --git a/BUILD.gn b/BUILD.gn +index 174ce0d2f4..600993950b 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -615,6 +615,7 @@ if (!build_with_chromium) { -+ // Mozilla: Patching in necessary info our custom VideoStreamFactory will need to know. -+ virtual void SetEncoderInfo(const VideoEncoder::EncoderInfo& info) {} -+ - protected: - ~VideoStreamFactoryInterface() override {} - }; -diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc -index fa0308f0f7..22d03dba57 100644 ---- a/video/video_stream_encoder.cc -+++ b/video/video_stream_encoder.cc -@@ -1055,6 +1055,7 @@ void VideoStreamEncoder::ReconfigureEncoder() { - std::vector<VideoStream> streams; - if (encoder_config_.video_stream_factory) { - // Note: only tests set their own EncoderStreamFactory... -+ encoder_config_.video_stream_factory->SetEncoderInfo(encoder_->GetEncoderInfo()); - streams = encoder_config_.video_stream_factory->CreateEncoderStreams( - env_.field_trials(), last_frame_info_->width, last_frame_info_->height, - encoder_config_); + if (build_with_mozilla) { + deps += [ ++ "api/audio:builtin_audio_processing_builder", + "api/environment:environment_factory", + "api/video:video_frame", + "api/video:video_rtp_headers", diff --git a/third_party/libwebrtc/moz-patch-stack/s0112.patch b/third_party/libwebrtc/moz-patch-stack/s0112.patch @@ -1,23 +1,26 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Wed, 5 Feb 2025 18:03:00 +0000 -Subject: Bug 1942171 - add builtin_audio_processing_builder to the libwebrtc - build. r=pehrsons,webrtc-reviewers +Date: Fri, 7 Feb 2025 15:53:00 -0600 +Subject: Bug 1942428 - (fix-882b32d00f) fix + -Wtautological-unsigned-zero-compare in payload_type.h -Differential Revision: https://phabricator.services.mozilla.com/D234594 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/27c29807e6f46562d2b6bae4b7b06a5966290afe +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f3ed04250e9ec1b22731ac690eb66bc96ff894d6 --- - BUILD.gn | 1 + - 1 file changed, 1 insertion(+) + call/payload_type.h | 4 ++++ + 1 file changed, 4 insertions(+) -diff --git a/BUILD.gn b/BUILD.gn -index 174ce0d2f4..600993950b 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -615,6 +615,7 @@ if (!build_with_chromium) { - - if (build_with_mozilla) { - deps += [ -+ "api/audio:builtin_audio_processing_builder", - "api/environment:environment_factory", - "api/video:video_frame", - "api/video:video_rtp_headers", +diff --git a/call/payload_type.h b/call/payload_type.h +index d91da50fcc..a5e120417e 100644 +--- a/call/payload_type.h ++++ b/call/payload_type.h +@@ -33,7 +33,11 @@ class PayloadType : public StrongAlias<class PayloadTypeTag, uint8_t> { + if (rtcp_mux && (id > 63 && id < 96)) { + return false; + } ++#if defined(WEBRTC_MOZILLA_BUILD) ++ return id <= 127; // id is unsigned, therefor always >= 0 ++#else + return id >= 0 && id <= 127; ++#endif + } + template <typename Sink> + friend void AbslStringify(Sink& sink, const PayloadType pt) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0113.patch b/third_party/libwebrtc/moz-patch-stack/s0113.patch @@ -1,26 +1,23 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Fri, 7 Feb 2025 15:53:00 -0600 -Subject: Bug 1942428 - (fix-882b32d00f) fix - -Wtautological-unsigned-zero-compare in payload_type.h +Date: Fri, 7 Mar 2025 17:43:00 -0600 +Subject: Bug 1952339 - (fix-68e7b00928) add default param to emplace() to fix + compile issue -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f3ed04250e9ec1b22731ac690eb66bc96ff894d6 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/26c916591791b13a3d8888066c22c5ba49c86c47 --- - call/payload_type.h | 4 ++++ - 1 file changed, 4 insertions(+) + call/rtp_config.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/call/payload_type.h b/call/payload_type.h -index d91da50fcc..a5e120417e 100644 ---- a/call/payload_type.h -+++ b/call/payload_type.h -@@ -33,7 +33,11 @@ class PayloadType : public StrongAlias<class PayloadTypeTag, uint8_t> { - if (rtcp_mux && (id > 63 && id < 96)) { - return false; - } -+#if defined(WEBRTC_MOZILLA_BUILD) -+ return id <= 127; // id is unsigned, therefor always >= 0 -+#else - return id >= 0 && id <= 127; -+#endif +diff --git a/call/rtp_config.cc b/call/rtp_config.cc +index 115912cd46..5e08467d1f 100644 +--- a/call/rtp_config.cc ++++ b/call/rtp_config.cc +@@ -258,7 +258,7 @@ RtpStreamConfig RtpConfig::GetStreamConfig(size_t index) const { + stream_config.raw_payload = raw_payload; + if (!rtx.ssrcs.empty()) { + RTC_DCHECK_EQ(ssrcs.size(), rtx.ssrcs.size()); +- auto& stream_config_rtx = stream_config.rtx.emplace(); ++ auto& stream_config_rtx = stream_config.rtx.emplace(RtpStreamConfig::Rtx()); + stream_config_rtx.ssrc = rtx.ssrcs[index]; + stream_config_rtx.payload_type = rtx.payload_type; } - template <typename Sink> - friend void AbslStringify(Sink& sink, const PayloadType pt) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0114.patch b/third_party/libwebrtc/moz-patch-stack/s0114.patch @@ -1,23 +1,63 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Fri, 7 Mar 2025 17:43:00 -0600 -Subject: Bug 1952339 - (fix-68e7b00928) add default param to emplace() to fix - compile issue +From: Jan Grulich <jgrulich@redhat.com> +Date: Mon, 14 Apr 2025 16:37:00 +0000 +Subject: Bug 1954903 - Update libwebrtc GN configs r=webrtc-reviewers,mjf -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/26c916591791b13a3d8888066c22c5ba49c86c47 +Update GN config files for the special handling in gn_processor.py for +gbm, drm and PipeWire libraries. + +Also remove libwebrtc/third_party/[gbm,drm,pipewire] libs for which we +now have a special handling in gn_processor.py. + +Differential Revision: https://phabricator.services.mozilla.com/D242101 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/506d4efaf2dc29472623beff64cc2bd0d5555afd --- - call/rtp_config.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + modules/desktop_capture/BUILD.gn | 4 ++++ + modules/portal/BUILD.gn | 4 +--- + modules/video_capture/BUILD.gn | 2 +- + 3 files changed, 6 insertions(+), 4 deletions(-) -diff --git a/call/rtp_config.cc b/call/rtp_config.cc -index 115912cd46..5e08467d1f 100644 ---- a/call/rtp_config.cc -+++ b/call/rtp_config.cc -@@ -258,7 +258,7 @@ RtpStreamConfig RtpConfig::GetStreamConfig(size_t index) const { - stream_config.raw_payload = raw_payload; - if (!rtx.ssrcs.empty()) { - RTC_DCHECK_EQ(ssrcs.size(), rtx.ssrcs.size()); -- auto& stream_config_rtx = stream_config.rtx.emplace(); -+ auto& stream_config_rtx = stream_config.rtx.emplace(RtpStreamConfig::Rtx()); - stream_config_rtx.ssrc = rtx.ssrcs[index]; - stream_config_rtx.payload_type = rtx.payload_type; +diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn +index 4b5acc5bdb..484a47894b 100644 +--- a/modules/desktop_capture/BUILD.gn ++++ b/modules/desktop_capture/BUILD.gn +@@ -553,6 +553,10 @@ rtc_library("desktop_capture") { + "../../rtc_base:sanitizer", + "../portal", + ] ++ ++ if (build_with_mozilla) { ++ defines += [ "WEBRTC_USE_PIPEWIRE" ] ++ } + } + + if (rtc_enable_win_wgc) { +diff --git a/modules/portal/BUILD.gn b/modules/portal/BUILD.gn +index 72972d18e1..70b4739ad0 100644 +--- a/modules/portal/BUILD.gn ++++ b/modules/portal/BUILD.gn +@@ -139,11 +139,9 @@ if (!build_with_mozilla) { + deps -= [ ":pipewire_stubs" ] + defines -= [ "WEBRTC_DLOPEN_PIPEWIRE" ] + public_deps = [ +- "../../third_party/pipewire", +- "../../third_party/drm", +- "../../third_party/gbm", + "../../third_party/libepoxy" + ] ++ defines += [ "WEBRTC_USE_PIPEWIRE" ] + } } + } +diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn +index 83c1b21260..e32e3ab37e 100644 +--- a/modules/video_capture/BUILD.gn ++++ b/modules/video_capture/BUILD.gn +@@ -118,7 +118,7 @@ if (!build_with_chromium || is_linux || is_chromeos) { + ] + if (build_with_mozilla) { + configs -= [ "../portal:pipewire_base" ] +- public_deps = [ "../../third_party/pipewire" ] ++ defines = [ "WEBRTC_USE_PIPEWIRE" ] + } + } + } diff --git a/third_party/libwebrtc/moz-patch-stack/s0115.patch b/third_party/libwebrtc/moz-patch-stack/s0115.patch @@ -1,63 +1,24 @@ -From: Jan Grulich <jgrulich@redhat.com> -Date: Mon, 14 Apr 2025 16:37:00 +0000 -Subject: Bug 1954903 - Update libwebrtc GN configs r=webrtc-reviewers,mjf +From: Michael Froman <mfroman@mozilla.com> +Date: Tue, 13 May 2025 22:39:00 +0000 +Subject: Bug 1966238 - (fix-bf85c38fb3) fix build for our added 'pid' field in + DesktopCapturer::Source r?pehrsons! -Update GN config files for the special handling in gn_processor.py for -gbm, drm and PipeWire libraries. - -Also remove libwebrtc/third_party/[gbm,drm,pipewire] libs for which we -now have a special handling in gn_processor.py. - -Differential Revision: https://phabricator.services.mozilla.com/D242101 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/506d4efaf2dc29472623beff64cc2bd0d5555afd +Differential Revision: https://phabricator.services.mozilla.com/D249164 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b6b37905a574e7706d98eb683e6800c9525815e7 --- - modules/desktop_capture/BUILD.gn | 4 ++++ - modules/portal/BUILD.gn | 4 +--- - modules/video_capture/BUILD.gn | 2 +- - 3 files changed, 6 insertions(+), 4 deletions(-) + modules/desktop_capture/mac/screen_capturer_sck.mm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 4b5acc5bdb..484a47894b 100644 ---- a/modules/desktop_capture/BUILD.gn -+++ b/modules/desktop_capture/BUILD.gn -@@ -553,6 +553,10 @@ rtc_library("desktop_capture") { - "../../rtc_base:sanitizer", - "../portal", - ] -+ -+ if (build_with_mozilla) { -+ defines += [ "WEBRTC_USE_PIPEWIRE" ] -+ } - } - - if (rtc_enable_win_wgc) { -diff --git a/modules/portal/BUILD.gn b/modules/portal/BUILD.gn -index 72972d18e1..70b4739ad0 100644 ---- a/modules/portal/BUILD.gn -+++ b/modules/portal/BUILD.gn -@@ -139,11 +139,9 @@ if (!build_with_mozilla) { - deps -= [ ":pipewire_stubs" ] - defines -= [ "WEBRTC_DLOPEN_PIPEWIRE" ] - public_deps = [ -- "../../third_party/pipewire", -- "../../third_party/drm", -- "../../third_party/gbm", - "../../third_party/libepoxy" - ] -+ defines += [ "WEBRTC_USE_PIPEWIRE" ] - } +diff --git a/modules/desktop_capture/mac/screen_capturer_sck.mm b/modules/desktop_capture/mac/screen_capturer_sck.mm +index 49c923e56b..0d0750f63e 100644 +--- a/modules/desktop_capture/mac/screen_capturer_sck.mm ++++ b/modules/desktop_capture/mac/screen_capturer_sck.mm +@@ -444,7 +444,7 @@ bool ScreenCapturerSck::GetSourceList(SourceList* sources) { + sources->clear(); + EnsurePickerHandle(); + if (picker_handle_) { +- sources->push_back({picker_handle_->Source(), std::string()}); ++ sources->push_back({picker_handle_->Source(), 0, std::string()}); } + return true; } -diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn -index 83c1b21260..e32e3ab37e 100644 ---- a/modules/video_capture/BUILD.gn -+++ b/modules/video_capture/BUILD.gn -@@ -118,7 +118,7 @@ if (!build_with_chromium || is_linux || is_chromeos) { - ] - if (build_with_mozilla) { - configs -= [ "../portal:pipewire_base" ] -- public_deps = [ "../../third_party/pipewire" ] -+ defines = [ "WEBRTC_USE_PIPEWIRE" ] - } - } - } diff --git a/third_party/libwebrtc/moz-patch-stack/s0116.patch b/third_party/libwebrtc/moz-patch-stack/s0116.patch @@ -1,24 +1,32 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Tue, 13 May 2025 22:39:00 +0000 -Subject: Bug 1966238 - (fix-bf85c38fb3) fix build for our added 'pid' field in - DesktopCapturer::Source r?pehrsons! +Date: Thu, 10 Jul 2025 20:03:00 +0000 +Subject: Bug 1975060 - improve build file generation regarding x11 usage. + r=dbaker -Differential Revision: https://phabricator.services.mozilla.com/D249164 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b6b37905a574e7706d98eb683e6800c9525815e7 +Upstream will be removing use_x11. We override the use_x11 settings +from within gn_processor.py anyway, so we can remove our hack in +third_party/libwebrtc/webrtc.gni, and then make gn_processor.py modify +ozone_platform_x11 rather than use_x11. + +Note: these changes produce identical moz.build files for libwebrtc +and abseil-cpp. + +Differential Revision: https://phabricator.services.mozilla.com/D255713 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/c8cf67108972d5caefbfbb66146e26e5358493c2 --- - modules/desktop_capture/mac/screen_capturer_sck.mm | 2 +- + webrtc.gni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/modules/desktop_capture/mac/screen_capturer_sck.mm b/modules/desktop_capture/mac/screen_capturer_sck.mm -index 49c923e56b..0d0750f63e 100644 ---- a/modules/desktop_capture/mac/screen_capturer_sck.mm -+++ b/modules/desktop_capture/mac/screen_capturer_sck.mm -@@ -444,7 +444,7 @@ bool ScreenCapturerSck::GetSourceList(SourceList* sources) { - sources->clear(); - EnsurePickerHandle(); - if (picker_handle_) { -- sources->push_back({picker_handle_->Source(), std::string()}); -+ sources->push_back({picker_handle_->Source(), 0, std::string()}); - } - return true; - } +diff --git a/webrtc.gni b/webrtc.gni +index d29a86112b..ee377f06d0 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -136,7 +136,7 @@ declare_args() { + rtc_build_tools = false + + # Set this to false to skip building code that requires X11. +- rtc_use_x11 = use_x11 ++ rtc_use_x11 = ozone_platform_x11 + + # Set this to use PipeWire on the Wayland display server. + # By default it's only enabled on desktop Linux (excludes ChromeOS) and diff --git a/third_party/libwebrtc/moz-patch-stack/s0117.patch b/third_party/libwebrtc/moz-patch-stack/s0117.patch @@ -1,32 +1,26 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Thu, 10 Jul 2025 20:03:00 +0000 -Subject: Bug 1975060 - improve build file generation regarding x11 usage. - r=dbaker +Date: Wed, 16 Jul 2025 21:08:00 +0300 +Subject: Bug 1974813 - turn off rust in libwebrtc since we don't use any + libwebrtc rust code. r=ng? -Upstream will be removing use_x11. We override the use_x11 settings -from within gn_processor.py anyway, so we can remove our hack in -third_party/libwebrtc/webrtc.gni, and then make gn_processor.py modify -ozone_platform_x11 rather than use_x11. +Note: no moz.build changes are caused by this change. -Note: these changes produce identical moz.build files for libwebrtc -and abseil-cpp. - -Differential Revision: https://phabricator.services.mozilla.com/D255713 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/c8cf67108972d5caefbfbb66146e26e5358493c2 +Differential Revision: https://phabricator.services.mozilla.com/D257316 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/14ee98c4832a55bf32116c925540ab0f53e46cd3 --- - webrtc.gni | 2 +- + .gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/webrtc.gni b/webrtc.gni -index d29a86112b..ee377f06d0 100644 ---- a/webrtc.gni -+++ b/webrtc.gni -@@ -136,7 +136,7 @@ declare_args() { - rtc_build_tools = false +diff --git a/.gn b/.gn +index 4ee826ec58..0d50e80115 100644 +--- a/.gn ++++ b/.gn +@@ -89,7 +89,7 @@ default_args = { + use_fuzztest_wrapper = false - # Set this to false to skip building code that requires X11. -- rtc_use_x11 = use_x11 -+ rtc_use_x11 = ozone_platform_x11 + # Enable Rust in WebRTC +- enable_rust = true ++ enable_rust = false # Mozilla + enable_rust_cxx = true + enable_chromium_prelude = true - # Set this to use PipeWire on the Wayland display server. - # By default it's only enabled on desktop Linux (excludes ChromeOS) and diff --git a/third_party/libwebrtc/moz-patch-stack/s0118.patch b/third_party/libwebrtc/moz-patch-stack/s0118.patch @@ -1,26 +1,69 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Wed, 16 Jul 2025 21:08:00 +0300 -Subject: Bug 1974813 - turn off rust in libwebrtc since we don't use any - libwebrtc rust code. r=ng? +Date: Fri, 18 Jul 2025 16:07:00 -0500 +Subject: Bug 1971201 - (fix-70fb834e8c) most all of libwebrtc has converted + from rtc:: to webrtc:: -Note: no moz.build changes are caused by this change. - -Differential Revision: https://phabricator.services.mozilla.com/D257316 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/14ee98c4832a55bf32116c925540ab0f53e46cd3 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/d51a82971b9e755d5514572fcd8ddc557153c8ef --- - .gn | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + modules/rtp_rtcp/source/rtp_header_extensions.h | 4 ++-- + modules/video_capture/video_capture.h | 2 +- + modules/video_capture/video_capture_impl.cc | 2 +- + modules/video_capture/video_capture_impl.h | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) -diff --git a/.gn b/.gn -index 4ee826ec58..0d50e80115 100644 ---- a/.gn -+++ b/.gn -@@ -89,7 +89,7 @@ default_args = { - use_fuzztest_wrapper = false +diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.h b/modules/rtp_rtcp/source/rtp_header_extensions.h +index cc811cae3a..46d80e424a 100644 +--- a/modules/rtp_rtcp/source/rtp_header_extensions.h ++++ b/modules/rtp_rtcp/source/rtp_header_extensions.h +@@ -321,10 +321,10 @@ class CsrcAudioLevel { + static constexpr const char* kUri = + "urn:ietf:params:rtp-hdrext:csrc-audio-level"; + +- static bool Parse(rtc::ArrayView<const uint8_t> data, ++ static bool Parse(webrtc::ArrayView<const uint8_t> data, + CsrcAudioLevelList* csrcAudioLevels); + static size_t ValueSize(const CsrcAudioLevelList& csrcAudioLevels); +- static bool Write(rtc::ArrayView<uint8_t> data, ++ static bool Write(webrtc::ArrayView<uint8_t> data, + const CsrcAudioLevelList& csrcAudioLevels); + }; + #endif +diff --git a/modules/video_capture/video_capture.h b/modules/video_capture/video_capture.h +index a7c1764c51..8a91ca2f83 100644 +--- a/modules/video_capture/video_capture.h ++++ b/modules/video_capture/video_capture.h +@@ -123,7 +123,7 @@ class VideoCaptureModule : public RefCountInterface { + + // Remove capture data callback + virtual void DeRegisterCaptureDataCallback( +- rtc::VideoSinkInterface<VideoFrame> *dataCallback) = 0; ++ webrtc::VideoSinkInterface<VideoFrame> *dataCallback) = 0; + + // Start capture device + virtual int32_t StartCapture(const VideoCaptureCapability& capability) = 0; +diff --git a/modules/video_capture/video_capture_impl.cc b/modules/video_capture/video_capture_impl.cc +index 62a4b21a5f..98d7081b1d 100644 +--- a/modules/video_capture/video_capture_impl.cc ++++ b/modules/video_capture/video_capture_impl.cc +@@ -120,7 +120,7 @@ void VideoCaptureImpl::RegisterCaptureDataCallback( + } - # Enable Rust in WebRTC -- enable_rust = true -+ enable_rust = false # Mozilla - enable_rust_cxx = true - enable_chromium_prelude = true + void VideoCaptureImpl::DeRegisterCaptureDataCallback( +- rtc::VideoSinkInterface<VideoFrame>* dataCallBack) { ++ webrtc::VideoSinkInterface<VideoFrame>* dataCallBack) { + MutexLock lock(&api_lock_); + auto it = _dataCallBacks.find(dataCallBack); + if (it != _dataCallBacks.end()) { +diff --git a/modules/video_capture/video_capture_impl.h b/modules/video_capture/video_capture_impl.h +index 4d5b83547f..220b8cff27 100644 +--- a/modules/video_capture/video_capture_impl.h ++++ b/modules/video_capture/video_capture_impl.h +@@ -63,7 +63,7 @@ class RTC_EXPORT VideoCaptureImpl : public VideoCaptureModule { + virtual void RegisterCaptureDataCallback( + RawVideoSinkInterface* dataCallback) override; + void DeRegisterCaptureDataCallback( +- rtc::VideoSinkInterface<VideoFrame>* dataCallback) override; ++ webrtc::VideoSinkInterface<VideoFrame>* dataCallback) override; + int32_t StopCaptureIfAllClientsClose() override; + int32_t SetCaptureRotation(VideoRotation rotation) override; diff --git a/third_party/libwebrtc/moz-patch-stack/s0119.patch b/third_party/libwebrtc/moz-patch-stack/s0119.patch @@ -1,69 +1,82 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Fri, 18 Jul 2025 16:07:00 -0500 -Subject: Bug 1971201 - (fix-70fb834e8c) most all of libwebrtc has converted - from rtc:: to webrtc:: +From: Michael Froman <mjfroman@mac.com> +Date: Mon, 15 Sep 2025 14:53:58 -0500 +Subject: Bug 1973648 - move applicable libwebrtc changes to our new + libwebrtc_overrides location. r=ng -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/d51a82971b9e755d5514572fcd8ddc557153c8ef +Differential Revision: https://phabricator.services.mozilla.com/D258499 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/19164e58323d59c1f66f7fcf671b8d0b6366f708 --- - modules/rtp_rtcp/source/rtp_header_extensions.h | 4 ++-- - modules/video_capture/video_capture.h | 2 +- - modules/video_capture/video_capture_impl.cc | 2 +- - modules/video_capture/video_capture_impl.h | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) + call/call.cc | 13 ------------- + call/call.h | 11 ++--------- + modules/desktop_capture/BUILD.gn | 5 +++++ + 3 files changed, 7 insertions(+), 22 deletions(-) -diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.h b/modules/rtp_rtcp/source/rtp_header_extensions.h -index cc811cae3a..46d80e424a 100644 ---- a/modules/rtp_rtcp/source/rtp_header_extensions.h -+++ b/modules/rtp_rtcp/source/rtp_header_extensions.h -@@ -321,10 +321,10 @@ class CsrcAudioLevel { - static constexpr const char* kUri = - "urn:ietf:params:rtp-hdrext:csrc-audio-level"; - -- static bool Parse(rtc::ArrayView<const uint8_t> data, -+ static bool Parse(webrtc::ArrayView<const uint8_t> data, - CsrcAudioLevelList* csrcAudioLevels); - static size_t ValueSize(const CsrcAudioLevelList& csrcAudioLevels); -- static bool Write(rtc::ArrayView<uint8_t> data, -+ static bool Write(webrtc::ArrayView<uint8_t> data, - const CsrcAudioLevelList& csrcAudioLevels); +diff --git a/call/call.cc b/call/call.cc +index dc1e44995c..827991c4d1 100644 +--- a/call/call.cc ++++ b/call/call.cc +@@ -514,19 +514,6 @@ class Call final : public webrtc::Call, }; - #endif -diff --git a/modules/video_capture/video_capture.h b/modules/video_capture/video_capture.h -index a7c1764c51..8a91ca2f83 100644 ---- a/modules/video_capture/video_capture.h -+++ b/modules/video_capture/video_capture.h -@@ -123,7 +123,7 @@ class VideoCaptureModule : public RefCountInterface { + } // namespace internal + +-std::string Call::Stats::ToString(int64_t time_ms) const { +- char buf[1024]; +- SimpleStringBuilder ss(buf); +- ss << "Call stats: " << time_ms << ", {"; +- ss << "send_bw_bps: " << send_bandwidth_bps << ", "; +- ss << "recv_bw_bps: " << recv_bandwidth_bps << ", "; +- ss << "max_pad_bps: " << max_padding_bitrate_bps << ", "; +- ss << "pacer_delay_ms: " << pacer_delay_ms << ", "; +- ss << "rtt_ms: " << rtt_ms; +- ss << '}'; +- return ss.str(); +-} +- + std::unique_ptr<Call> Call::Create(CallConfig config) { + std::unique_ptr<RtpTransportControllerSendInterface> transport_send; + if (config.rtp_transport_controller_send_factory != nullptr) { +diff --git a/call/call.h b/call/call.h +index 87e1884583..420a754edd 100644 +--- a/call/call.h ++++ b/call/call.h +@@ -25,6 +25,7 @@ + #include "api/transport/bitrate_settings.h" + #include "call/audio_receive_stream.h" + #include "call/audio_send_stream.h" ++#include "call/call_basic_stats.h" + #include "call/call_config.h" + #include "call/flexfec_receive_stream.h" + #include "call/packet_receiver.h" +@@ -50,15 +51,7 @@ namespace webrtc { - // Remove capture data callback - virtual void DeRegisterCaptureDataCallback( -- rtc::VideoSinkInterface<VideoFrame> *dataCallback) = 0; -+ webrtc::VideoSinkInterface<VideoFrame> *dataCallback) = 0; + class Call { + public: +- struct Stats { +- std::string ToString(int64_t time_ms) const; +- +- int send_bandwidth_bps = 0; // Estimated available send bandwidth. +- int max_padding_bitrate_bps = 0; // Cumulative configured max padding. +- int recv_bandwidth_bps = 0; // Estimated available receive bandwidth. +- int64_t pacer_delay_ms = 0; +- int64_t rtt_ms = -1; +- }; ++ using Stats = CallBasicStats; - // Start capture device - virtual int32_t StartCapture(const VideoCaptureCapability& capability) = 0; -diff --git a/modules/video_capture/video_capture_impl.cc b/modules/video_capture/video_capture_impl.cc -index 62a4b21a5f..98d7081b1d 100644 ---- a/modules/video_capture/video_capture_impl.cc -+++ b/modules/video_capture/video_capture_impl.cc -@@ -120,7 +120,7 @@ void VideoCaptureImpl::RegisterCaptureDataCallback( - } + static std::unique_ptr<Call> Create(CallConfig config); - void VideoCaptureImpl::DeRegisterCaptureDataCallback( -- rtc::VideoSinkInterface<VideoFrame>* dataCallBack) { -+ webrtc::VideoSinkInterface<VideoFrame>* dataCallBack) { - MutexLock lock(&api_lock_); - auto it = _dataCallBacks.find(dataCallBack); - if (it != _dataCallBacks.end()) { -diff --git a/modules/video_capture/video_capture_impl.h b/modules/video_capture/video_capture_impl.h -index 4d5b83547f..220b8cff27 100644 ---- a/modules/video_capture/video_capture_impl.h -+++ b/modules/video_capture/video_capture_impl.h -@@ -63,7 +63,7 @@ class RTC_EXPORT VideoCaptureImpl : public VideoCaptureModule { - virtual void RegisterCaptureDataCallback( - RawVideoSinkInterface* dataCallback) override; - void DeRegisterCaptureDataCallback( -- rtc::VideoSinkInterface<VideoFrame>* dataCallback) override; -+ webrtc::VideoSinkInterface<VideoFrame>* dataCallback) override; +diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn +index 484a47894b..5c843cfc2b 100644 +--- a/modules/desktop_capture/BUILD.gn ++++ b/modules/desktop_capture/BUILD.gn +@@ -390,6 +390,11 @@ rtc_library("desktop_capture") { + ] + if (build_with_mozilla) { + libs -= [ "Xtst" ] ++ # Mozilla provides custom impl of x_error_trap.* ++ sources -= [ ++ "linux/x11/x_error_trap.cc", ++ "linux/x11/x_error_trap.h", ++ ] + } + } - int32_t StopCaptureIfAllClientsClose() override; - int32_t SetCaptureRotation(VideoRotation rotation) override; diff --git a/third_party/libwebrtc/moz-patch-stack/s0120.patch b/third_party/libwebrtc/moz-patch-stack/s0120.patch @@ -1,82 +1,29 @@ -From: Michael Froman <mjfroman@mac.com> -Date: Mon, 15 Sep 2025 14:53:58 -0500 -Subject: Bug 1973648 - move applicable libwebrtc changes to our new - libwebrtc_overrides location. r=ng +From: Michael Froman <mfroman@mozilla.com> +Date: Thu, 7 Aug 2025 11:37:00 -0500 +Subject: Bug 1980479 - (fix-50544d8dc4) add missing stub implementations for + SSLStreamAdapter static methods. -Differential Revision: https://phabricator.services.mozilla.com/D258499 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/19164e58323d59c1f66f7fcf671b8d0b6366f708 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8fee7e6d9736f8d1dfe78e9bc2c4676ca86d0405 --- - call/call.cc | 13 ------------- - call/call.h | 11 ++--------- - modules/desktop_capture/BUILD.gn | 5 +++++ - 3 files changed, 7 insertions(+), 22 deletions(-) + rtc_base/ssl_stream_adapter.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -diff --git a/call/call.cc b/call/call.cc -index dc1e44995c..827991c4d1 100644 ---- a/call/call.cc -+++ b/call/call.cc -@@ -514,19 +514,6 @@ class Call final : public webrtc::Call, - }; - } // namespace internal +diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h +index ca2f6c48c4..24fc299b82 100644 +--- a/rtc_base/ssl_stream_adapter.h ++++ b/rtc_base/ssl_stream_adapter.h +@@ -244,11 +244,12 @@ class SSLStreamAdapter : public StreamInterface { + static bool IsAcceptableCipher(int cipher, KeyType key_type); + static bool IsAcceptableCipher(absl::string_view cipher, KeyType key_type); --std::string Call::Stats::ToString(int64_t time_ms) const { -- char buf[1024]; -- SimpleStringBuilder ss(buf); -- ss << "Call stats: " << time_ms << ", {"; -- ss << "send_bw_bps: " << send_bandwidth_bps << ", "; -- ss << "recv_bw_bps: " << recv_bandwidth_bps << ", "; -- ss << "max_pad_bps: " << max_padding_bitrate_bps << ", "; -- ss << "pacer_delay_ms: " << pacer_delay_ms << ", "; -- ss << "rtt_ms: " << rtt_ms; -- ss << '}'; -- return ss.str(); --} -- - std::unique_ptr<Call> Call::Create(CallConfig config) { - std::unique_ptr<RtpTransportControllerSendInterface> transport_send; - if (config.rtp_transport_controller_send_factory != nullptr) { -diff --git a/call/call.h b/call/call.h -index 87e1884583..420a754edd 100644 ---- a/call/call.h -+++ b/call/call.h -@@ -25,6 +25,7 @@ - #include "api/transport/bitrate_settings.h" - #include "call/audio_receive_stream.h" - #include "call/audio_send_stream.h" -+#include "call/call_basic_stats.h" - #include "call/call_config.h" - #include "call/flexfec_receive_stream.h" - #include "call/packet_receiver.h" -@@ -50,15 +51,7 @@ namespace webrtc { - - class Call { - public: -- struct Stats { -- std::string ToString(int64_t time_ms) const; -- -- int send_bandwidth_bps = 0; // Estimated available send bandwidth. -- int max_padding_bitrate_bps = 0; // Cumulative configured max padding. -- int recv_bandwidth_bps = 0; // Estimated available receive bandwidth. -- int64_t pacer_delay_ms = 0; -- int64_t rtt_ms = -1; -- }; -+ using Stats = CallBasicStats; - - static std::unique_ptr<Call> Create(CallConfig config); - -diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 484a47894b..5c843cfc2b 100644 ---- a/modules/desktop_capture/BUILD.gn -+++ b/modules/desktop_capture/BUILD.gn -@@ -390,6 +390,11 @@ rtc_library("desktop_capture") { - ] - if (build_with_mozilla) { - libs -= [ "Xtst" ] -+ # Mozilla provides custom impl of x_error_trap.* -+ sources -= [ -+ "linux/x11/x_error_trap.cc", -+ "linux/x11/x_error_trap.h", -+ ] - } - } +- static std::set<uint16_t> GetSupportedEphemeralKeyExchangeCipherGroups(); ++ static std::set<uint16_t> GetSupportedEphemeralKeyExchangeCipherGroups() ++ { return {}; } + static std::optional<std::string> GetEphemeralKeyExchangeCipherGroupName( + uint16_t group_id); + static std::vector<uint16_t> GetDefaultEphemeralKeyExchangeCipherGroups( +- const FieldTrialsView* field_trials); ++ const FieldTrialsView* field_trials) { return {}; } + //////////////////////////////////////////////////////////////////////////// + // Testing only member functions diff --git a/third_party/libwebrtc/moz-patch-stack/s0121.patch b/third_party/libwebrtc/moz-patch-stack/s0121.patch @@ -1,29 +1,41 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Thu, 7 Aug 2025 11:37:00 -0500 -Subject: Bug 1980479 - (fix-50544d8dc4) add missing stub implementations for - SSLStreamAdapter static methods. +Date: Thu, 11 Sep 2025 14:17:00 -0500 +Subject: Bug 1988042 - add BSD support to new version of libwebrtc's + cpu_info.cc r?ng! -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8fee7e6d9736f8d1dfe78e9bc2c4676ca86d0405 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/e3b37acb8816aefb9134a68cafad8c7d5e145179 --- - rtc_base/ssl_stream_adapter.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + rtc_base/cpu_info.cc | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) -diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h -index ca2f6c48c4..24fc299b82 100644 ---- a/rtc_base/ssl_stream_adapter.h -+++ b/rtc_base/ssl_stream_adapter.h -@@ -244,11 +244,12 @@ class SSLStreamAdapter : public StreamInterface { - static bool IsAcceptableCipher(int cipher, KeyType key_type); - static bool IsAcceptableCipher(absl::string_view cipher, KeyType key_type); +diff --git a/rtc_base/cpu_info.cc b/rtc_base/cpu_info.cc +index 0ce48a02f1..f0bff56911 100644 +--- a/rtc_base/cpu_info.cc ++++ b/rtc_base/cpu_info.cc +@@ -29,14 +29,14 @@ + #include <unistd.h> + #elif defined(WEBRTC_FUCHSIA) + #include <zircon/syscalls.h> +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + #include <unistd.h> + #endif // WEBRTC_LINUX -- static std::set<uint16_t> GetSupportedEphemeralKeyExchangeCipherGroups(); -+ static std::set<uint16_t> GetSupportedEphemeralKeyExchangeCipherGroups() -+ { return {}; } - static std::optional<std::string> GetEphemeralKeyExchangeCipherGroupName( - uint16_t group_id); - static std::vector<uint16_t> GetDefaultEphemeralKeyExchangeCipherGroups( -- const FieldTrialsView* field_trials); -+ const FieldTrialsView* field_trials) { return {}; } - - //////////////////////////////////////////////////////////////////////////// - // Testing only member functions + #if defined(WEBRTC_ARCH_X86_FAMILY) && defined(_MSC_VER) + #include <intrin.h> + #endif +-#if defined(WEBRTC_ARCH_ARM_FAMILY) && defined(WEBRTC_LINUX) ++#if defined(WEBRTC_ARCH_ARM_FAMILY) && (defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)) + #include <asm/hwcap.h> + #include <sys/auxv.h> + #endif +@@ -176,6 +176,9 @@ bool Supports(ISA instruction_set_architecture) { + if (instruction_set_architecture == ISA::kNeon) { + #if defined(WEBRTC_ANDROID) + return 0 != (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON); ++#elif defined(WEBRTC_BSD) ++ // OpenBSD does not have getauxval() and does not have /proc reading ++ return false; + #elif defined(WEBRTC_LINUX) + uint64_t hwcap = 0; + hwcap = getauxval(AT_HWCAP); diff --git a/third_party/libwebrtc/moz-patch-stack/s0122.patch b/third_party/libwebrtc/moz-patch-stack/s0122.patch @@ -1,41 +1,42 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Thu, 11 Sep 2025 14:17:00 -0500 -Subject: Bug 1988042 - add BSD support to new version of libwebrtc's - cpu_info.cc r?ng! +From: Michael Froman <mjfroman@mac.com> +Date: Tue, 16 Sep 2025 09:26:22 -0500 +Subject: Bug 1985396 - Cherry-pick upstream libwebrtc commit 73898ac18b -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/e3b37acb8816aefb9134a68cafad8c7d5e145179 +Upstream commit: https://webrtc.googlesource.com/src/+/73898ac18b498c3322f71b9543a2b77f465a47af + APM data dumpers: add missing include + + Currently, audioproc_f fails to build with apm_debug_dump enabled. + + Bug: webrtc:442745059 + Change-Id: I349468891d798341abdaea32042cbe23c4722f75 + Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407641 + Commit-Queue: Sam Zackrisson <saza@webrtc.org> + Commit-Queue: Lionel Koenig <lionelk@webrtc.org> + Reviewed-by: Lionel Koenig <lionelk@webrtc.org> + Cr-Commit-Position: refs/heads/main@{#45547} --- - rtc_base/cpu_info.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + modules/audio_processing/logging/apm_data_dumper.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -diff --git a/rtc_base/cpu_info.cc b/rtc_base/cpu_info.cc -index 0ce48a02f1..f0bff56911 100644 ---- a/rtc_base/cpu_info.cc -+++ b/rtc_base/cpu_info.cc -@@ -29,14 +29,14 @@ - #include <unistd.h> - #elif defined(WEBRTC_FUCHSIA) - #include <zircon/syscalls.h> --#elif defined(WEBRTC_LINUX) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - #include <unistd.h> - #endif // WEBRTC_LINUX +diff --git a/modules/audio_processing/logging/apm_data_dumper.cc b/modules/audio_processing/logging/apm_data_dumper.cc +index b26d90fbc8..d86d8d8d3b 100644 +--- a/modules/audio_processing/logging/apm_data_dumper.cc ++++ b/modules/audio_processing/logging/apm_data_dumper.cc +@@ -10,13 +10,16 @@ - #if defined(WEBRTC_ARCH_X86_FAMILY) && defined(_MSC_VER) - #include <intrin.h> - #endif --#if defined(WEBRTC_ARCH_ARM_FAMILY) && defined(WEBRTC_LINUX) -+#if defined(WEBRTC_ARCH_ARM_FAMILY) && (defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)) - #include <asm/hwcap.h> - #include <sys/auxv.h> + #include "modules/audio_processing/logging/apm_data_dumper.h" + +- + // Check to verify that the define is properly set. + #if !defined(WEBRTC_APM_DEBUG_DUMP) || \ + (WEBRTC_APM_DEBUG_DUMP != 0 && WEBRTC_APM_DEBUG_DUMP != 1) + #error "Set WEBRTC_APM_DEBUG_DUMP to either 0 or 1" #endif -@@ -176,6 +176,9 @@ bool Supports(ISA instruction_set_architecture) { - if (instruction_set_architecture == ISA::kNeon) { - #if defined(WEBRTC_ANDROID) - return 0 != (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON); -+#elif defined(WEBRTC_BSD) -+ // OpenBSD does not have getauxval() and does not have /proc reading -+ return false; - #elif defined(WEBRTC_LINUX) - uint64_t hwcap = 0; - hwcap = getauxval(AT_HWCAP); + ++#if WEBRTC_APM_DEBUG_DUMP == 1 ++#include "rtc_base/strings/string_builder.h" ++#endif ++ + namespace webrtc { + namespace { + diff --git a/third_party/libwebrtc/moz-patch-stack/s0123.patch b/third_party/libwebrtc/moz-patch-stack/s0123.patch @@ -1,42 +1,68 @@ -From: Michael Froman <mjfroman@mac.com> -Date: Tue, 16 Sep 2025 09:26:22 -0500 -Subject: Bug 1985396 - Cherry-pick upstream libwebrtc commit 73898ac18b +From: Michael Froman <mfroman@mozilla.com> +Date: Thu, 18 Sep 2025 12:09:00 -0500 +Subject: Bug 1985396 - Cherry-pick upstream libwebrtc commit 63a59de808 -Upstream commit: https://webrtc.googlesource.com/src/+/73898ac18b498c3322f71b9543a2b77f465a47af - APM data dumpers: add missing include +Upstream commit: https://webrtc.googlesource.com/src/+/63a59de808ba7669e60bded703e71f360e5337e0 + dcsctp: Avoid iterator invalidation - Currently, audioproc_f fails to build with apm_debug_dump enabled. + The ExpireOutstandingChunks method iterated through the + `outstanding_data_` container while conditionally calling + `AbandonAllFor`. The `AbandonAllFor` method can, in some cases, add new + elements to `outstanding_data_`, which invalidates the iterators used by + the loop in `ExpireOutstandingChunks`. This could lead to undefined + behavior. - Bug: webrtc:442745059 - Change-Id: I349468891d798341abdaea32042cbe23c4722f75 - Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407641 - Commit-Queue: Sam Zackrisson <saza@webrtc.org> - Commit-Queue: Lionel Koenig <lionelk@webrtc.org> - Reviewed-by: Lionel Koenig <lionelk@webrtc.org> - Cr-Commit-Position: refs/heads/main@{#45547} + This aligns the C++ implementation to the Rust dcsctp port, which + handles this correctly by using a two-pass approach. + + Bug: chromium:443213199 + Change-Id: Ib5ac73b743c5ed900a69806088780c213536a4a6 + Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408002 + Reviewed-by: Emil Lundmark <lndmrk@webrtc.org> + Commit-Queue: Emil Lundmark <lndmrk@webrtc.org> + Auto-Submit: Victor Boivie <boivie@webrtc.org> + Cr-Commit-Position: refs/heads/main@{#45566} +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b85c57c2d6f0604075bf639a9a7342ece543cdf1 --- - modules/audio_processing/logging/apm_data_dumper.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + net/dcsctp/tx/outstanding_data.cc | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) -diff --git a/modules/audio_processing/logging/apm_data_dumper.cc b/modules/audio_processing/logging/apm_data_dumper.cc -index b26d90fbc8..d86d8d8d3b 100644 ---- a/modules/audio_processing/logging/apm_data_dumper.cc -+++ b/modules/audio_processing/logging/apm_data_dumper.cc -@@ -10,13 +10,16 @@ - - #include "modules/audio_processing/logging/apm_data_dumper.h" - -- - // Check to verify that the define is properly set. - #if !defined(WEBRTC_APM_DEBUG_DUMP) || \ - (WEBRTC_APM_DEBUG_DUMP != 0 && WEBRTC_APM_DEBUG_DUMP != 1) - #error "Set WEBRTC_APM_DEBUG_DUMP to either 0 or 1" - #endif +diff --git a/net/dcsctp/tx/outstanding_data.cc b/net/dcsctp/tx/outstanding_data.cc +index 074e3c0461..63e750b5fc 100644 +--- a/net/dcsctp/tx/outstanding_data.cc ++++ b/net/dcsctp/tx/outstanding_data.cc +@@ -402,6 +402,7 @@ std::vector<std::pair<TSN, Data>> OutstandingData::GetChunksToBeRetransmitted( + } -+#if WEBRTC_APM_DEBUG_DUMP == 1 -+#include "rtc_base/strings/string_builder.h" -+#endif + void OutstandingData::ExpireOutstandingChunks(Timestamp now) { ++ std::vector<UnwrappedTSN> tsns_to_expire; + UnwrappedTSN tsn = last_cumulative_tsn_ack_; + for (const Item& item : outstanding_data_) { + tsn.Increment(); +@@ -411,15 +412,22 @@ void OutstandingData::ExpireOutstandingChunks(Timestamp now) { + if (item.is_abandoned()) { + // Already abandoned. + } else if (item.is_nacked() && item.has_expired(now)) { +- RTC_DLOG(LS_VERBOSE) << "Marking nacked chunk " << *tsn.Wrap() +- << " and message " << *item.data().mid +- << " as expired"; +- AbandonAllFor(item); ++ tsns_to_expire.push_back(tsn); + } else { + // A non-expired chunk. No need to iterate any further. + break; + } + } + - namespace webrtc { - namespace { ++ for (UnwrappedTSN tsn_to_expire : tsns_to_expire) { ++ // The item is retrieved by TSN, as AbandonAllFor may have modified ++ // `outstanding_data_` and invalidated iterators from the first loop. ++ Item& item = GetItem(tsn_to_expire); ++ RTC_DLOG(LS_WARNING) << "Marking nacked chunk " << *tsn_to_expire.Wrap() ++ << " and message " << *item.data().mid ++ << " as expired"; ++ AbandonAllFor(item); ++ } + RTC_DCHECK(IsConsistent()); + } diff --git a/third_party/libwebrtc/moz-patch-stack/s0124.patch b/third_party/libwebrtc/moz-patch-stack/s0124.patch @@ -1,68 +1,44 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Thu, 18 Sep 2025 12:09:00 -0500 -Subject: Bug 1985396 - Cherry-pick upstream libwebrtc commit 63a59de808 +Date: Wed, 17 Sep 2025 15:41:00 +0000 +Subject: Bug 1988042 - android build fix in + third_party/libwebrtc/rtc_base/cpu_info.cc r?ng! -Upstream commit: https://webrtc.googlesource.com/src/+/63a59de808ba7669e60bded703e71f360e5337e0 - dcsctp: Avoid iterator invalidation +Supports(...) is really used in unittests and outside of unittests +it is only used when WEBRTC_ARCH_X86_FAMILY is defined. For now, +we'll return false when checking for arm/neon suport. - The ExpireOutstandingChunks method iterated through the - `outstanding_data_` container while conditionally calling - `AbandonAllFor`. The `AbandonAllFor` method can, in some cases, add new - elements to `outstanding_data_`, which invalidates the iterators used by - the loop in `ExpireOutstandingChunks`. This could lead to undefined - behavior. - - This aligns the C++ implementation to the Rust dcsctp port, which - handles this correctly by using a two-pass approach. - - Bug: chromium:443213199 - Change-Id: Ib5ac73b743c5ed900a69806088780c213536a4a6 - Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408002 - Reviewed-by: Emil Lundmark <lndmrk@webrtc.org> - Commit-Queue: Emil Lundmark <lndmrk@webrtc.org> - Auto-Submit: Victor Boivie <boivie@webrtc.org> - Cr-Commit-Position: refs/heads/main@{#45566} -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b85c57c2d6f0604075bf639a9a7342ece543cdf1 +Differential Revision: https://phabricator.services.mozilla.com/D265018 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/eae7b6ec4f7ca191e8eaa8e36787142528f2c132 --- - net/dcsctp/tx/outstanding_data.cc | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) + rtc_base/cpu_info.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) -diff --git a/net/dcsctp/tx/outstanding_data.cc b/net/dcsctp/tx/outstanding_data.cc -index 074e3c0461..63e750b5fc 100644 ---- a/net/dcsctp/tx/outstanding_data.cc -+++ b/net/dcsctp/tx/outstanding_data.cc -@@ -402,6 +402,7 @@ std::vector<std::pair<TSN, Data>> OutstandingData::GetChunksToBeRetransmitted( - } - - void OutstandingData::ExpireOutstandingChunks(Timestamp now) { -+ std::vector<UnwrappedTSN> tsns_to_expire; - UnwrappedTSN tsn = last_cumulative_tsn_ack_; - for (const Item& item : outstanding_data_) { - tsn.Increment(); -@@ -411,15 +412,22 @@ void OutstandingData::ExpireOutstandingChunks(Timestamp now) { - if (item.is_abandoned()) { - // Already abandoned. - } else if (item.is_nacked() && item.has_expired(now)) { -- RTC_DLOG(LS_VERBOSE) << "Marking nacked chunk " << *tsn.Wrap() -- << " and message " << *item.data().mid -- << " as expired"; -- AbandonAllFor(item); -+ tsns_to_expire.push_back(tsn); - } else { - // A non-expired chunk. No need to iterate any further. - break; - } - } -+ -+ for (UnwrappedTSN tsn_to_expire : tsns_to_expire) { -+ // The item is retrieved by TSN, as AbandonAllFor may have modified -+ // `outstanding_data_` and invalidated iterators from the first loop. -+ Item& item = GetItem(tsn_to_expire); -+ RTC_DLOG(LS_WARNING) << "Marking nacked chunk " << *tsn_to_expire.Wrap() -+ << " and message " << *item.data().mid -+ << " as expired"; -+ AbandonAllFor(item); -+ } - RTC_DCHECK(IsConsistent()); - } - +diff --git a/rtc_base/cpu_info.cc b/rtc_base/cpu_info.cc +index f0bff56911..b51c9e950e 100644 +--- a/rtc_base/cpu_info.cc ++++ b/rtc_base/cpu_info.cc +@@ -25,7 +25,9 @@ + #elif defined(WEBRTC_MAC) + #include <sys/sysctl.h> + #elif defined(WEBRTC_ANDROID) ++#if !defined(WEBRTC_MOZILLA_BUILD) + #include <cpu-features.h> ++#endif + #include <unistd.h> + #elif defined(WEBRTC_FUCHSIA) + #include <zircon/syscalls.h> +@@ -175,7 +177,14 @@ bool Supports(ISA instruction_set_architecture) { + #elif defined(WEBRTC_ARCH_ARM_FAMILY) + if (instruction_set_architecture == ISA::kNeon) { + #if defined(WEBRTC_ANDROID) ++#if defined(WEBRTC_MOZILLA_BUILD) ++ // We should revisit this if Supports(...) is ever more widely used. ++ // Currently, it is used in unittests and when WEBRTC_ARCH_X86_FAMILY ++ // is defined in non-unittest code. ++ return false; ++#else + return 0 != (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON); ++#endif + #elif defined(WEBRTC_BSD) + // OpenBSD does not have getauxval() and does not have /proc reading + return false; diff --git a/third_party/libwebrtc/moz-patch-stack/s0125.patch b/third_party/libwebrtc/moz-patch-stack/s0125.patch @@ -1,44 +1,39 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Wed, 17 Sep 2025 15:41:00 +0000 -Subject: Bug 1988042 - android build fix in - third_party/libwebrtc/rtc_base/cpu_info.cc r?ng! +Date: Thu, 18 Sep 2025 22:33:00 -0500 +Subject: Bug 1985396 - (fix-38c5a66082) fix windows build failure caused by a + macro expansion -Supports(...) is really used in unittests and outside of unittests -it is only used when WEBRTC_ARCH_X86_FAMILY is defined. For now, -we'll return false when checking for arm/neon suport. +Commit 38c5a66082 adds the include rtc_base/strings/string_builder.h to +third_party/libwebrtc/modules/desktop_capture/desktop_geometry.h, but we +pick this up through a chain of includes in CamerasParent.cpp. On Windows +builds we then get a failure because Shlwapi.h has a macro that expands +StrCat to StrCatW, which means we're changing absl::StrCat to +absl::StrCatW which doesn't exist. -Differential Revision: https://phabricator.services.mozilla.com/D265018 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/eae7b6ec4f7ca191e8eaa8e36787142528f2c132 +We can avoid the desktop_geometry.h include and forward declare +"class DesktopVector" to work around this issue. +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/9541460d001e1a62ae567a18d810e35e50ac791c --- - rtc_base/cpu_info.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) + modules/desktop_capture/desktop_capturer.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/rtc_base/cpu_info.cc b/rtc_base/cpu_info.cc -index f0bff56911..b51c9e950e 100644 ---- a/rtc_base/cpu_info.cc -+++ b/rtc_base/cpu_info.cc -@@ -25,7 +25,9 @@ - #elif defined(WEBRTC_MAC) - #include <sys/sysctl.h> - #elif defined(WEBRTC_ANDROID) -+#if !defined(WEBRTC_MOZILLA_BUILD) - #include <cpu-features.h> -+#endif - #include <unistd.h> - #elif defined(WEBRTC_FUCHSIA) - #include <zircon/syscalls.h> -@@ -175,7 +177,14 @@ bool Supports(ISA instruction_set_architecture) { - #elif defined(WEBRTC_ARCH_ARM_FAMILY) - if (instruction_set_architecture == ISA::kNeon) { - #if defined(WEBRTC_ANDROID) -+#if defined(WEBRTC_MOZILLA_BUILD) -+ // We should revisit this if Supports(...) is ever more widely used. -+ // Currently, it is used in unittests and when WEBRTC_ARCH_X86_FAMILY -+ // is defined in non-unittest code. -+ return false; -+#else - return 0 != (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON); -+#endif - #elif defined(WEBRTC_BSD) - // OpenBSD does not have getauxval() and does not have /proc reading - return false; +diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h +index c85d0eba7a..8219358e1e 100644 +--- a/modules/desktop_capture/desktop_capturer.h ++++ b/modules/desktop_capture/desktop_capturer.h +@@ -23,7 +23,6 @@ + #include "modules/desktop_capture/delegated_source_list_controller.h" + #include "modules/desktop_capture/desktop_capture_metadata.h" + #include "modules/desktop_capture/desktop_capture_types.h" +-#include "modules/desktop_capture/desktop_frame.h" + #include "modules/desktop_capture/desktop_geometry.h" + #include "modules/desktop_capture/shared_memory.h" + #include "rtc_base/system/rtc_export.h" +@@ -34,6 +33,7 @@ void RTC_EXPORT LogDesktopCapturerFullscreenDetectorUsage(); + + class DesktopCaptureOptions; + class DesktopFrame; ++class DesktopVector; + + // Abstract interface for screen and window capturers. + class RTC_EXPORT DesktopCapturer { diff --git a/third_party/libwebrtc/moz-patch-stack/s0126.patch b/third_party/libwebrtc/moz-patch-stack/s0126.patch @@ -1,39 +1,22 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Thu, 18 Sep 2025 22:33:00 -0500 -Subject: Bug 1985396 - (fix-38c5a66082) fix windows build failure caused by a +Date: Fri, 19 Sep 2025 10:46:00 -0500 +Subject: Bug 1985396 - (fix-948f6e7a4e) fix windows build failure caused by a macro expansion -Commit 38c5a66082 adds the include rtc_base/strings/string_builder.h to -third_party/libwebrtc/modules/desktop_capture/desktop_geometry.h, but we -pick this up through a chain of includes in CamerasParent.cpp. On Windows -builds we then get a failure because Shlwapi.h has a macro that expands -StrCat to StrCatW, which means we're changing absl::StrCat to -absl::StrCatW which doesn't exist. - -We can avoid the desktop_geometry.h include and forward declare -"class DesktopVector" to work around this issue. -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/9541460d001e1a62ae567a18d810e35e50ac791c +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/5368b134e503299a9cef8590ec91fbc3cf4dcc8a --- - modules/desktop_capture/desktop_capturer.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + modules/desktop_capture/desktop_capturer.h | 1 - + 1 file changed, 1 deletion(-) diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h -index c85d0eba7a..8219358e1e 100644 +index 8219358e1e..9b1efa0bb5 100644 --- a/modules/desktop_capture/desktop_capturer.h +++ b/modules/desktop_capture/desktop_capturer.h @@ -23,7 +23,6 @@ #include "modules/desktop_capture/delegated_source_list_controller.h" #include "modules/desktop_capture/desktop_capture_metadata.h" #include "modules/desktop_capture/desktop_capture_types.h" --#include "modules/desktop_capture/desktop_frame.h" - #include "modules/desktop_capture/desktop_geometry.h" +-#include "modules/desktop_capture/desktop_geometry.h" #include "modules/desktop_capture/shared_memory.h" #include "rtc_base/system/rtc_export.h" -@@ -34,6 +33,7 @@ void RTC_EXPORT LogDesktopCapturerFullscreenDetectorUsage(); - - class DesktopCaptureOptions; - class DesktopFrame; -+class DesktopVector; - // Abstract interface for screen and window capturers. - class RTC_EXPORT DesktopCapturer { diff --git a/third_party/libwebrtc/moz-patch-stack/s0127.patch b/third_party/libwebrtc/moz-patch-stack/s0127.patch @@ -1,22 +1,47 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Fri, 19 Sep 2025 10:46:00 -0500 -Subject: Bug 1985396 - (fix-948f6e7a4e) fix windows build failure caused by a - macro expansion +Date: Wed, 8 Oct 2025 17:49:00 +0000 +Subject: Bug 1980501 - use forward class decl rather than include + audio_state.h r?ng! -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/5368b134e503299a9cef8590ec91fbc3cf4dcc8a +This avoids code outside of libwebrtc inadvertently including +rtc_base/containers/flat_set.h which uses c++20 features. Once +the rest of the Mozilla tree is compiling with c++20, we can +remove this modification (see Bug 1768116). + +Differential Revision: https://phabricator.services.mozilla.com/D267993 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/9c487a574d218cc1c261b646c501db4d159754f0 --- - modules/desktop_capture/desktop_capturer.h | 1 - - 1 file changed, 1 deletion(-) + audio/audio_receive_stream.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) -diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h -index 8219358e1e..9b1efa0bb5 100644 ---- a/modules/desktop_capture/desktop_capturer.h -+++ b/modules/desktop_capture/desktop_capturer.h -@@ -23,7 +23,6 @@ - #include "modules/desktop_capture/delegated_source_list_controller.h" - #include "modules/desktop_capture/desktop_capture_metadata.h" - #include "modules/desktop_capture/desktop_capture_types.h" --#include "modules/desktop_capture/desktop_geometry.h" - #include "modules/desktop_capture/shared_memory.h" - #include "rtc_base/system/rtc_export.h" +diff --git a/audio/audio_receive_stream.h b/audio/audio_receive_stream.h +index 4b6c57b871..3f054776d2 100644 +--- a/audio/audio_receive_stream.h ++++ b/audio/audio_receive_stream.h +@@ -34,7 +34,11 @@ + #include "api/transport/rtp/rtp_source.h" + #include "api/units/time_delta.h" + #include "api/units/timestamp.h" ++// This can be removed after Bug 1768116 enables ++// c++20 builds across the entire Mozilla tree. ++#if !defined(WEBRTC_MOZILLA_BUILD) + #include "audio/audio_state.h" ++#endif + #include "call/audio_receive_stream.h" + #include "call/audio_state.h" + #include "call/syncable.h" +@@ -47,6 +51,14 @@ class PacketRouter; + class RtpStreamReceiverControllerInterface; + class RtpStreamReceiverInterface; ++// This can be removed after Bug 1768116 enables ++// c++20 builds across the entire Mozilla tree. ++#if defined(WEBRTC_MOZILLA_BUILD) ++namespace internal { ++class AudioState; ++} ++#endif ++ + namespace voe { + class ChannelReceiveInterface; + } // namespace voe diff --git a/third_party/libwebrtc/moz-patch-stack/s0128.patch b/third_party/libwebrtc/moz-patch-stack/s0128.patch @@ -1,47 +1,40 @@ From: Michael Froman <mfroman@mozilla.com> Date: Wed, 8 Oct 2025 17:49:00 +0000 -Subject: Bug 1980501 - use forward class decl rather than include - audio_state.h r?ng! +Subject: Bug 1980501 - enable c++20 builds in libwebrtc. r?ng! -This avoids code outside of libwebrtc inadvertently including -rtc_base/containers/flat_set.h which uses c++20 features. Once -the rest of the Mozilla tree is compiling with c++20, we can -remove this modification (see Bug 1768116). - -Differential Revision: https://phabricator.services.mozilla.com/D267993 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/9c487a574d218cc1c261b646c501db4d159754f0 +Differential Revision: https://phabricator.services.mozilla.com/D267994 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/43de54a6e52daf0a06956ae01951ef1e29d46e82 --- - audio/audio_receive_stream.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + BUILD.gn | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) -diff --git a/audio/audio_receive_stream.h b/audio/audio_receive_stream.h -index 4b6c57b871..3f054776d2 100644 ---- a/audio/audio_receive_stream.h -+++ b/audio/audio_receive_stream.h -@@ -34,7 +34,11 @@ - #include "api/transport/rtp/rtp_source.h" - #include "api/units/time_delta.h" - #include "api/units/timestamp.h" -+// This can be removed after Bug 1768116 enables -+// c++20 builds across the entire Mozilla tree. -+#if !defined(WEBRTC_MOZILLA_BUILD) - #include "audio/audio_state.h" -+#endif - #include "call/audio_receive_stream.h" - #include "call/audio_state.h" - #include "call/syncable.h" -@@ -47,6 +51,14 @@ class PacketRouter; - class RtpStreamReceiverControllerInterface; - class RtpStreamReceiverInterface; +diff --git a/BUILD.gn b/BUILD.gn +index 600993950b..3ba008076e 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -315,6 +315,16 @@ config("common_config") { + cflags_objc = [] + defines = [] -+// This can be removed after Bug 1768116 enables -+// c++20 builds across the entire Mozilla tree. -+#if defined(WEBRTC_MOZILLA_BUILD) -+namespace internal { -+class AudioState; -+} -+#endif ++ # We should be able to remove this after c++20 is enabled ++ # across the Mozilla tree. ++ if (build_with_mozilla) { ++ if (is_win) { ++ cflags_cc += [ "-std:c++20" ] ++ } else { ++ cflags_cc += [ "-std=gnu++20" ] ++ } ++ } + - namespace voe { - class ChannelReceiveInterface; - } // namespace voe + if (rtc_enable_protobuf) { + defines += [ "WEBRTC_ENABLE_PROTOBUF=1" ] + } else { +@@ -416,7 +426,7 @@ config("common_config") { + # "-Wnested-externs", (C/Obj-C only) + ] + cflags_objc += [ "-Wstrict-prototypes" ] +- cflags_cc = [ ++ cflags_cc += [ + "-Wnon-virtual-dtor", + + # This is enabled for clang; enable for gcc as well. diff --git a/third_party/libwebrtc/moz-patch-stack/s0129.patch b/third_party/libwebrtc/moz-patch-stack/s0129.patch @@ -1,40 +1,23 @@ From: Michael Froman <mfroman@mozilla.com> -Date: Wed, 8 Oct 2025 17:49:00 +0000 -Subject: Bug 1980501 - enable c++20 builds in libwebrtc. r?ng! +Date: Wed, 8 Oct 2025 16:39:00 -0500 +Subject: Bug 1993083 - (fix-032f8c223e) add missing stub implementation for + SSLStreamAdapter static method. -Differential Revision: https://phabricator.services.mozilla.com/D267994 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/43de54a6e52daf0a06956ae01951ef1e29d46e82 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/293f1877fead30723696b8f5cb354bdf819af5d3 --- - BUILD.gn | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + rtc_base/ssl_stream_adapter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/BUILD.gn b/BUILD.gn -index 600993950b..3ba008076e 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -315,6 +315,16 @@ config("common_config") { - cflags_objc = [] - defines = [] +diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h +index 24fc299b82..ec16887eac 100644 +--- a/rtc_base/ssl_stream_adapter.h ++++ b/rtc_base/ssl_stream_adapter.h +@@ -247,7 +247,7 @@ class SSLStreamAdapter : public StreamInterface { + static std::set<uint16_t> GetSupportedEphemeralKeyExchangeCipherGroups() + { return {}; } + static std::optional<std::string> GetEphemeralKeyExchangeCipherGroupName( +- uint16_t group_id); ++ uint16_t group_id) { return std::nullopt; } + static std::vector<uint16_t> GetDefaultEphemeralKeyExchangeCipherGroups( + const FieldTrialsView* field_trials) { return {}; } -+ # We should be able to remove this after c++20 is enabled -+ # across the Mozilla tree. -+ if (build_with_mozilla) { -+ if (is_win) { -+ cflags_cc += [ "-std:c++20" ] -+ } else { -+ cflags_cc += [ "-std=gnu++20" ] -+ } -+ } -+ - if (rtc_enable_protobuf) { - defines += [ "WEBRTC_ENABLE_PROTOBUF=1" ] - } else { -@@ -416,7 +426,7 @@ config("common_config") { - # "-Wnested-externs", (C/Obj-C only) - ] - cflags_objc += [ "-Wstrict-prototypes" ] -- cflags_cc = [ -+ cflags_cc += [ - "-Wnon-virtual-dtor", - - # This is enabled for clang; enable for gcc as well. diff --git a/third_party/libwebrtc/moz-patch-stack/s0130.patch b/third_party/libwebrtc/moz-patch-stack/s0130.patch @@ -1,23 +1,22 @@ -From: Michael Froman <mfroman@mozilla.com> -Date: Wed, 8 Oct 2025 16:39:00 -0500 -Subject: Bug 1993083 - (fix-032f8c223e) add missing stub implementation for - SSLStreamAdapter static method. +From: Jan-Ivar Bruaroey <jib@mozilla.com> +Date: Wed, 8 Oct 2025 17:05:00 +0000 +Subject: Bug 1868223 - Add api:frame_transformer_factory to BUILD.gn r=mjf -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/293f1877fead30723696b8f5cb354bdf819af5d3 +Differential Revision: https://phabricator.services.mozilla.com/D267541 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8e7778c59894c284b8bddd39b731e999fe2e807c --- - rtc_base/ssl_stream_adapter.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + BUILD.gn | 1 + + 1 file changed, 1 insertion(+) -diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h -index 24fc299b82..ec16887eac 100644 ---- a/rtc_base/ssl_stream_adapter.h -+++ b/rtc_base/ssl_stream_adapter.h -@@ -247,7 +247,7 @@ class SSLStreamAdapter : public StreamInterface { - static std::set<uint16_t> GetSupportedEphemeralKeyExchangeCipherGroups() - { return {}; } - static std::optional<std::string> GetEphemeralKeyExchangeCipherGroupName( -- uint16_t group_id); -+ uint16_t group_id) { return std::nullopt; } - static std::vector<uint16_t> GetDefaultEphemeralKeyExchangeCipherGroups( - const FieldTrialsView* field_trials) { return {}; } +diff --git a/BUILD.gn b/BUILD.gn +index 3ba008076e..da75caaed6 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -625,6 +625,7 @@ if (!build_with_chromium) { + if (build_with_mozilla) { + deps += [ ++ "api:frame_transformer_factory", + "api/audio:builtin_audio_processing_builder", + "api/environment:environment_factory", + "api/video:video_frame", diff --git a/third_party/libwebrtc/moz-patch-stack/s0131.patch b/third_party/libwebrtc/moz-patch-stack/s0131.patch @@ -1,22 +0,0 @@ -From: Jan-Ivar Bruaroey <jib@mozilla.com> -Date: Wed, 8 Oct 2025 17:05:00 +0000 -Subject: Bug 1868223 - Add api:frame_transformer_factory to BUILD.gn r=mjf - -Differential Revision: https://phabricator.services.mozilla.com/D267541 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8e7778c59894c284b8bddd39b731e999fe2e807c ---- - BUILD.gn | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/BUILD.gn b/BUILD.gn -index 3ba008076e..da75caaed6 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -625,6 +625,7 @@ if (!build_with_chromium) { - - if (build_with_mozilla) { - deps += [ -+ "api:frame_transformer_factory", - "api/audio:builtin_audio_processing_builder", - "api/environment:environment_factory", - "api/video:video_frame",