Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g" git cl format Bug: None Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30491}
This commit is contained in:
committed by
Commit Bot
parent
9b05803e19
commit
0c626afcf3
@ -39,7 +39,7 @@ void LogBasedNetworkControllerSimulation::ProcessUntil(Timestamp to_time) {
|
||||
controller_ = factory_->Create(config);
|
||||
}
|
||||
if (last_process_.IsInfinite() ||
|
||||
to_time - last_process_ > TimeDelta::seconds(1)) {
|
||||
to_time - last_process_ > TimeDelta::Seconds(1)) {
|
||||
last_process_ = to_time;
|
||||
current_time_ = to_time;
|
||||
ProcessInterval msg;
|
||||
@ -107,7 +107,7 @@ void LogBasedNetworkControllerSimulation::OnPacketSent(
|
||||
|
||||
void LogBasedNetworkControllerSimulation::OnFeedback(
|
||||
const LoggedRtcpPacketTransportFeedback& feedback) {
|
||||
auto feedback_time = Timestamp::ms(feedback.log_time_ms());
|
||||
auto feedback_time = Timestamp::Millis(feedback.log_time_ms());
|
||||
ProcessUntil(feedback_time);
|
||||
auto msg = transport_feedback_.ProcessTransportFeedback(
|
||||
feedback.transport_feedback, feedback_time);
|
||||
@ -119,7 +119,7 @@ void LogBasedNetworkControllerSimulation::OnReceiverReport(
|
||||
const LoggedRtcpPacketReceiverReport& report) {
|
||||
if (report.rr.report_blocks().empty())
|
||||
return;
|
||||
auto report_time = Timestamp::ms(report.log_time_ms());
|
||||
auto report_time = Timestamp::Millis(report.log_time_ms());
|
||||
ProcessUntil(report_time);
|
||||
int packets_delta = 0;
|
||||
int lost_delta = 0;
|
||||
@ -150,7 +150,7 @@ void LogBasedNetworkControllerSimulation::OnReceiverReport(
|
||||
CompactNtp(TimeMicrosToNtp(report.log_time_us()));
|
||||
uint32_t rtt_ntp =
|
||||
receive_time_ntp - rb.delay_since_last_sr() - rb.last_sr();
|
||||
rtt = std::min(rtt, TimeDelta::ms(CompactNtpRttToMs(rtt_ntp)));
|
||||
rtt = std::min(rtt, TimeDelta::Millis(CompactNtpRttToMs(rtt_ntp)));
|
||||
}
|
||||
}
|
||||
if (rtt.IsFinite()) {
|
||||
@ -164,7 +164,7 @@ void LogBasedNetworkControllerSimulation::OnReceiverReport(
|
||||
void LogBasedNetworkControllerSimulation::OnIceConfig(
|
||||
const LoggedIceCandidatePairConfig& candidate) {
|
||||
if (candidate.type == IceCandidatePairConfigType::kSelected) {
|
||||
auto log_time = Timestamp::us(candidate.log_time_us());
|
||||
auto log_time = Timestamp::Micros(candidate.log_time_us());
|
||||
ProcessUntil(log_time);
|
||||
NetworkRouteChange msg;
|
||||
msg.at_time = log_time;
|
||||
|
||||
Reference in New Issue
Block a user