Skip to content

Commit

Permalink
Bug 1867099 - Vendor libwebrtc from d8633868b3
Browse files Browse the repository at this point in the history
Essentially a no-op since we're going to see this change
reverted when we vendor in c2bbe4b952.

Upstream commit: https://webrtc.googlesource.com/src/+/d8633868b34dc1d841f0a9fd1afe2bc22aa8bde6
    Enable SRTP GCM ciphers by default

    Bug: webrtc:15178
    Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Philipp Hancke <phancke@microsoft.com>
    Reviewed-by: Victor Boivie <boivie@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#40828}
  • Loading branch information
mfromanmoz committed Nov 29, 2023
1 parent 70f31a5 commit b571ad7
Show file tree
Hide file tree
Showing 106 changed files with 47,410 additions and 47,214 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26199,3 +26199,6 @@ bbc7711878
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/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
98e71f57ea
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/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
d8633868b3
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -17490,3 +17490,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-11-29T23:39:44.405542.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-11-29T23:40:43.565101.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-11-29T23:41:47.314839.
1,877 changes: 187 additions & 1,690 deletions third_party/libwebrtc/moz-patch-stack/0001.patch

Large diffs are not rendered by default.

1,704 changes: 1,677 additions & 27 deletions third_party/libwebrtc/moz-patch-stack/0002.patch

Large diffs are not rendered by default.

65 changes: 37 additions & 28 deletions third_party/libwebrtc/moz-patch-stack/0003.patch
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
From: Michael Froman <mfroman@mozilla.com>
Date: Fri, 9 Jul 2021 18:14:00 -0500
Subject: Bug 1654112 - mutex changes to fix tsan errors. r=ng
From: Nico Grunbaum <na-g@nostrum.com>
Date: Sat, 13 Feb 2021 04:20:00 -0800
Subject: Bug 1654112 - Add pid_t to desktop_capture_types.h; r=pehrsons

Differential Revision: https://phabricator.services.mozilla.com/D119674
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/3d5503acf9a4b22e02c4300f29e4fbfed406ea2c
Upstreaming bug 1697385

Also includes:
Bug 1654112 - Clarifying prev. rev that moved pid_t into the global namespace; r=dminor

Differential Revision: https://phabricator.services.mozilla.com/D107897
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/539b69f0e21118a1898f1ef689577c7193ff7be7
---
rtc_base/logging.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
modules/desktop_capture/desktop_capture_types.h | 4 ++++
modules/video_capture/video_capture.h | 1 +
2 files changed, 5 insertions(+)

diff --git a/rtc_base/logging.cc b/rtc_base/logging.cc
index ad2303735e..9c2d3b0a39 100644
--- a/rtc_base/logging.cc
+++ b/rtc_base/logging.cc
@@ -275,8 +275,8 @@ void LogMessage::LogTimestamps(bool on) {
}
diff --git a/modules/desktop_capture/desktop_capture_types.h b/modules/desktop_capture/desktop_capture_types.h
index a4e3e897fd..e777a45f92 100644
--- a/modules/desktop_capture/desktop_capture_types.h
+++ b/modules/desktop_capture/desktop_capture_types.h
@@ -13,6 +13,10 @@

#include <stdint.h>

