NetEq tools: Fixing an issue with measuring the simulation time
The NetEqTest class was recently refactored. In the process, the functionality for measuring the simulation time suffered a bug. This CL fixes it. Bug: webrtc:9667 Change-Id: I139e697ede21584ef77ae23cfa8e77f6dac65b51 Reviewed-on: https://webrtc-review.googlesource.com/98982 Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24658}
This commit is contained in:

committed by
Commit Bot

parent
d934244feb
commit
9be7745509
@ -144,7 +144,8 @@ NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input_->AdvanceOutputEvent();
|
input_->AdvanceOutputEvent();
|
||||||
result.simulation_step_ms = time_now_ms - start_time_ms;
|
result.simulation_step_ms =
|
||||||
|
input_->NextEventTime().value_or(time_now_ms) - start_time_ms;
|
||||||
const auto network_stats = SimulationStats();
|
const auto network_stats = SimulationStats();
|
||||||
current_state_.current_delay_ms = network_stats.current_buffer_size_ms;
|
current_state_.current_delay_ms = network_stats.current_buffer_size_ms;
|
||||||
current_state_.packet_loss_occurred = network_stats.packet_loss_rate > 0;
|
current_state_.packet_loss_occurred = network_stats.packet_loss_rate > 0;
|
||||||
@ -167,7 +168,8 @@ NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.simulation_step_ms = time_now_ms - start_time_ms;
|
result.simulation_step_ms =
|
||||||
|
input_->NextEventTime().value_or(time_now_ms) - start_time_ms;
|
||||||
result.is_simulation_finished = true;
|
result.is_simulation_finished = true;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user