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}
diff --git a/modules/audio_coding/neteq/include/neteq.h b/modules/audio_coding/neteq/include/neteq.h
index 70bedfb..eddcbb2 100644
--- a/modules/audio_coding/neteq/include/neteq.h
+++ b/modules/audio_coding/neteq/include/neteq.h
@@ -204,9 +204,6 @@
// 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.
diff --git a/modules/audio_coding/neteq/neteq_impl.cc b/modules/audio_coding/neteq/neteq_impl.cc
index 00c9172..fd6a544 100644
--- a/modules/audio_coding/neteq/neteq_impl.cc
+++ b/modules/audio_coding/neteq/neteq_impl.cc
@@ -303,21 +303,6 @@
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
diff --git a/modules/audio_coding/neteq/neteq_impl.h b/modules/audio_coding/neteq/neteq_impl.h
index e695c6f..b1af537 100644
--- a/modules/audio_coding/neteq/neteq_impl.h
+++ b/modules/audio_coding/neteq/neteq_impl.h
@@ -156,8 +156,6 @@
int TargetDelayMs() const override;
- int CurrentDelayMs() const override;
-
int FilteredCurrentDelayMs() const override;
// Writes the current network statistics to |stats|. The statistics are reset
diff --git a/modules/audio_coding/neteq/neteq_network_stats_unittest.cc b/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
index d052168..72a75d1 100644
--- a/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_network_stats_unittest.cc
@@ -220,9 +220,6 @@
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) {
diff --git a/modules/audio_coding/neteq/neteq_unittest.cc b/modules/audio_coding/neteq/neteq_unittest.cc
index d45877a..2757b02 100644
--- a/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/modules/audio_coding/neteq/neteq_unittest.cc
@@ -404,10 +404,6 @@
ASSERT_EQ(0, neteq_->NetworkStatistics(¤t_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();