void LogMessage::LogToDebug(LoggingSeverity min_sev) {
- g_dbg_sev = min_sev;
webrtc::MutexLock lock(&GetLoggingLock());
+ g_dbg_sev = min_sev;
UpdateMinLogSeverity();
}
+#ifdef XP_WIN // Moving this into the global namespace
+typedef int pid_t; // matching what used to be in
+#endif // video_capture_defines.h
+
namespace webrtc {

@@ -460,6 +460,9 @@ void LogMessage::OutputToDebug(const LogLineRef& log_line) {
enum class CaptureType { kWindow, kScreen, kAnyScreenContent };
diff --git a/modules/video_capture/video_capture.h b/modules/video_capture/video_capture.h
index e207598d68..58485f28e9 100644
--- a/modules/video_capture/video_capture.h
+++ b/modules/video_capture/video_capture.h
@@ -13,6 +13,7 @@

// static
bool LogMessage::IsNoop(LoggingSeverity severity) {
+ // Added MutexLock to fix tsan warnings on accessing g_dbg_sev. (mjf)
+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=1228729
+ webrtc::MutexLock lock(&GetLoggingLock());
if (severity >= g_dbg_sev || severity >= g_min_sev)
return false;
return streams_empty_.load(std::memory_order_relaxed);
#include "api/video/video_rotation.h"
#include "api/video/video_sink_interface.h"
+#include "modules/desktop_capture/desktop_capture_types.h"
#include "modules/video_capture/raw_video_sink_interface.h"
#include "modules/video_capture/video_capture_defines.h"
#include <set>
68 changes: 28 additions & 40 deletions third_party/libwebrtc/moz-patch-stack/0004.patch
Original file line number Diff line number Diff line change
@@ -1,46 +1,34 @@
From: Dan Minor <dminor@mozilla.com>
Date: Wed, 18 Nov 2020 13:33:00 -0500
Subject: Bug 1654112 - Suppress -Wclass-varargs warning in logging.h. r=ng
From: Michael Froman <mfroman@mozilla.com>
Date: Fri, 9 Jul 2021 18:14:00 -0500
Subject: Bug 1654112 - mutex changes to fix tsan errors. r=ng

This needs some investigation to see why we get this warning when it is not
present upstream.

Since both were doing the same thing for different compiler chains,
also includes:
Bug 1654112 - linux build fix (pragmas) for base-toolchains* . r=ng

Differential Revision: https://phabricator.services.mozilla.com/D130086
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8d832e832ffe513246c0763a56376a8022b2447b
Differential Revision: https://phabricator.services.mozilla.com/D119674
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/3d5503acf9a4b22e02c4300f29e4fbfed406ea2c
---
rtc_base/logging.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
rtc_base/logging.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rtc_base/logging.h b/rtc_base/logging.h
index df7f173f58..a3733d7543 100644
--- a/rtc_base/logging.h
+++ b/rtc_base/logging.h
@@ -48,6 +48,14 @@
#ifndef RTC_BASE_LOGGING_H_
#define RTC_BASE_LOGGING_H_

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvarargs"
+
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wclass-varargs"
+#endif
+
#include <errno.h>
diff --git a/rtc_base/logging.cc b/rtc_base/logging.cc
index ad2303735e..9c2d3b0a39 100644
--- a/rtc_base/logging.cc
+++ b/rtc_base/logging.cc
@@ -275,8 +275,8 @@ void LogMessage::LogTimestamps(bool on) {
}

#include <atomic>
@@ -764,4 +772,9 @@ inline const char* AdaptString(const std::string& str) {
void LogMessage::LogToDebug(LoggingSeverity min_sev) {
- g_dbg_sev = min_sev;
webrtc::MutexLock lock(&GetLoggingLock());
+ g_dbg_sev = min_sev;
UpdateMinLogSeverity();
}

} // namespace rtc
@@ -460,6 +460,9 @@ void LogMessage::OutputToDebug(const LogLineRef& log_line) {

+#pragma GCC diagnostic pop
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
+
#endif // RTC_BASE_LOGGING_H_
// static
bool LogMessage::IsNoop(LoggingSeverity severity) {
+ // Added MutexLock to fix tsan warnings on accessing g_dbg_sev. (mjf)
+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=1228729
+ webrtc::MutexLock lock(&GetLoggingLock());
if (severity >= g_dbg_sev || severity >= g_min_sev)
return false;
return streams_empty_.load(std::memory_order_relaxed);
77 changes: 37 additions & 40 deletions third_party/libwebrtc/moz-patch-stack/0005.patch
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
From: Dan Minor <dminor@mozilla.com>
Date: Tue, 27 Mar 2018 15:43:00 -0400
Subject: Bug 1376873 - Disable Mid support in RtpDemuxer; r=mjf
Date: Wed, 18 Nov 2020 13:33:00 -0500
Subject: Bug 1654112 - Suppress -Wclass-varargs warning in logging.h. r=ng

The only use of Mid in the current webrtc.org code is in the unit tests.
RtpStreamReceiverController only allows adding sinks using SSRCs. Because
of this, we'll end up dropping packets in the RtpDemuxer with the current
code as none of our Mids will be recognized.
This needs some investigation to see why we get this warning when it is not
present upstream.

Tip of webrtc.org fully supports using Mids, so we'll be able to enable this
code again after the next update.
Since both were doing the same thing for different compiler chains,
also includes:
Bug 1654112 - linux build fix (pragmas) for base-toolchains* . r=ng

Differential Revision: https://phabricator.services.mozilla.com/D7442
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b3ba8452e77105c72f6ddbc49cbe5a53dbea1507
Differential Revision: https://phabricator.services.mozilla.com/D130086
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8d832e832ffe513246c0763a56376a8022b2447b
---
call/rtp_demuxer.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
rtc_base/logging.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/call/rtp_demuxer.cc b/call/rtp_demuxer.cc
index 0b74f2ac0a..5c53f48144 100644
--- a/call/rtp_demuxer.cc
+++ b/call/rtp_demuxer.cc
@@ -272,13 +272,17 @@ RtpPacketSinkInterface* RtpDemuxer::ResolveSink(
// RSID and RRID are routed to the same sinks. If an RSID is specified on a
// repair packet, it should be ignored and the RRID should be used.
std::string packet_mid, packet_rsid;
- bool has_mid = use_mid_ && packet.GetExtension<RtpMid>(&packet_mid);
+ //bool has_mid = use_mid_ && packet.GetExtension<RtpMid>(&packet_mid);
bool has_rsid = packet.GetExtension<RepairedRtpStreamId>(&packet_rsid);
if (!has_rsid) {
has_rsid = packet.GetExtension<RtpStreamId>(&packet_rsid);
}
uint32_t ssrc = packet.Ssrc();
diff --git a/rtc_base/logging.h b/rtc_base/logging.h
index df7f173f58..a3733d7543 100644
--- a/rtc_base/logging.h
+++ b/rtc_base/logging.h
@@ -48,6 +48,14 @@
#ifndef RTC_BASE_LOGGING_H_
#define RTC_BASE_LOGGING_H_

+ // Mid support is half-baked in branch 64. RtpStreamReceiverController only
+ // supports adding sinks by ssrc, so our mids will never show up in
+ // known_mids_, causing us to drop packets here.
+#if 0
// The BUNDLE spec says to drop any packets with unknown MIDs, even if the
// SSRC is known/latched.
if (has_mid && known_mids_.find(packet_mid) == known_mids_.end()) {
@@ -352,6 +356,7 @@ RtpPacketSinkInterface* RtpDemuxer::ResolveSink(
}
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvarargs"
+
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wclass-varargs"
+#endif
+
#include <errno.h>

#include <atomic>
@@ -764,4 +772,9 @@ inline const char* AdaptString(const std::string& str) {

} // namespace rtc

+#pragma GCC diagnostic pop
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
// We trust signaled SSRC more than payload type which is likely to conflict
// between streams.
const auto ssrc_sink_it = sink_by_ssrc_.find(ssrc);
+
#endif // RTC_BASE_LOGGING_H_
Loading

0 comments on commit b571ad7

Please sign in to comment.