Change expectation of GoogCCNetworkController::OnNetworkAvailability
Expect OnNetworkAvailabability to be invoked when the transport becomes writable.
Before this change, ProbeController in GoogCC was expected to be created when the transport is writable or explicitly notifed after creation that network is not writable.
Bug: None
Change-Id: I623b1c34e40a82e912f85b92fea49629e7e72d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323463
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40975}
diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc
index dc1d371..556a4dd 100644
--- a/call/rtp_transport_controller_send.cc
+++ b/call/rtp_transport_controller_send.cc
@@ -343,12 +343,13 @@
is_congested_ = false;
pacer_.SetCongested(false);
+ if (!controller_) {
+ MaybeCreateControllers();
+ }
if (controller_) {
control_handler_->SetNetworkAvailability(network_available);
PostUpdates(controller_->OnNetworkAvailability(msg));
UpdateControlState();
- } else {
- MaybeCreateControllers();
}
for (auto& rtp_sender : video_rtp_senders_) {
rtp_sender->OnNetworkAvailability(network_available);
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
index 025ab94..c97d34d 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
@@ -290,12 +290,15 @@
GoogCcNetworkControllerFactory factory_;
};
-TEST(GoogCcNetworkControllerTest, InitializeTargetRateOnFirstProcessInterval) {
+TEST(GoogCcNetworkControllerTest,
+ InitializeTargetRateOnFirstProcessIntervalAfterNetworkAvailable) {
NetworkControllerTestFixture fixture;
std::unique_ptr<NetworkControllerInterface> controller =
fixture.CreateController();
- NetworkControlUpdate update =
+ NetworkControlUpdate update = controller->OnNetworkAvailability(
+ {.at_time = Timestamp::Millis(123456), .network_available = true});
+ update =
controller->OnProcessInterval({.at_time = Timestamp::Millis(123456)});
EXPECT_EQ(update.target_rate->target_rate, kInitialBitrate);
@@ -312,8 +315,9 @@
std::unique_ptr<NetworkControllerInterface> controller =
fixture.CreateController();
Timestamp current_time = Timestamp::Millis(123);
- NetworkControlUpdate update =
- controller->OnProcessInterval({.at_time = current_time});
+ NetworkControlUpdate update = controller->OnNetworkAvailability(
+ {.at_time = current_time, .network_available = true});
+ update = controller->OnProcessInterval({.at_time = current_time});
update = controller->OnRemoteBitrateReport(
{.receive_time = current_time, .bandwidth = kInitialBitrate * 2});
@@ -337,8 +341,11 @@
std::unique_ptr<NetworkControllerInterface> controller =
fixture.CreateController();
Timestamp current_time = Timestamp::Millis(123);
+ NetworkControlUpdate update = controller->OnNetworkAvailability(
+ {.at_time = current_time, .network_available = true});
DataRate new_bitrate = DataRate::BitsPerSec(200000);
- NetworkControlUpdate update = controller->OnNetworkRouteChange(
+
+ update = controller->OnNetworkRouteChange(
CreateRouteChange(current_time, new_bitrate));
EXPECT_EQ(update.target_rate->target_rate, new_bitrate);
EXPECT_EQ(update.pacer_config->data_rate(), new_bitrate * kDefaultPacingRate);
@@ -359,7 +366,11 @@
std::unique_ptr<NetworkControllerInterface> controller =
fixture.CreateController();
Timestamp current_time = Timestamp::Millis(123);
- NetworkControlUpdate update = controller->OnNetworkRouteChange(
+ NetworkControlUpdate update = controller->OnNetworkAvailability(
+ {.at_time = current_time, .network_available = true});
+ current_time += TimeDelta::Seconds(3);
+
+ update = controller->OnNetworkRouteChange(
CreateRouteChange(current_time, 2 * kInitialBitrate, DataRate::Zero(),
20 * kInitialBitrate));
@@ -404,6 +415,8 @@
fixture.CreateController();
const int64_t kRunTimeMs = 6000;
Timestamp current_time = Timestamp::Millis(123);
+ NetworkControlUpdate update = controller->OnNetworkAvailability(
+ {.at_time = current_time, .network_available = true});
// The test must run and insert packets/feedback long enough that the
// BWE computes a valid estimate. This is first done in an environment which
@@ -428,8 +441,9 @@
std::unique_ptr<NetworkControllerInterface> controller =
fixture.CreateController();
Timestamp current_time = Timestamp::Millis(123);
- NetworkControlUpdate update =
- controller->OnProcessInterval({.at_time = current_time});
+ NetworkControlUpdate update = controller->OnNetworkAvailability(
+ {.at_time = current_time, .network_available = true});
+ update = controller->OnProcessInterval({.at_time = current_time});
current_time += TimeDelta::Millis(100);
NetworkStateEstimate network_estimate = {.link_capacity_lower =
10 * kInitialBitrate};
diff --git a/modules/congestion_controller/goog_cc/probe_controller.cc b/modules/congestion_controller/goog_cc/probe_controller.cc
index f0211d7..32b1b93 100644
--- a/modules/congestion_controller/goog_cc/probe_controller.cc
+++ b/modules/congestion_controller/goog_cc/probe_controller.cc
@@ -150,7 +150,7 @@
ProbeController::ProbeController(const FieldTrialsView* key_value_config,
RtcEventLog* event_log)
- : network_available_(true),
+ : network_available_(false),
enable_periodic_alr_probing_(false),
in_rapid_recovery_experiment_(absl::StartsWith(
key_value_config->Lookup(kBweRapidRecoveryExperiment),
diff --git a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
index 87c48ff..94025b3 100644
--- a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
+++ b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
@@ -60,13 +60,28 @@
NiceMock<MockRtcEventLog> mock_rtc_event_log;
};
-TEST(ProbeControllerTest, InitiatesProbingAtStart) {
+TEST(ProbeControllerTest, InitiatesProbingAfterSetBitrates) {
+ ProbeControllerFixture fixture;
+ std::unique_ptr<ProbeController> probe_controller =
+ fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
+
+ auto probes = probe_controller->SetBitrates(
+ kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
+ EXPECT_GE(probes.size(), 2u);
+}
+
+TEST(ProbeControllerTest, InitiatesProbingWhenNetworkAvailable) {
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
- auto probes = probe_controller->SetBitrates(
+ std::vector<ProbeClusterConfig> probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
+ EXPECT_THAT(probes, IsEmpty());
+ probes = probe_controller->OnNetworkAvailability({.network_available = true});
EXPECT_GE(probes.size(), 2u);
}
@@ -74,6 +89,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
std::vector<ProbeClusterConfig> probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
ASSERT_GE(probes.size(), 2u);
@@ -89,6 +107,9 @@
"min_probe_packets_sent:2,min_probe_duration:123ms/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
std::vector<ProbeClusterConfig> probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
ASSERT_GE(probes.size(), 2u);
@@ -115,6 +136,9 @@
ProbeControllerFixture fixture("WebRTC-Bwe-ProbingConfiguration/p1:2,p2:3/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
EXPECT_EQ(probes.size(), 2u);
@@ -126,6 +150,9 @@
ProbeControllerFixture fixture("WebRTC-Bwe-ProbingConfiguration/p1:2,p2:0/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
EXPECT_EQ(probes.size(), 1u);
@@ -136,6 +163,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
// Long enough to time out exponential probing.
@@ -155,6 +185,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
probes = probe_controller->SetEstimatedBitrate(
@@ -186,7 +219,9 @@
"probe_max_allocation:false/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
-
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
probes = probe_controller->SetEstimatedBitrate(
@@ -208,6 +243,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
// Long enough to time out exponential probing.
@@ -231,6 +269,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -252,6 +293,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
// Advance far enough to cause a time out in waiting for probing result.
@@ -268,6 +312,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
EXPECT_GE(probes.size(), 2u);
@@ -291,6 +338,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
EXPECT_EQ(probes.size(), 2u);
@@ -316,6 +366,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
EXPECT_EQ(probes.size(), 2u);
@@ -339,6 +392,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
EXPECT_EQ(probes.size(), 2u);
@@ -361,6 +417,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
probe_controller->EnablePeriodicAlrProbing(true);
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -405,6 +464,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
Timestamp alr_start_time = fixture.CurrentTime();
probe_controller->SetAlrStartTimeMs(alr_start_time.ms());
@@ -463,6 +525,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
const DataRate kMbpsMultiplier = DataRate::KilobitsPerSec(1000);
auto probes = probe_controller->SetBitrates(kMinBitrate, 10 * kMbpsMultiplier,
100 * kMbpsMultiplier,
@@ -484,6 +549,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
const DataRate kMbpsMultiplier = DataRate::KilobitsPerSec(1000);
const DataRate kMaxBitrate = 100 * kMbpsMultiplier;
auto probes = probe_controller->SetBitrates(
@@ -529,6 +597,9 @@
"alloc_p1:2,alloc_p2,min_probe_packets_sent:2/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(kMinBitrate, kStartBitrate,
DataRate::KilobitsPerSec(5000),
@@ -566,6 +637,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
probe_controller->EnablePeriodicAlrProbing(true);
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -600,6 +674,9 @@
"WebRTC-Bwe-ProbingConfiguration/network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -628,6 +705,9 @@
"network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -657,6 +737,9 @@
"WebRTC-Bwe-ProbingConfiguration/network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
probe_controller->EnablePeriodicAlrProbing(true);
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -685,6 +768,9 @@
"network_state_interval:5s,network_state_probe_duration:100ms/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -707,6 +793,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
probe_controller->EnablePeriodicAlrProbing(true);
@@ -731,6 +820,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
probe_controller->EnablePeriodicAlrProbing(true);
@@ -761,6 +853,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
probe_controller->EnablePeriodicAlrProbing(true);
@@ -784,6 +879,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
probe_controller->EnablePeriodicAlrProbing(true);
@@ -808,6 +906,9 @@
"network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -845,6 +946,9 @@
"target_rate_to_loss_bwe:true/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -889,6 +993,9 @@
"network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -919,6 +1026,9 @@
"network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -951,6 +1061,9 @@
"network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
ASSERT_FALSE(probes.empty());
@@ -989,6 +1102,9 @@
"skip_if_est_larger_than_fraction_of_max:0.9/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
probe_controller->EnablePeriodicAlrProbing(true);
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -1017,6 +1133,9 @@
"skip_if_est_larger_than_fraction_of_max:1.0/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
probe_controller->EnablePeriodicAlrProbing(true);
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -1047,6 +1166,9 @@
"network_state_interval:2s,skip_if_est_larger_than_fraction_of_max:0.9/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
ASSERT_FALSE(probes.empty());
@@ -1070,6 +1192,9 @@
"/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
ASSERT_FALSE(probes.empty());
@@ -1100,6 +1225,9 @@
"network_state_interval:5s/");
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
probe_controller->EnablePeriodicAlrProbing(true);
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -1126,6 +1254,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
@@ -1153,6 +1284,9 @@
ProbeControllerFixture fixture;
std::unique_ptr<ProbeController> probe_controller =
fixture.CreateController();
+ ASSERT_THAT(
+ probe_controller->OnNetworkAvailability({.network_available = true}),
+ IsEmpty());
auto probes = probe_controller->SetBitrates(
kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime());
diff --git a/modules/congestion_controller/rtp/control_handler.cc b/modules/congestion_controller/rtp/control_handler.cc
index ffa373a..da6451c 100644
--- a/modules/congestion_controller/rtp/control_handler.cc
+++ b/modules/congestion_controller/rtp/control_handler.cc
@@ -30,9 +30,7 @@
} // namespace
CongestionControlHandler::CongestionControlHandler()
- : disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) {
- sequenced_checker_.Detach();
-}
+ : disable_pacer_emergency_stop_(IsPacerEmergencyStopDisabled()) {}
CongestionControlHandler::~CongestionControlHandler() {}