summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/call
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/call')
-rw-r--r--third_party/libwebrtc/call/BUILD.gn6
-rw-r--r--third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/audio_sender_interface_gn/moz.build7
-rw-r--r--third_party/libwebrtc/call/bitrate_allocator_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/bitrate_configurator_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/bitrate_estimator_tests.cc4
-rw-r--r--third_party/libwebrtc/call/call.cc5
-rw-r--r--third_party/libwebrtc/call/call_config.cc9
-rw-r--r--third_party/libwebrtc/call/call_config.h18
-rw-r--r--third_party/libwebrtc/call/call_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/call_interfaces_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/call_perf_tests.cc9
-rw-r--r--third_party/libwebrtc/call/call_unittest.cc13
-rw-r--r--third_party/libwebrtc/call/rampup_tests.cc21
-rw-r--r--third_party/libwebrtc/call/receive_stream_interface_gn/moz.build7
-rw-r--r--third_party/libwebrtc/call/rtp_demuxer.cc13
-rw-r--r--third_party/libwebrtc/call/rtp_demuxer.h3
-rw-r--r--third_party/libwebrtc/call/rtp_interfaces_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/rtp_receiver_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/rtp_sender_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/rtp_transport_config.h3
-rw-r--r--third_party/libwebrtc/call/rtp_transport_controller_send.cc7
-rw-r--r--third_party/libwebrtc/call/rtp_video_sender_unittest.cc4
-rw-r--r--third_party/libwebrtc/call/simulated_network.h2
-rw-r--r--third_party/libwebrtc/call/version.cc2
-rw-r--r--third_party/libwebrtc/call/version_gn/moz.build5
-rw-r--r--third_party/libwebrtc/call/video_send_stream.h1
-rw-r--r--third_party/libwebrtc/call/video_stream_api_gn/moz.build5
28 files changed, 69 insertions, 115 deletions
diff --git a/third_party/libwebrtc/call/BUILD.gn b/third_party/libwebrtc/call/BUILD.gn
index 47018a570a..626ed95066 100644
--- a/third_party/libwebrtc/call/BUILD.gn
+++ b/third_party/libwebrtc/call/BUILD.gn
@@ -61,6 +61,7 @@ rtc_library("call_interfaces") {
"../api/audio_codecs:audio_codecs_api",
"../api/crypto:frame_encryptor_interface",
"../api/crypto:options",
+ "../api/environment",
"../api/metronome",
"../api/neteq:neteq_api",
"../api/task_queue",
@@ -500,8 +501,8 @@ if (rtc_include_tests) {
"../api:rtp_parameters",
"../api:transport_api",
"../api/audio_codecs:builtin_audio_decoder_factory",
- "../api/rtc_event_log",
- "../api/task_queue:default_task_queue_factory",
+ "../api/environment",
+ "../api/environment:environment_factory",
"../api/test/video:function_video_factory",
"../api/transport:field_trial_based_config",
"../api/units:timestamp",
@@ -582,7 +583,6 @@ if (rtc_include_tests) {
"../api/rtc_event_log",
"../api/rtc_event_log:rtc_event_log_factory",
"../api/task_queue",
- "../api/task_queue:default_task_queue_factory",
"../api/task_queue:pending_task_safety_flag",
"../api/test/metrics:global_metrics_logger_and_exporter",
"../api/test/metrics:metric",
diff --git a/third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build b/third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
index d8893a7341..79a2aa9def 100644
--- a/third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
+++ b/third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
@@ -209,7 +209,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -219,10 +218,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/audio_sender_interface_gn/moz.build b/third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
index 2b42e8ebf9..a53966813f 100644
--- a/third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
+++ b/third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
@@ -187,16 +187,9 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
-
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/bitrate_allocator_gn/moz.build b/third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
index a56b55faf3..db772f8d39 100644
--- a/third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
+++ b/third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
@@ -199,7 +199,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -209,10 +208,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/bitrate_configurator_gn/moz.build b/third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
index e6f73025aa..f7c51b4a7c 100644
--- a/third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
+++ b/third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
@@ -199,7 +199,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -209,10 +208,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/bitrate_estimator_tests.cc b/third_party/libwebrtc/call/bitrate_estimator_tests.cc
index f17a037ed2..d945dfccca 100644
--- a/third_party/libwebrtc/call/bitrate_estimator_tests.cc
+++ b/third_party/libwebrtc/call/bitrate_estimator_tests.cc
@@ -178,13 +178,13 @@ class BitrateEstimatorTest : public test::CallTest {
RTC_DCHECK_EQ(1, test_->GetVideoEncoderConfig()->number_of_streams);
frame_generator_capturer_ =
std::make_unique<test::FrameGeneratorCapturer>(
- test->clock_,
+ &test->env().clock(),
test::CreateSquareFrameGenerator(
test::VideoTestConstants::kDefaultWidth,
test::VideoTestConstants::kDefaultHeight, absl::nullopt,
absl::nullopt),
test::VideoTestConstants::kDefaultFramerate,
- *test->task_queue_factory_);
+ test->env().task_queue_factory());
frame_generator_capturer_->Init();
frame_generator_capturer_->Start();
send_stream_->SetSource(frame_generator_capturer_.get(),
diff --git a/third_party/libwebrtc/call/call.cc b/third_party/libwebrtc/call/call.cc
index 0f3699501e..63dc370f1a 100644
--- a/third_party/libwebrtc/call/call.cc
+++ b/third_party/libwebrtc/call/call.cc
@@ -453,7 +453,7 @@ class Call final : public webrtc::Call,
bool is_started_ RTC_GUARDED_BY(worker_thread_) = false;
// Sequence checker for outgoing network traffic. Could be the network thread.
- // Could also be a pacer owned thread or TQ such as the TaskQueuePacedSender.
+ // Could also be a pacer owned thread or TQ such as the TaskQueueSender.
RTC_NO_UNIQUE_ADDRESS SequenceChecker sent_packet_sequence_checker_;
absl::optional<rtc::SentPacket> last_sent_packet_
RTC_GUARDED_BY(sent_packet_sequence_checker_);
@@ -462,7 +462,8 @@ class Call final : public webrtc::Call,
/* Mozilla: Avoid this since it could use GetRealTimeClock().
std::unique_ptr<Call> Call::Create(const CallConfig& config) {
- Clock* clock = Clock::GetRealTimeClock();
+ Clock* clock =
+ config.env.has_value() ? &config.env->clock() : Clock::GetRealTimeClock();
return Create(config, clock,
RtpTransportControllerSendFactory().Create(
config.ExtractTransportConfig(), clock));
diff --git a/third_party/libwebrtc/call/call_config.cc b/third_party/libwebrtc/call/call_config.cc
index 93f6b1aec4..5832969b9c 100644
--- a/third_party/libwebrtc/call/call_config.cc
+++ b/third_party/libwebrtc/call/call_config.cc
@@ -14,6 +14,14 @@
namespace webrtc {
+CallConfig::CallConfig(const Environment& env,
+ TaskQueueBase* network_task_queue)
+ : env(env),
+ event_log(&env.event_log()),
+ task_queue_factory(&env.task_queue_factory()),
+ trials(&env.field_trials()),
+ network_task_queue_(network_task_queue) {}
+
CallConfig::CallConfig(RtcEventLog* event_log,
TaskQueueBase* network_task_queue /* = nullptr*/)
: event_log(event_log), network_task_queue_(network_task_queue) {
@@ -31,7 +39,6 @@ RtpTransportConfig CallConfig::ExtractTransportConfig() const {
network_state_predictor_factory;
transportConfig.task_queue_factory = task_queue_factory;
transportConfig.trials = trials;
- transportConfig.pacer_burst_interval = pacer_burst_interval;
return transportConfig;
}
diff --git a/third_party/libwebrtc/call/call_config.h b/third_party/libwebrtc/call/call_config.h
index 918c077435..1b1f696fee 100644
--- a/third_party/libwebrtc/call/call_config.h
+++ b/third_party/libwebrtc/call/call_config.h
@@ -10,6 +10,8 @@
#ifndef CALL_CALL_CONFIG_H_
#define CALL_CALL_CONFIG_H_
+#include "absl/types/optional.h"
+#include "api/environment/environment.h"
#include "api/fec_controller.h"
#include "api/field_trials_view.h"
#include "api/metronome/metronome.h"
@@ -32,12 +34,23 @@ struct CallConfig {
// If `network_task_queue` is set to nullptr, Call will assume that network
// related callbacks will be made on the same TQ as the Call instance was
// constructed on.
+ explicit CallConfig(const Environment& env,
+ TaskQueueBase* network_task_queue = nullptr);
+
+ // TODO(bugs.webrtc.org/15656): Deprecate and delete constructor below.
explicit CallConfig(RtcEventLog* event_log,
TaskQueueBase* network_task_queue = nullptr);
+
CallConfig(const CallConfig&);
- RtpTransportConfig ExtractTransportConfig() const;
+
~CallConfig();
+ RtpTransportConfig ExtractTransportConfig() const;
+
+ // TODO(bugs.webrtc.org/15656): Make non-optional when constructor that
+ // doesn't pass Environment is removed.
+ absl::optional<Environment> env;
+
// Bitrate config used until valid bitrate estimates are calculated. Also
// used to cap total bitrate used. This comes from the remote connection.
BitrateConstraints bitrate_config;
@@ -79,9 +92,6 @@ struct CallConfig {
Metronome* metronome = nullptr;
- // The burst interval of the pacer, see TaskQueuePacedSender constructor.
- absl::optional<TimeDelta> pacer_burst_interval;
-
// Enables send packet batching from the egress RTP sender.
bool enable_send_packet_batching = false;
};
diff --git a/third_party/libwebrtc/call/call_gn/moz.build b/third_party/libwebrtc/call/call_gn/moz.build
index 25c1961b89..20f1f973a5 100644
--- a/third_party/libwebrtc/call/call_gn/moz.build
+++ b/third_party/libwebrtc/call/call_gn/moz.build
@@ -202,7 +202,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -212,10 +211,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/call_interfaces_gn/moz.build b/third_party/libwebrtc/call/call_interfaces_gn/moz.build
index a5796666d8..a7db90d471 100644
--- a/third_party/libwebrtc/call/call_interfaces_gn/moz.build
+++ b/third_party/libwebrtc/call/call_interfaces_gn/moz.build
@@ -206,7 +206,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -216,10 +215,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/call_perf_tests.cc b/third_party/libwebrtc/call/call_perf_tests.cc
index 0ba6d05b19..e3939e1371 100644
--- a/third_party/libwebrtc/call/call_perf_tests.cc
+++ b/third_party/libwebrtc/call/call_perf_tests.cc
@@ -212,7 +212,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
metrics::Reset();
rtc::scoped_refptr<AudioDeviceModule> fake_audio_device =
TestAudioDeviceModule::Create(
- task_queue_factory_.get(),
+ &env().task_queue_factory(),
TestAudioDeviceModule::CreatePulsedNoiseCapturer(256, 48000),
TestAudioDeviceModule::CreateDiscardRenderer(48000),
audio_rtp_speed);
@@ -223,12 +223,12 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
send_audio_state_config.audio_processing =
AudioProcessingBuilder().Create();
send_audio_state_config.audio_device_module = fake_audio_device;
- CallConfig sender_config(send_event_log_.get());
+ CallConfig sender_config = SendCallConfig();
auto audio_state = AudioState::Create(send_audio_state_config);
fake_audio_device->RegisterAudioCallback(audio_state->audio_transport());
sender_config.audio_state = audio_state;
- CallConfig receiver_config(recv_event_log_.get());
+ CallConfig receiver_config = RecvCallConfig();
receiver_config.audio_state = audio_state;
CreateCalls(sender_config, receiver_config);
@@ -319,7 +319,8 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
}
EXPECT_EQ(1u, video_receive_streams_.size());
observer->set_receive_stream(video_receive_streams_[0]);
- drifting_clock = std::make_unique<DriftingClock>(clock_, video_ntp_speed);
+ drifting_clock =
+ std::make_unique<DriftingClock>(&env().clock(), video_ntp_speed);
CreateFrameGeneratorCapturerWithDrift(
drifting_clock.get(), video_rtp_speed,
test::VideoTestConstants::kDefaultFramerate,
diff --git a/third_party/libwebrtc/call/call_unittest.cc b/third_party/libwebrtc/call/call_unittest.cc
index 886a15aaf0..41394b9689 100644
--- a/third_party/libwebrtc/call/call_unittest.cc
+++ b/third_party/libwebrtc/call/call_unittest.cc
@@ -17,12 +17,11 @@
#include "absl/strings/string_view.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
+#include "api/environment/environment.h"
+#include "api/environment/environment_factory.h"
#include "api/media_types.h"
-#include "api/rtc_event_log/rtc_event_log.h"
-#include "api/task_queue/default_task_queue_factory.h"
#include "api/test/mock_audio_mixer.h"
#include "api/test/video/function_video_encoder_factory.h"
-#include "api/transport/field_trial_based_config.h"
#include "api/units/timestamp.h"
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "audio/audio_receive_stream.h"
@@ -54,7 +53,6 @@ using ::webrtc::test::RunLoop;
struct CallHelper {
explicit CallHelper(bool use_null_audio_processing) {
- task_queue_factory_ = CreateDefaultTaskQueueFactory();
AudioState::Config audio_state_config;
audio_state_config.audio_mixer = rtc::make_ref_counted<MockAudioMixer>();
audio_state_config.audio_processing =
@@ -63,10 +61,8 @@ struct CallHelper {
: rtc::make_ref_counted<NiceMock<MockAudioProcessing>>();
audio_state_config.audio_device_module =
rtc::make_ref_counted<MockAudioDeviceModule>();
- CallConfig config(&event_log_);
+ CallConfig config(CreateEnvironment());
config.audio_state = AudioState::Create(audio_state_config);
- config.task_queue_factory = task_queue_factory_.get();
- config.trials = &field_trials_;
call_ = Call::Create(config);
}
@@ -74,9 +70,6 @@ struct CallHelper {
private:
RunLoop loop_;
- RtcEventLogNull event_log_;
- FieldTrialBasedConfig field_trials_;
- std::unique_ptr<TaskQueueFactory> task_queue_factory_;
std::unique_ptr<Call> call_;
};
diff --git a/third_party/libwebrtc/call/rampup_tests.cc b/third_party/libwebrtc/call/rampup_tests.cc
index 232fe0b3fe..66553f2674 100644
--- a/third_party/libwebrtc/call/rampup_tests.cc
+++ b/third_party/libwebrtc/call/rampup_tests.cc
@@ -16,9 +16,7 @@
#include "absl/strings/string_view.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
#include "api/rtc_event_log_output_file.h"
-#include "api/task_queue/default_task_queue_factory.h"
#include "api/task_queue/task_queue_base.h"
-#include "api/task_queue/task_queue_factory.h"
#include "api/test/metrics/global_metrics_logger_and_exporter.h"
#include "api/test/metrics/metric.h"
#include "call/fake_network_pipe.h"
@@ -565,30 +563,29 @@ void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
class RampUpTest : public test::CallTest {
public:
- RampUpTest()
- : task_queue_factory_(CreateDefaultTaskQueueFactory()),
- rtc_event_log_factory_(task_queue_factory_.get()) {
+ RampUpTest() {
std::string dump_name(absl::GetFlag(FLAGS_ramp_dump_name));
if (!dump_name.empty()) {
- send_event_log_ = rtc_event_log_factory_.CreateRtcEventLog(
- RtcEventLog::EncodingType::Legacy);
- recv_event_log_ = rtc_event_log_factory_.CreateRtcEventLog(
- RtcEventLog::EncodingType::Legacy);
+ std::unique_ptr<RtcEventLog> send_event_log =
+ rtc_event_log_factory_.Create(env());
+ std::unique_ptr<RtcEventLog> recv_event_log =
+ rtc_event_log_factory_.Create(env());
bool event_log_started =
- send_event_log_->StartLogging(
+ send_event_log->StartLogging(
std::make_unique<RtcEventLogOutputFile>(
dump_name + ".send.rtc.dat", RtcEventLog::kUnlimitedOutput),
RtcEventLog::kImmediateOutput) &&
- recv_event_log_->StartLogging(
+ recv_event_log->StartLogging(
std::make_unique<RtcEventLogOutputFile>(
dump_name + ".recv.rtc.dat", RtcEventLog::kUnlimitedOutput),
RtcEventLog::kImmediateOutput);
RTC_DCHECK(event_log_started);
+ SetSendEventLog(std::move(send_event_log));
+ SetRecvEventLog(std::move(recv_event_log));
}
}
private:
- const std::unique_ptr<TaskQueueFactory> task_queue_factory_;
RtcEventLogFactory rtc_event_log_factory_;
};
diff --git a/third_party/libwebrtc/call/receive_stream_interface_gn/moz.build b/third_party/libwebrtc/call/receive_stream_interface_gn/moz.build
index 92973e6d7b..f259414835 100644
--- a/third_party/libwebrtc/call/receive_stream_interface_gn/moz.build
+++ b/third_party/libwebrtc/call/receive_stream_interface_gn/moz.build
@@ -191,16 +191,9 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
-
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/rtp_demuxer.cc b/third_party/libwebrtc/call/rtp_demuxer.cc
index 5c53f48144..f5c4186871 100644
--- a/third_party/libwebrtc/call/rtp_demuxer.cc
+++ b/third_party/libwebrtc/call/rtp_demuxer.cc
@@ -255,6 +255,19 @@ bool RtpDemuxer::RemoveSink(const RtpPacketSinkInterface* sink) {
return num_removed > 0;
}
+flat_set<uint32_t> RtpDemuxer::GetSsrcsForSink(
+ const RtpPacketSinkInterface* sink) const {
+ flat_set<uint32_t> ssrcs;
+ if (sink) {
+ for (const auto& it : sink_by_ssrc_) {
+ if (it.second == sink) {
+ ssrcs.insert(it.first);
+ }
+ }
+ }
+ return ssrcs;
+}
+
bool RtpDemuxer::OnRtpPacket(const RtpPacketReceived& packet) {
RtpPacketSinkInterface* sink = ResolveSink(packet);
if (sink != nullptr) {
diff --git a/third_party/libwebrtc/call/rtp_demuxer.h b/third_party/libwebrtc/call/rtp_demuxer.h
index 53eeb0b6b6..80427b82a7 100644
--- a/third_party/libwebrtc/call/rtp_demuxer.h
+++ b/third_party/libwebrtc/call/rtp_demuxer.h
@@ -151,6 +151,9 @@ class RtpDemuxer {
// Null pointer is not allowed.
bool RemoveSink(const RtpPacketSinkInterface* sink);
+ // Returns the set of SSRCs associated with a sink.
+ flat_set<uint32_t> GetSsrcsForSink(const RtpPacketSinkInterface* sink) const;
+
// Demuxes the given packet and forwards it to the chosen sink. Returns true
// if the packet was forwarded and false if the packet was dropped.
bool OnRtpPacket(const RtpPacketReceived& packet);
diff --git a/third_party/libwebrtc/call/rtp_interfaces_gn/moz.build b/third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
index c83031d5b5..d5223f0b8b 100644
--- a/third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
+++ b/third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
@@ -199,7 +199,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -209,10 +208,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/rtp_receiver_gn/moz.build b/third_party/libwebrtc/call/rtp_receiver_gn/moz.build
index 8809c7664f..b6b43b0afa 100644
--- a/third_party/libwebrtc/call/rtp_receiver_gn/moz.build
+++ b/third_party/libwebrtc/call/rtp_receiver_gn/moz.build
@@ -202,7 +202,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -212,10 +211,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/rtp_sender_gn/moz.build b/third_party/libwebrtc/call/rtp_sender_gn/moz.build
index 09560bbaab..54d1115417 100644
--- a/third_party/libwebrtc/call/rtp_sender_gn/moz.build
+++ b/third_party/libwebrtc/call/rtp_sender_gn/moz.build
@@ -202,7 +202,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -212,10 +211,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/rtp_transport_config.h b/third_party/libwebrtc/call/rtp_transport_config.h
index 6c94f7d911..f2030b3672 100644
--- a/third_party/libwebrtc/call/rtp_transport_config.h
+++ b/third_party/libwebrtc/call/rtp_transport_config.h
@@ -44,9 +44,6 @@ struct RtpTransportConfig {
// Key-value mapping of internal configurations to apply,
// e.g. field trials.
const FieldTrialsView* trials = nullptr;
-
- // The burst interval of the pacer, see TaskQueuePacedSender constructor.
- absl::optional<TimeDelta> pacer_burst_interval;
};
} // namespace webrtc
diff --git a/third_party/libwebrtc/call/rtp_transport_controller_send.cc b/third_party/libwebrtc/call/rtp_transport_controller_send.cc
index 556a4dd89a..8d24f7551e 100644
--- a/third_party/libwebrtc/call/rtp_transport_controller_send.cc
+++ b/third_party/libwebrtc/call/rtp_transport_controller_send.cc
@@ -80,12 +80,7 @@ RtpTransportControllerSend::RtpTransportControllerSend(
task_queue_(TaskQueueBase::Current()),
bitrate_configurator_(config.bitrate_config),
pacer_started_(false),
- pacer_(clock,
- &packet_router_,
- *config.trials,
- TimeDelta::Millis(5),
- 3,
- config.pacer_burst_interval),
+ pacer_(clock, &packet_router_, *config.trials, TimeDelta::Millis(5), 3),
observer_(nullptr),
controller_factory_override_(config.network_controller_factory),
controller_factory_fallback_(
diff --git a/third_party/libwebrtc/call/rtp_video_sender_unittest.cc b/third_party/libwebrtc/call/rtp_video_sender_unittest.cc
index cd2f1efbcf..9646a81cfd 100644
--- a/third_party/libwebrtc/call/rtp_video_sender_unittest.cc
+++ b/third_party/libwebrtc/call/rtp_video_sender_unittest.cc
@@ -1092,7 +1092,7 @@ TEST(RtpVideoSenderTest, ClearsPendingPacketsOnInactivation) {
// Set a very low bitrate.
test.router()->OnBitrateUpdated(
- CreateBitrateAllocationUpdate(/*rate_bps=*/30'000),
+ CreateBitrateAllocationUpdate(/*rate_bps=*/10'000),
/*framerate=*/30);
// Create and send a large keyframe.
@@ -1119,7 +1119,7 @@ TEST(RtpVideoSenderTest, ClearsPendingPacketsOnInactivation) {
EXPECT_FALSE(packet.Marker());
}
EXPECT_GT(transmittedPayload, DataSize::Zero());
- EXPECT_LT(transmittedPayload, DataSize::Bytes(kImageSizeBytes / 4));
+ EXPECT_LT(transmittedPayload, DataSize::Bytes(kImageSizeBytes / 3));
// Record the RTP timestamp of the first frame.
const uint32_t first_frame_timestamp = sent_packets[0].Timestamp();
diff --git a/third_party/libwebrtc/call/simulated_network.h b/third_party/libwebrtc/call/simulated_network.h
index 8597367add..02a37a3c43 100644
--- a/third_party/libwebrtc/call/simulated_network.h
+++ b/third_party/libwebrtc/call/simulated_network.h
@@ -36,7 +36,7 @@ namespace webrtc {
// - Extra delay with or without packets reorder
// - Packet overhead
// - Queue max capacity
-class SimulatedNetwork : public SimulatedNetworkInterface {
+class RTC_EXPORT SimulatedNetwork : public SimulatedNetworkInterface {
public:
using Config = BuiltInNetworkBehaviorConfig;
explicit SimulatedNetwork(Config config, uint64_t random_seed = 1);
diff --git a/third_party/libwebrtc/call/version.cc b/third_party/libwebrtc/call/version.cc
index 44c8c77156..5770253625 100644
--- a/third_party/libwebrtc/call/version.cc
+++ b/third_party/libwebrtc/call/version.cc
@@ -13,7 +13,7 @@
namespace webrtc {
// The timestamp is always in UTC.
-const char* const kSourceTimestamp = "WebRTC source stamp 2023-10-30T04:03:42";
+const char* const kSourceTimestamp = "WebRTC source stamp 2023-12-03T04:02:06";
void LoadWebRTCVersionInRegister() {
// Using volatile to instruct the compiler to not optimize `p` away even
diff --git a/third_party/libwebrtc/call/version_gn/moz.build b/third_party/libwebrtc/call/version_gn/moz.build
index e2e087a17f..28745e4fc6 100644
--- a/third_party/libwebrtc/call/version_gn/moz.build
+++ b/third_party/libwebrtc/call/version_gn/moz.build
@@ -184,7 +184,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -194,10 +193,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True
diff --git a/third_party/libwebrtc/call/video_send_stream.h b/third_party/libwebrtc/call/video_send_stream.h
index 1a0261be1b..2b4ea5b66a 100644
--- a/third_party/libwebrtc/call/video_send_stream.h
+++ b/third_party/libwebrtc/call/video_send_stream.h
@@ -113,6 +113,7 @@ class VideoSendStream {
uint64_t total_encoded_bytes_target = 0;
uint32_t frames = 0;
uint32_t frames_dropped_by_capturer = 0;
+ uint32_t frames_dropped_by_bad_timestamp = 0;
uint32_t frames_dropped_by_encoder_queue = 0;
uint32_t frames_dropped_by_rate_limiter = 0;
uint32_t frames_dropped_by_congestion_window = 0;
diff --git a/third_party/libwebrtc/call/video_stream_api_gn/moz.build b/third_party/libwebrtc/call/video_stream_api_gn/moz.build
index f2ec65de01..cf58d3748e 100644
--- a/third_party/libwebrtc/call/video_stream_api_gn/moz.build
+++ b/third_party/libwebrtc/call/video_stream_api_gn/moz.build
@@ -200,7 +200,6 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
OS_LIBS += [
- "android_support",
"unwind"
]
@@ -210,10 +209,6 @@ if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
"-msse2"
]
- OS_LIBS += [
- "android_support"
- ]
-
if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
DEFINES["_GNU_SOURCE"] = True