Delete method NetEqImpl::CurrentDelayMs, used only by tests

Bug: None
Change-Id: If94695f60ed804f6b43be828dd93f02826269140
Reviewed-on: https://webrtc-review.googlesource.com/c/116687
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26193}
This commit is contained in:
Niels Möller
2019-01-09 15:49:29 +01:00
committed by Commit Bot
parent 8984cd61ca
commit f7d636644f
5 changed files with 0 additions and 27 deletions

View File

@ -204,9 +204,6 @@ class NetEq {
// requested through SetMinimumDelay.
virtual int TargetDelayMs() const = 0;
// Returns the current total delay (packet buffer and sync buffer) in ms.
virtual int CurrentDelayMs() const = 0;
// Returns the current total delay (packet buffer and sync buffer) in ms,
// with smoothing applied to even out short-time fluctuations due to jitter.
// The packet buffer part of the delay is not updated during DTX/CNG periods.

View File

@ -303,21 +303,6 @@ int NetEqImpl::TargetDelayMs() const {
rtc::CheckedDivExact(fs_hz_, 1000);
}
int NetEqImpl::CurrentDelayMs() const {
rtc::CritScope lock(&crit_sect_);
if (fs_hz_ == 0)
return 0;
// Sum up the samples in the packet buffer with the future length of the sync
// buffer, and divide the sum by the sample rate.
const size_t delay_samples =
packet_buffer_->NumSamplesInBuffer(decoder_frame_length_) +
sync_buffer_->FutureLength();
// The division below will truncate.
const int delay_ms =
static_cast<int>(delay_samples) / rtc::CheckedDivExact(fs_hz_, 1000);
return delay_ms;
}
int NetEqImpl::FilteredCurrentDelayMs() const {
rtc::CritScope lock(&crit_sect_);
// Calculate the filtered packet buffer level in samples. The value from

View File

@ -156,8 +156,6 @@ class NetEqImpl : public webrtc::NetEq {
int TargetDelayMs() const override;
int CurrentDelayMs() const override;
int FilteredCurrentDelayMs() const override;
// Writes the current network statistics to |stats|. The statistics are reset

View File

@ -220,9 +220,6 @@ class NetEqNetworkStatsTest {
CHECK_NETEQ_NETWORK_STATS(added_zero_samples);
#undef CHECK_NETEQ_NETWORK_STATS
// Compare with CurrentDelay, which should be identical.
EXPECT_EQ(stats.current_buffer_size_ms, neteq_->CurrentDelayMs());
}
void RunTest(int num_loops, NetEqNetworkStatsCheck expects) {

View File

@ -404,10 +404,6 @@ void NetEqDecodingTest::DecodeAndCompare(
ASSERT_EQ(0, neteq_->NetworkStatistics(&current_network_stats));
ASSERT_NO_FATAL_FAILURE(network_stats.AddResult(current_network_stats));
// Compare with CurrentDelay, which should be identical.
EXPECT_EQ(current_network_stats.current_buffer_size_ms,
neteq_->CurrentDelayMs());
// Verify that liftime stats and network stats report similar loss
// concealment rates.
auto lifetime_stats = neteq_->GetLifetimeStatistics();