Files
tubestation/third_party/libwebrtc/moz-patch-stack/0053.patch
Michael Froman 00bb744764 Bug 1942428 - Vendor libwebrtc from 882b32d00f
Upstream commit: https://webrtc.googlesource.com/src/+/882b32d00f6330da948d8e578d259dec0078e7ed
    Reland "Use PayloadTypePicker for video PT assignment"

    This reverts commit e046787a5a80a9d292b3aec7e946644e025a2b95.

    Reason for revert: Revised codec matching to fix issue.

    Changes also back out some changes that should not have been
    included (using PayloadTypePicker for codec list merging).

    Original change's description:
    > Revert "Use PayloadTypePicker for video PT assignment"
    >
    > This reverts commit e5048949b0fcc275264e24f3b2a4c658fcc84aa3.
    >
    > Reason for revert: Broke internal tests.
    >
    > Original change's description:
    > > Use PayloadTypePicker for video PT assignment
    > >
    > > This includes changes that change the order of codecs.
    > > It is preparatory to doing late assignment of video PTs.
    > >
    > > Bug: webrtc:360058654
    > > Change-Id: Id5ddaf94d4b9557c0502a373e42635108d8fdf26
    > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366400
    > > Reviewed-by: Henrik Boström <hbos@webrtc.org>
    > > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    > > Cr-Commit-Position: refs/heads/main@{#43489}
    >
    > Bug: webrtc:360058654
    > Change-Id: I5c94a7bafa49bdf17f665480398707155e458d26
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370240
    > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
    > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    > Cr-Commit-Position: refs/heads/main@{#43490}

    Bug: webrtc:360058654
    Change-Id: I66b3b6bd657c66f8860c5e67a504266d7707f48d
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370380
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Reviewed-by: Artem Titov <titovartem@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#43554}
2025-02-07 15:42:21 -06:00

139 lines
4.2 KiB
Diff

From: Michael Froman <mjfroman@mac.com>
Date: Mon, 4 Apr 2022 12:25:26 -0500
Subject: Bug 1766646 - (fix) breakout Call::Stats and SharedModuleThread into
seperate files
---
call/BUILD.gn | 6 ++++++
call/call.cc | 13 -------------
call/call.h | 11 ++---------
call/call_basic_stats.cc | 20 ++++++++++++++++++++
call/call_basic_stats.h | 21 +++++++++++++++++++++
5 files changed, 49 insertions(+), 22 deletions(-)
create mode 100644 call/call_basic_stats.cc
create mode 100644 call/call_basic_stats.h
diff --git a/call/BUILD.gn b/call/BUILD.gn
index 9e4c4d1d96..7bfa30fae0 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -33,6 +33,12 @@ rtc_library("call_interfaces") {
"syncable.cc",
"syncable.h",
]
+ if (build_with_mozilla) {
+ sources += [
+ "call_basic_stats.cc",
+ "call_basic_stats.h",
+ ]
+ }
deps = [
":audio_sender_interface",
diff --git a/call/call.cc b/call/call.cc
index 6816212164..eea71e449a 100644
--- a/call/call.cc
+++ b/call/call.cc
@@ -514,19 +514,6 @@ class Call final : public webrtc::Call,
};
} // namespace internal
-std::string Call::Stats::ToString(int64_t time_ms) const {
- char buf[1024];
- rtc::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 ae6eaf82d9..eb4dae0f95 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/call/call_basic_stats.cc b/call/call_basic_stats.cc
new file mode 100644
index 0000000000..74333a663b
--- /dev/null
+++ b/call/call_basic_stats.cc
@@ -0,0 +1,20 @@
+#include "call/call_basic_stats.h"
+
+#include "rtc_base/strings/string_builder.h"
+
+namespace webrtc {
+
+std::string CallBasicStats::ToString(int64_t time_ms) const {
+ char buf[1024];
+ rtc::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();
+}
+
+} // namespace webrtc
diff --git a/call/call_basic_stats.h b/call/call_basic_stats.h
new file mode 100644
index 0000000000..98febe9405
--- /dev/null
+++ b/call/call_basic_stats.h
@@ -0,0 +1,21 @@
+#ifndef CALL_CALL_BASIC_STATS_H_
+#define CALL_CALL_BASIC_STATS_H_
+
+#include <string>
+
+namespace webrtc {
+
+// named to avoid conflicts with video/call_stats.h
+struct CallBasicStats {
+ 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;
+};
+
+} // namespace webrtc
+
+#endif // CALL_CALL_BASIC_STATS_H_