Revert "Remove sync buffer length from FilteredCurrentDelayMs."
This reverts commit 79890ef91faaf5d26a04083e97a3cb1218677ab0. Reason for revert: the sync buffer was actually not counted when the buffer level filter was updated since the value was rounded down to the closest whole packet. Original change's description: > Remove sync buffer length from FilteredCurrentDelayMs. > > The sync buffer length is already added when the buffer level filter is updated. > > Bug: webrtc:10736 > Change-Id: Icbd411d4fd7b16f31b800142d1b6a8de79365d91 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140950 > Reviewed-by: Minyue Li <minyue@webrtc.org> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#28261} TBR=minyue@webrtc.org,jakobi@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:10736 Change-Id: Ibf4ce566484ff01421b186e03fe97fe633ba066d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143167 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28335}
This commit is contained in:
committed by
Commit Bot
parent
a550dad57a
commit
d487a558ef
@ -316,9 +316,12 @@ int NetEqImpl::FilteredCurrentDelayMs() const {
|
||||
(buffer_level_filter_->filtered_current_level() *
|
||||
decoder_frame_length_) >>
|
||||
8;
|
||||
// Sum up the filtered packet buffer level with the future length of the sync
|
||||
// buffer, and divide the sum by the sample rate.
|
||||
const size_t delay_samples =
|
||||
packet_buffer_samples + sync_buffer_->FutureLength();
|
||||
// The division below will truncate. The return value is in ms.
|
||||
return static_cast<int>(packet_buffer_samples) /
|
||||
rtc::CheckedDivExact(fs_hz_, 1000);
|
||||
return static_cast<int>(delay_samples) / rtc::CheckedDivExact(fs_hz_, 1000);
|
||||
}
|
||||
|
||||
int NetEqImpl::NetworkStatistics(NetEqNetworkStatistics* stats) {
|
||||
|
||||
Reference in New Issue
Block a user