diff --git a/third_party/libwebrtc/README.moz-ff-commit b/third_party/libwebrtc/README.moz-ff-commit index 68219672facf..18b48fc6a04a 100644 --- a/third_party/libwebrtc/README.moz-ff-commit +++ b/third_party/libwebrtc/README.moz-ff-commit @@ -33963,3 +33963,6 @@ badfd6347e # MOZ_LIBWEBRTC_SRC=/Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh # base of lastest vendoring 9fb71e3b01 +# MOZ_LIBWEBRTC_SRC=/Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh +# base of lastest vendoring +a5d71009ac diff --git a/third_party/libwebrtc/README.mozilla b/third_party/libwebrtc/README.mozilla index 461f46dd8228..3d1fdf34e29f 100644 --- a/third_party/libwebrtc/README.mozilla +++ b/third_party/libwebrtc/README.mozilla @@ -22668,3 +22668,5 @@ libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-lib libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-12-05T22:16:45.953963+00:00. # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-12-05T22:18:19.097360+00:00. +# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc +libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-12-05T22:19:55.432580+00:00. diff --git a/third_party/libwebrtc/moz-patch-stack/0114.patch b/third_party/libwebrtc/moz-patch-stack/0114.patch index 1f7333e58766..4abddfe5c064 100644 --- a/third_party/libwebrtc/moz-patch-stack/0114.patch +++ b/third_party/libwebrtc/moz-patch-stack/0114.patch @@ -42,7 +42,7 @@ index db2a3c7099..a0607b4aba 100644 uint32_t DeviceInfoPipeWire::NumberOfDevices() { RTC_CHECK(pipewire_session_); diff --git a/modules/video_capture/linux/pipewire_session.cc b/modules/video_capture/linux/pipewire_session.cc -index 85ccb289d8..dc270b7b3a 100644 +index 98eb656096..0b1504170b 100644 --- a/modules/video_capture/linux/pipewire_session.cc +++ b/modules/video_capture/linux/pipewire_session.cc @@ -9,6 +9,7 @@ diff --git a/third_party/libwebrtc/moz-patch-stack/0136.patch b/third_party/libwebrtc/moz-patch-stack/0136.patch index 930232fa242d..d4bfbe47e34f 100644 --- a/third_party/libwebrtc/moz-patch-stack/0136.patch +++ b/third_party/libwebrtc/moz-patch-stack/0136.patch @@ -1,59 +1,21 @@ -From: Jan Grulich -Date: Tue, 12 Nov 2024 12:28:00 +0000 -Subject: Bug 1930598 - WebRTC backport: PipeWire camera: use better unique - device name for camera devices r=pehrsons,webrtc-reviewers +From: Michael Froman +Date: Thu, 21 Nov 2024 13:57:00 -0600 +Subject: Bug 1928110 - (fix-d259a754a8) add missing include -Originally we used node id from PipeWire as an unique device name and -while this works, it will change everytime PipeWire is restarted. This -has an impact on default camera selection, where for example Firefox can -automatically request a camera device that was used before, but this can -break with the next PipeWire restart. - -This is a simple backport of an WebRTC upstream change. - -Upstream commit: a5d71009ac1dce7da23813dc9413c03073cfa8ca - -Differential Revision: https://phabricator.services.mozilla.com/D228635 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b48b48759149275fc393d76c851f5b8cb75c63ed +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/250798952aa5b1f0c4996bcd95c77e917d44f738 --- - modules/video_capture/linux/pipewire_session.cc | 2 +- - modules/video_capture/linux/video_capture_pipewire.cc | 11 +++++++---- - 2 files changed, 8 insertions(+), 5 deletions(-) + rtc_base/ssl_stream_adapter.h | 1 + + 1 file changed, 1 insertion(+) -diff --git a/modules/video_capture/linux/pipewire_session.cc b/modules/video_capture/linux/pipewire_session.cc -index dc270b7b3a..0b1504170b 100644 ---- a/modules/video_capture/linux/pipewire_session.cc -+++ b/modules/video_capture/linux/pipewire_session.cc -@@ -76,7 +76,7 @@ PipeWireNode::PipeWireNode(PipeWireSession* session, - : session_(session), - id_(id), - display_name_(spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)), -- unique_id_(rtc::ToString(id)) { -+ unique_id_(spa_dict_lookup(props, PW_KEY_NODE_NAME)) { - RTC_LOG(LS_VERBOSE) << "Found Camera: " << display_name_; - - proxy_ = static_cast(pw_registry_bind( -diff --git a/modules/video_capture/linux/video_capture_pipewire.cc b/modules/video_capture/linux/video_capture_pipewire.cc -index e9d99133f5..f6cd57ac36 100644 ---- a/modules/video_capture/linux/video_capture_pipewire.cc -+++ b/modules/video_capture/linux/video_capture_pipewire.cc -@@ -83,12 +83,15 @@ int32_t VideoCaptureModulePipeWire::Init(const char* deviceUniqueId) { - RTC_CHECK_RUNS_SERIALIZED(&capture_checker_); - RTC_DCHECK_RUN_ON(&api_checker_); - -- std::optional id; -- id = rtc::StringToNumber(deviceUniqueId); -- if (id == std::nullopt) -+ auto node = -+ std::find_if(session_->nodes_.begin(), session_->nodes_.end(), -+ [deviceUniqueId](const PipeWireNode::PipeWireNodePtr& node) { -+ return node->unique_id() == deviceUniqueId; -+ }); -+ if (node == session_->nodes_.end()) - return -1; +diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h +index ece5b44ac5..b9041d0b5e 100644 +--- a/rtc_base/ssl_stream_adapter.h ++++ b/rtc_base/ssl_stream_adapter.h +@@ -15,6 +15,7 @@ + #include -- node_id_ = id.value(); -+ node_id_ = (*node)->id(); + #include ++#include + #include + #include - const int len = strlen(deviceUniqueId); - _deviceUniqueId = new (std::nothrow) char[len + 1]; diff --git a/third_party/libwebrtc/moz-patch-stack/0137.patch b/third_party/libwebrtc/moz-patch-stack/0137.patch index d4bfbe47e34f..85b9d97615d8 100644 --- a/third_party/libwebrtc/moz-patch-stack/0137.patch +++ b/third_party/libwebrtc/moz-patch-stack/0137.patch @@ -1,21 +1,204 @@ -From: Michael Froman -Date: Thu, 21 Nov 2024 13:57:00 -0600 -Subject: Bug 1928110 - (fix-d259a754a8) add missing include +From: Nico Grunbaum +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/250798952aa5b1f0c4996bcd95c77e917d44f738 +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 --- - rtc_base/ssl_stream_adapter.h | 1 + - 1 file changed, 1 insertion(+) + BUILD.gn | 4 ++++ + media/BUILD.gn | 24 ++++++++++++++---------- + rtc_base/BUILD.gn | 44 ++++++++++++++++++++++++-------------------- + webrtc.gni | 4 ++-- + 4 files changed, 44 insertions(+), 32 deletions(-) -diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h -index ece5b44ac5..b9041d0b5e 100644 ---- a/rtc_base/ssl_stream_adapter.h -+++ b/rtc_base/ssl_stream_adapter.h -@@ -15,6 +15,7 @@ - #include - - #include -+#include - #include - #include +diff --git a/BUILD.gn b/BUILD.gn +index f11d86d211..6f75ecbbf5 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -524,6 +524,9 @@ if (!rtc_build_ssl) { + "crypto", + "ssl", + ] ++ if (build_with_mozilla) { ++ libs = [] ++ } + } + } + +@@ -619,6 +622,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 76f45d7045..aa6ea24934 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") { +@@ -273,6 +271,9 @@ rtc_library("media_engine") { + "base/media_engine.cc", + "base/media_engine.h", + ] ++ deps -= [ ++ ":media_channel_impl", ++ ] + } + } + +@@ -403,6 +404,7 @@ rtc_library("codec") { + ] + } + ++# MOZILLA Bug 1931241 - how much of this do we need? + rtc_library("rtp_utils") { + if (!build_with_mozilla) { + sources = [ +@@ -448,7 +450,6 @@ rtc_library("media_constants") { + } + + rtc_library("turn_utils") { +-if (!build_with_mozilla) { + sources = [ + "base/turn_utils.cc", + "base/turn_utils.h", +@@ -459,17 +460,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 = [] + } +-} + + rtc_library("rtc_simulcast_encoder_adapter") { + visibility = [ "*" ] +@@ -715,6 +713,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 be88e2c586..c12590eadc 100644 +--- a/rtc_base/BUILD.gn ++++ b/rtc_base/BUILD.gn +@@ -1526,29 +1526,32 @@ rtc_source_set("ssl_header") { + } + + rtc_source_set("digest") { +- visibility = [ "*" ] +- sources = [ +- "message_digest.cc", +- "message_digest.h", +- "openssl_digest.cc", +- "openssl_digest.h", +- ] +- deps = [ +- ":checks", +- ":ssl_header", +- ":stringutils", +- "//third_party/abseil-cpp/absl/strings:string_view", +- ] +- +- # If we are building the SSL library ourselves, we know it's BoringSSL. +- if (rtc_build_ssl) { +- deps += [ "//third_party/boringssl" ] +- } else { +- configs += [ "..:external_ssl_library" ] +- } ++if (!build_with_mozilla) { ++ visibility = [ "*" ] ++ sources = [ ++ "message_digest.cc", ++ "message_digest.h", ++ "openssl_digest.cc", ++ "openssl_digest.h", ++ ] ++ deps = [ ++ ":checks", ++ ":ssl_header", ++ ":stringutils", ++ "//third_party/abseil-cpp/absl/strings:string_view", ++ ] ++ ++ # If we are building the SSL library ourselves, we know it's BoringSSL. ++ if (rtc_build_ssl) { ++ deps += [ "//third_party/boringssl" ] ++ } else { ++ configs += [ "..:external_ssl_library" ] ++ } ++} + } + + rtc_library("crypto_random") { ++if (!build_with_mozilla) { + visibility = [ "*" ] + sources = [ + "crypto_random.cc", +@@ -1569,6 +1572,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 d29bf59424..6e86706f29 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -125,7 +125,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. +@@ -346,7 +346,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/0138.patch b/third_party/libwebrtc/moz-patch-stack/0138.patch index 85b9d97615d8..2e5ff9fd0367 100644 --- a/third_party/libwebrtc/moz-patch-stack/0138.patch +++ b/third_party/libwebrtc/moz-patch-stack/0138.patch @@ -1,204 +1,36 @@ From: Nico Grunbaum Date: Wed, 27 Nov 2024 03:41:00 +0000 -Subject: Bug 1921154 - libwebrtc build related changes for - AV1;r=mjf,webrtc-reviewers +Subject: Bug 1921154 - workaround older AV1;r=mjf,webrtc-reviewers -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 +Differential Revision: https://phabricator.services.mozilla.com/D228740 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/275786a9d6482996002fe1be24e8c6708430d892 --- - BUILD.gn | 4 ++++ - media/BUILD.gn | 24 ++++++++++++++---------- - rtc_base/BUILD.gn | 44 ++++++++++++++++++++++++-------------------- - webrtc.gni | 4 ++-- - 4 files changed, 44 insertions(+), 32 deletions(-) + modules/video_coding/codecs/av1/libaom_av1_encoder.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -diff --git a/BUILD.gn b/BUILD.gn -index f11d86d211..6f75ecbbf5 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -524,6 +524,9 @@ if (!rtc_build_ssl) { - "crypto", - "ssl", - ] -+ if (build_with_mozilla) { -+ libs = [] -+ } - } - } - -@@ -619,6 +622,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 76f45d7045..aa6ea24934 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") { -@@ -273,6 +271,9 @@ rtc_library("media_engine") { - "base/media_engine.cc", - "base/media_engine.h", - ] -+ deps -= [ -+ ":media_channel_impl", -+ ] +diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc +index a183704caa..9a8bd1d7b4 100644 +--- a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc ++++ b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc +@@ -298,8 +298,9 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings, + } else { + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0); } - } - -@@ -403,6 +404,7 @@ rtc_library("codec") { - ] - } - -+# MOZILLA Bug 1931241 - how much of this do we need? - rtc_library("rtp_utils") { - if (!build_with_mozilla) { - sources = [ -@@ -448,7 +450,6 @@ rtc_library("media_constants") { - } - - rtc_library("turn_utils") { --if (!build_with_mozilla) { - sources = [ - "base/turn_utils.cc", - "base/turn_utils.h", -@@ -459,17 +460,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 = [] - } --} - - rtc_library("rtc_simulcast_encoder_adapter") { - visibility = [ "*" ] -@@ -715,6 +713,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 be88e2c586..c12590eadc 100644 ---- a/rtc_base/BUILD.gn -+++ b/rtc_base/BUILD.gn -@@ -1526,29 +1526,32 @@ rtc_source_set("ssl_header") { - } - - rtc_source_set("digest") { -- visibility = [ "*" ] -- sources = [ -- "message_digest.cc", -- "message_digest.h", -- "openssl_digest.cc", -- "openssl_digest.h", -- ] -- deps = [ -- ":checks", -- ":ssl_header", -- ":stringutils", -- "//third_party/abseil-cpp/absl/strings:string_view", -- ] - -- # If we are building the SSL library ourselves, we know it's BoringSSL. -- if (rtc_build_ssl) { -- deps += [ "//third_party/boringssl" ] -- } else { -- configs += [ "..:external_ssl_library" ] -- } -+if (!build_with_mozilla) { -+ visibility = [ "*" ] -+ sources = [ -+ "message_digest.cc", -+ "message_digest.h", -+ "openssl_digest.cc", -+ "openssl_digest.h", -+ ] -+ deps = [ -+ ":checks", -+ ":ssl_header", -+ ":stringutils", -+ "//third_party/abseil-cpp/absl/strings:string_view", -+ ] -+ -+ # If we are building the SSL library ourselves, we know it's BoringSSL. -+ if (rtc_build_ssl) { -+ deps += [ "//third_party/boringssl" ] -+ } else { -+ configs += [ "..:external_ssl_library" ] -+ } -+} - } - - rtc_library("crypto_random") { -+if (!build_with_mozilla) { - visibility = [ "*" ] - sources = [ - "crypto_random.cc", -@@ -1569,6 +1572,7 @@ rtc_library("crypto_random") { - configs += [ "..:external_ssl_library" ] ++#if !defined(WEBRTC_MOZILLA_BUILD) // Mozilla: Need to update AV1 to enable this + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_AUTO_TILES, 1); ++#endif + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ROW_MT, 1); + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_OBMC, 0); + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_NOISE_SENSITIVITY, 0); +@@ -332,8 +333,10 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings, + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_REFERENCE_FRAMES, 3); + + if (adaptive_max_consec_drops_) { ++#if !defined(WEBRTC_MOZILLA_BUILD) // Mozilla: Need to update AV1 to enable this + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR, + 250); ++#endif } - } -+} - - rtc_library("ssl") { - if (!build_with_mozilla) { -diff --git a/webrtc.gni b/webrtc.gni -index d29bf59424..6e86706f29 100644 ---- a/webrtc.gni -+++ b/webrtc.gni -@@ -125,7 +125,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. -@@ -346,7 +346,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). + return WEBRTC_VIDEO_CODEC_OK; diff --git a/third_party/libwebrtc/moz-patch-stack/0139.patch b/third_party/libwebrtc/moz-patch-stack/0139.patch index 2e5ff9fd0367..734d9defcdf6 100644 --- a/third_party/libwebrtc/moz-patch-stack/0139.patch +++ b/third_party/libwebrtc/moz-patch-stack/0139.patch @@ -1,36 +1,30 @@ -From: Nico Grunbaum -Date: Wed, 27 Nov 2024 03:41:00 +0000 -Subject: Bug 1921154 - workaround older AV1;r=mjf,webrtc-reviewers +From: Michael Froman +Date: Thu, 5 Dec 2024 13:45:00 -0600 +Subject: Bug 1934695 - (fix-3fa21c89c0) fix upstream compile issue in + apm_data_dumper.h -Differential Revision: https://phabricator.services.mozilla.com/D228740 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/275786a9d6482996002fe1be24e8c6708430d892 +It is unclear why upstream modified a single DumpRaw call differently than +all the others, but it doesn't build for us. We'll fix it the same they +fixed all the other calls using [[maybe_unused]] annotations. +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8f64d5713228e3112f3014d9a269dce10795febf --- - modules/video_coding/codecs/av1/libaom_av1_encoder.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + modules/audio_processing/logging/apm_data_dumper.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc -index a183704caa..9a8bd1d7b4 100644 ---- a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc -+++ b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc -@@ -298,8 +298,9 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings, - } else { - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0); +diff --git a/modules/audio_processing/logging/apm_data_dumper.h b/modules/audio_processing/logging/apm_data_dumper.h +index 09d24bd034..d05b580b09 100644 +--- a/modules/audio_processing/logging/apm_data_dumper.h ++++ b/modules/audio_processing/logging/apm_data_dumper.h +@@ -348,9 +348,9 @@ class ApmDataDumper { + #endif } -- -+#if !defined(WEBRTC_MOZILLA_BUILD) // Mozilla: Need to update AV1 to enable this - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_AUTO_TILES, 1); -+#endif - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ROW_MT, 1); - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_OBMC, 0); - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_NOISE_SENSITIVITY, 0); -@@ -332,8 +333,10 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings, - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_REFERENCE_FRAMES, 3); - if (adaptive_max_consec_drops_) { -+#if !defined(WEBRTC_MOZILLA_BUILD) // Mozilla: Need to update AV1 to enable this - SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR, - 250); -+#endif - } - - return WEBRTC_VIDEO_CODEC_OK; +- void DumpRaw(absl::string_view /* name */, +- rtc::ArrayView /* v */, +- int /* dump_set */ = kDefaultDumpSet) { ++ void DumpRaw([[maybe_unused]] absl::string_view name, ++ [[maybe_unused]] rtc::ArrayView v, ++ [[maybe_unused]] int dump_set = kDefaultDumpSet) { + #if WEBRTC_APM_DEBUG_DUMP == 1 + if (dump_set_to_use_ && *dump_set_to_use_ != dump_set) + return; diff --git a/third_party/libwebrtc/moz-patch-stack/0140.patch b/third_party/libwebrtc/moz-patch-stack/0140.patch deleted file mode 100644 index 734d9defcdf6..000000000000 --- a/third_party/libwebrtc/moz-patch-stack/0140.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Michael Froman -Date: Thu, 5 Dec 2024 13:45:00 -0600 -Subject: Bug 1934695 - (fix-3fa21c89c0) fix upstream compile issue in - apm_data_dumper.h - -It is unclear why upstream modified a single DumpRaw call differently than -all the others, but it doesn't build for us. We'll fix it the same they -fixed all the other calls using [[maybe_unused]] annotations. -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8f64d5713228e3112f3014d9a269dce10795febf ---- - modules/audio_processing/logging/apm_data_dumper.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules/audio_processing/logging/apm_data_dumper.h b/modules/audio_processing/logging/apm_data_dumper.h -index 09d24bd034..d05b580b09 100644 ---- a/modules/audio_processing/logging/apm_data_dumper.h -+++ b/modules/audio_processing/logging/apm_data_dumper.h -@@ -348,9 +348,9 @@ class ApmDataDumper { - #endif - } - -- void DumpRaw(absl::string_view /* name */, -- rtc::ArrayView /* v */, -- int /* dump_set */ = kDefaultDumpSet) { -+ void DumpRaw([[maybe_unused]] absl::string_view name, -+ [[maybe_unused]] rtc::ArrayView v, -+ [[maybe_unused]] int dump_set = kDefaultDumpSet) { - #if WEBRTC_APM_DEBUG_DUMP == 1 - if (dump_set_to_use_ && *dump_set_to_use_ != dump_set) - return; diff --git a/third_party/libwebrtc/moz-patch-stack/a5d71009ac.no-op-cherry-pick-msg b/third_party/libwebrtc/moz-patch-stack/a5d71009ac.no-op-cherry-pick-msg deleted file mode 100644 index 2a7b826288b5..000000000000 --- a/third_party/libwebrtc/moz-patch-stack/a5d71009ac.no-op-cherry-pick-msg +++ /dev/null @@ -1 +0,0 @@ -We cherry-picked this in bug 1930598.