NetEq: Simplify the dependencies of GetNetworkStatistics
Adds a new method PopulateDelayManagerStats which takes care of the fields that needed information from the DelayManager. Also adds a new test for StatisticsCalculator made practically feasible by the refactoring. Bug: webrtc:7554 Change-Id: Iff5cb5e209c276bd2784f2ccf73be8f619b1d955 Reviewed-on: https://webrtc-review.googlesource.com/3181 Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19957}
This commit is contained in:
committed by
Commit Bot
parent
13b668222a
commit
dccfc405a6
@ -374,9 +374,11 @@ int NetEqImpl::NetworkStatistics(NetEqNetworkStatistics* stats) {
|
||||
sync_buffer_->FutureLength();
|
||||
assert(delay_manager_.get());
|
||||
assert(decision_logic_.get());
|
||||
const int ms_per_packet = rtc::dchecked_cast<int>(
|
||||
decision_logic_->packet_length_samples() / (fs_hz_ / 1000));
|
||||
stats_.PopulateDelayManagerStats(ms_per_packet, *delay_manager_.get(), stats);
|
||||
stats_.GetNetworkStatistics(fs_hz_, total_samples_in_buffers,
|
||||
decoder_frame_length_, *delay_manager_.get(),
|
||||
*decision_logic_.get(), stats);
|
||||
decoder_frame_length_, stats);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user