diff --git a/call/BUILD.gn b/call/BUILD.gn index dd2d014b84..66990946bb 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -386,6 +386,7 @@ if (rtc_include_tests) { "../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 8eb451ac04..115f968c7a 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 @@ std::vector GenerateSsrcs(size_t num_streams, uint32_t ssrc_offset) { } } // 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 @@ void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) { 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( + dump_name + ".send.rtc.dat", RtcEventLog::kUnlimitedOutput), + RtcEventLog::kImmediateOutput) && + recv_event_log_->StartLogging( + absl::make_unique( + 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 3b07528fb9..6ff712703e 100644 --- a/call/rampup_tests.h +++ b/call/rampup_tests.h @@ -142,7 +142,7 @@ class RampUpDownUpTester : public RampUpTester { 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 c2a8e023d7..76cb64338c 100644 --- a/modules/congestion_controller/goog_cc/probe_controller.cc +++ b/modules/congestion_controller/goog_cc/probe_controller.cc @@ -146,6 +146,7 @@ std::vector ProbeController::OnMaxTotalAllocatedBitrate( 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(); }