Skip to content

Commit 2db5fc0

Browse files
jonexCommit Bot
authored andcommitted
Deprecating injection of event log into GoogCC factory.
Bug: webrtc:9883 Change-Id: I6087b4a0a2c934e6a9ab435fffaf2eb1fc2a29e4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134644 Reviewed-by: Björn Terelius <[email protected]> Commit-Queue: Sebastian Jansson <[email protected]> Cr-Commit-Position: refs/heads/master@{#27824}
1 parent d9c2d94 commit 2db5fc0

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

api/transport/goog_cc_factory.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ struct GoogCcFactoryConfig {
2929
class GoogCcNetworkControllerFactory
3030
: public NetworkControllerFactoryInterface {
3131
public:
32-
explicit GoogCcNetworkControllerFactory(RtcEventLog* event_log);
32+
GoogCcNetworkControllerFactory() = default;
33+
explicit RTC_DEPRECATED GoogCcNetworkControllerFactory(
34+
RtcEventLog* event_log);
3335
explicit GoogCcNetworkControllerFactory(
3436
NetworkStatePredictorFactoryInterface* network_state_predictor_factory);
3537

modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void UpdatesTargetRateBasedOnLinkCapacity(std::string test_name = "") {
112112
class GoogCcNetworkControllerTest : public ::testing::Test {
113113
protected:
114114
GoogCcNetworkControllerTest()
115-
: current_time_(Timestamp::ms(123456)), factory_(&event_log_) {}
115+
: current_time_(Timestamp::ms(123456)), factory_() {}
116116
~GoogCcNetworkControllerTest() override {}
117117

118118
void SetUp() override {
@@ -144,6 +144,7 @@ class GoogCcNetworkControllerTest : public ::testing::Test {
144144
config.constraints.min_data_rate = DataRate::kbps(min_data_rate_kbps);
145145
config.constraints.max_data_rate = DataRate::kbps(max_data_rate_kbps);
146146
config.constraints.starting_rate = DataRate::kbps(starting_bandwidth_kbps);
147+
config.event_log = &event_log_;
147148
return config;
148149
}
149150
ProcessInterval DefaultInterval() {

rtc_tools/event_log_visualizer/analyzer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,8 @@ void EventLogAnalyzer::CreateGoogCcSimulationGraph(Plot* plot) {
11661166
TimeSeries probe_results("Logged probe success", LineStyle::kNone,
11671167
PointStyle::kHighlight);
11681168

1169-
RtcEventLogNullImpl null_event_log;
11701169
LogBasedNetworkControllerSimulation simulation(
1171-
absl::make_unique<GoogCcNetworkControllerFactory>(&null_event_log),
1170+
absl::make_unique<GoogCcNetworkControllerFactory>(),
11721171
[&](const NetworkControlUpdate& update, Timestamp at_time) {
11731172
if (update.target_rate) {
11741173
target_rates.points.emplace_back(
@@ -1222,13 +1221,14 @@ void EventLogAnalyzer::CreateSendSideBweSimulationGraph(Plot* plot) {
12221221
PacketRouter packet_router;
12231222
PacedSender pacer(&clock, &packet_router, &null_event_log);
12241223
TransportFeedbackAdapter transport_feedback;
1225-
auto factory = GoogCcNetworkControllerFactory(&null_event_log);
1224+
auto factory = GoogCcNetworkControllerFactory();
12261225
TimeDelta process_interval = factory.GetProcessInterval();
12271226
// TODO(holmer): Log the call config and use that here instead.
12281227
static const uint32_t kDefaultStartBitrateBps = 300000;
12291228
NetworkControllerConfig cc_config;
12301229
cc_config.constraints.at_time = Timestamp::us(clock.TimeInMicroseconds());
12311230
cc_config.constraints.starting_rate = DataRate::bps(kDefaultStartBitrateBps);
1231+
cc_config.event_log = &null_event_log;
12321232
auto goog_cc = factory.Create(cc_config);
12331233

12341234
TimeSeries time_series("Delay-based estimate", LineStyle::kStep,

rtc_tools/event_log_visualizer/log_simulation.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ void LogBasedNetworkControllerSimulation::ProcessUntil(Timestamp to_time) {
3535
config.constraints.at_time = to_time;
3636
config.constraints.min_data_rate = DataRate::kbps(30);
3737
config.constraints.starting_rate = DataRate::kbps(300);
38+
config.event_log = &null_event_log_;
3839
controller_ = factory_->Create(config);
3940
}
4041
if (last_process_.IsInfinite() ||

rtc_tools/event_log_visualizer/log_simulation.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class LogBasedNetworkControllerSimulation {
4545
void OnFeedback(const LoggedRtcpPacketTransportFeedback& feedback);
4646
void OnReceiverReport(const LoggedRtcpPacketReceiverReport& report);
4747
void OnIceConfig(const LoggedIceCandidatePairConfig& candidate);
48+
RtcEventLogNullImpl null_event_log_;
4849

4950
const std::function<void(const NetworkControlUpdate&, Timestamp)>
5051
update_handler_;

0 commit comments

Comments
 (0)