Don't send max allocation probe unless allocation changed.
This changes the behavior to a probe only gets trigged if
the total max allocated bitrate actually changed.
Also adding helpful log dump flag to ramp up tests that
was used to investigate the issue.
Bug: chromium:894434
Change-Id: I907675b8fd5a339f838b07d433ecf837e312def1
Reviewed-on: https://webrtc-review.googlesource.com/c/105981
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25212}
diff --git a/call/BUILD.gn b/call/BUILD.gn
index dd2d014..6699094 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -386,6 +386,7 @@
"../api/video:video_bitrate_allocation",
"../api/video_codecs:video_codecs_api",
"../logging:rtc_event_log_api",
+ "../logging:rtc_event_log_impl_output",
"../modules/audio_coding",
"../modules/audio_device",
"../modules/audio_device:audio_device_impl",
diff --git a/call/rampup_tests.cc b/call/rampup_tests.cc
index 8eb451a..115f968 100644
--- a/call/rampup_tests.cc
+++ b/call/rampup_tests.cc
@@ -11,7 +11,9 @@
#include "call/rampup_tests.h"
#include "call/fake_network_pipe.h"
+#include "logging/rtc_event_log/output/rtc_event_log_output_file.h"
#include "rtc_base/checks.h"
+#include "rtc_base/flags.h"
#include "rtc_base/logging.h"
#include "rtc_base/platform_thread.h"
#include "rtc_base/stringencode.h"
@@ -38,6 +40,8 @@
}
} // namespace
+DEFINE_string(ramp_dump_name, "", "Filename for dumped received RTP stream.");
+
RampUpTester::RampUpTester(size_t num_video_streams,
size_t num_audio_streams,
size_t num_flexfec_streams,
@@ -566,7 +570,23 @@
class RampUpTest : public test::CallTest {
public:
- RampUpTest() {}
+ RampUpTest() {
+ std::string dump_name(FLAG_ramp_dump_name);
+ if (!dump_name.empty()) {
+ send_event_log_ = RtcEventLog::Create(RtcEventLog::EncodingType::Legacy);
+ recv_event_log_ = RtcEventLog::Create(RtcEventLog::EncodingType::Legacy);
+ bool event_log_started =
+ send_event_log_->StartLogging(
+ absl::make_unique<RtcEventLogOutputFile>(
+ dump_name + ".send.rtc.dat", RtcEventLog::kUnlimitedOutput),
+ RtcEventLog::kImmediateOutput) &&
+ recv_event_log_->StartLogging(
+ absl::make_unique<RtcEventLogOutputFile>(
+ dump_name + ".recv.rtc.dat", RtcEventLog::kUnlimitedOutput),
+ RtcEventLog::kImmediateOutput);
+ RTC_DCHECK(event_log_started);
+ }
+ }
};
static const uint32_t kStartBitrateBps = 60000;
diff --git a/call/rampup_tests.h b/call/rampup_tests.h
index 3b07528..6ff7127 100644
--- a/call/rampup_tests.h
+++ b/call/rampup_tests.h
@@ -142,7 +142,7 @@
kTransitionToNextState,
};
- void ModifyReceiverCallConfig(Call::Config* config);
+ void ModifyReceiverCallConfig(Call::Config* config) override;
std::string GetModifierString() const;
int GetExpectedHighBitrate() const;
diff --git a/modules/congestion_controller/goog_cc/probe_controller.cc b/modules/congestion_controller/goog_cc/probe_controller.cc
index c2a8e02..76cb643 100644
--- a/modules/congestion_controller/goog_cc/probe_controller.cc
+++ b/modules/congestion_controller/goog_cc/probe_controller.cc
@@ -146,6 +146,7 @@
max_total_allocated_bitrate_ = max_total_allocated_bitrate;
return InitiateProbing(at_time_ms, {max_total_allocated_bitrate}, false);
}
+ max_total_allocated_bitrate_ = max_total_allocated_bitrate;
return std::vector<ProbeClusterConfig>();
}