Delete unused method AudioCodingModule::GetDecodingCallStatistics

Bug: None
Change-Id: I2804e241251d2faa421169085cd3f63972cc395f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151123
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29060}
diff --git a/modules/audio_coding/acm2/acm_receiver_unittest.cc b/modules/audio_coding/acm2/acm_receiver_unittest.cc
index 5d40fc1..175d11f 100644
--- a/modules/audio_coding/acm2/acm_receiver_unittest.cc
+++ b/modules/audio_coding/acm2/acm_receiver_unittest.cc
@@ -371,6 +371,92 @@
 }
 #endif
 
+// Check if the statistics are initialized correctly. Before any call to ACM
+// all fields have to be zero.
+#if defined(WEBRTC_ANDROID)
+#define MAYBE_InitializedToZero DISABLED_InitializedToZero
+#else
+#define MAYBE_InitializedToZero InitializedToZero
+#endif
+TEST_F(AcmReceiverTestOldApi, MAYBE_InitializedToZero) {
+  AudioDecodingCallStats stats;
+  receiver_->GetDecodingCallStatistics(&stats);
+  EXPECT_EQ(0, stats.calls_to_neteq);
+  EXPECT_EQ(0, stats.calls_to_silence_generator);
+  EXPECT_EQ(0, stats.decoded_normal);
+  EXPECT_EQ(0, stats.decoded_cng);
+  EXPECT_EQ(0, stats.decoded_neteq_plc);
+  EXPECT_EQ(0, stats.decoded_plc_cng);
+  EXPECT_EQ(0, stats.decoded_muted_output);
+}
+
+// Insert some packets and pull audio. Check statistics are valid. Then,
+// simulate packet loss and check if PLC and PLC-to-CNG statistics are
+// correctly updated.
+#if defined(WEBRTC_ANDROID)
+#define MAYBE_NetEqCalls DISABLED_NetEqCalls
+#else
+#define MAYBE_NetEqCalls NetEqCalls
+#endif
+TEST_F(AcmReceiverTestOldApi, MAYBE_NetEqCalls) {
+  AudioDecodingCallStats stats;
+  const int kNumNormalCalls = 10;
+  const int kSampleRateHz = 16000;
+  const int kNumSamples10ms = kSampleRateHz / 100;
+  const int kFrameSizeMs = 10;  // Multiple of 10.
+  const int kFrameSizeSamples = kFrameSizeMs / 10 * kNumSamples10ms;
+  const int kPayloadSizeBytes = kFrameSizeSamples * sizeof(int16_t);
+  const uint8_t kPayloadType = 111;
+  RTPHeader rtp_header;
+  AudioFrame audio_frame;
+  bool muted;
+
+  receiver_->SetCodecs(
+      {{kPayloadType, SdpAudioFormat("L16", kSampleRateHz, 1)}});
+  rtp_header.sequenceNumber = 0xABCD;
+  rtp_header.timestamp = 0xABCDEF01;
+  rtp_header.payloadType = kPayloadType;
+  rtp_header.markerBit = false;
+  rtp_header.ssrc = 0x1234;
+  rtp_header.numCSRCs = 0;
+  rtp_header.payload_type_frequency = kSampleRateHz;
+
+  for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) {
+    const uint8_t kPayload[kPayloadSizeBytes] = {0};
+    ASSERT_EQ(0, receiver_->InsertPacket(rtp_header, kPayload));
+    ++rtp_header.sequenceNumber;
+    rtp_header.timestamp += kFrameSizeSamples;
+    ASSERT_EQ(0, receiver_->GetAudio(-1, &audio_frame, &muted));
+    EXPECT_FALSE(muted);
+  }
+  receiver_->GetDecodingCallStatistics(&stats);
+  EXPECT_EQ(kNumNormalCalls, stats.calls_to_neteq);
+  EXPECT_EQ(0, stats.calls_to_silence_generator);
+  EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
+  EXPECT_EQ(0, stats.decoded_cng);
+  EXPECT_EQ(0, stats.decoded_neteq_plc);
+  EXPECT_EQ(0, stats.decoded_plc_cng);
+  EXPECT_EQ(0, stats.decoded_muted_output);
+
+  const int kNumPlc = 3;
+  const int kNumPlcCng = 5;
+
+  // Simulate packet-loss. NetEq first performs PLC then PLC fades to CNG.
+  for (int n = 0; n < kNumPlc + kNumPlcCng; ++n) {
+    ASSERT_EQ(0, receiver_->GetAudio(-1, &audio_frame, &muted));
+    EXPECT_FALSE(muted);
+  }
+  receiver_->GetDecodingCallStatistics(&stats);
+  EXPECT_EQ(kNumNormalCalls + kNumPlc + kNumPlcCng, stats.calls_to_neteq);
+  EXPECT_EQ(0, stats.calls_to_silence_generator);
+  EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
+  EXPECT_EQ(0, stats.decoded_cng);
+  EXPECT_EQ(kNumPlc, stats.decoded_neteq_plc);
+  EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
+  EXPECT_EQ(0, stats.decoded_muted_output);
+  // TODO(henrik.lundin) Add a test with muted state enabled.
+}
+
 }  // namespace acm2
 
 }  // namespace webrtc
diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc
index ef2e0e5..a6f6718 100644
--- a/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/modules/audio_coding/acm2/audio_coding_module.cc
@@ -93,8 +93,6 @@
 
   int GetNetworkStatistics(NetworkStatistics* statistics) override;
 
-  void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const override;
-
   ANAStats GetANAStats() const override;
 
  private:
@@ -635,11 +633,6 @@
   return true;
 }
 
-void AudioCodingModuleImpl::GetDecodingCallStatistics(
-    AudioDecodingCallStats* call_stats) const {
-  receiver_.GetDecodingCallStatistics(call_stats);
-}
-
 ANAStats AudioCodingModuleImpl::GetANAStats() const {
   rtc::CritScope lock(&acm_crit_sect_);
   if (encoder_stack_)
diff --git a/modules/audio_coding/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
index d029c60..b0dd90c 100644
--- a/modules/audio_coding/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
@@ -251,69 +251,6 @@
   Clock* clock_;
 };
 
-// Check if the statistics are initialized correctly. Before any call to ACM
-// all fields have to be zero.
-#if defined(WEBRTC_ANDROID)
-#define MAYBE_InitializedToZero DISABLED_InitializedToZero
-#else
-#define MAYBE_InitializedToZero InitializedToZero
-#endif
-TEST_F(AudioCodingModuleTestOldApi, MAYBE_InitializedToZero) {
-  RegisterCodec();
-  AudioDecodingCallStats stats;
-  acm_->GetDecodingCallStatistics(&stats);
-  EXPECT_EQ(0, stats.calls_to_neteq);
-  EXPECT_EQ(0, stats.calls_to_silence_generator);
-  EXPECT_EQ(0, stats.decoded_normal);
-  EXPECT_EQ(0, stats.decoded_cng);
-  EXPECT_EQ(0, stats.decoded_neteq_plc);
-  EXPECT_EQ(0, stats.decoded_plc_cng);
-  EXPECT_EQ(0, stats.decoded_muted_output);
-}
-
-// Insert some packets and pull audio. Check statistics are valid. Then,
-// simulate packet loss and check if PLC and PLC-to-CNG statistics are
-// correctly updated.
-#if defined(WEBRTC_ANDROID)
-#define MAYBE_NetEqCalls DISABLED_NetEqCalls
-#else
-#define MAYBE_NetEqCalls NetEqCalls
-#endif
-TEST_F(AudioCodingModuleTestOldApi, MAYBE_NetEqCalls) {
-  RegisterCodec();
-  AudioDecodingCallStats stats;
-  const int kNumNormalCalls = 10;
-
-  for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) {
-    InsertPacketAndPullAudio();
-  }
-  acm_->GetDecodingCallStatistics(&stats);
-  EXPECT_EQ(kNumNormalCalls, stats.calls_to_neteq);
-  EXPECT_EQ(0, stats.calls_to_silence_generator);
-  EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
-  EXPECT_EQ(0, stats.decoded_cng);
-  EXPECT_EQ(0, stats.decoded_neteq_plc);
-  EXPECT_EQ(0, stats.decoded_plc_cng);
-  EXPECT_EQ(0, stats.decoded_muted_output);
-
-  const int kNumPlc = 3;
-  const int kNumPlcCng = 5;
-
-  // Simulate packet-loss. NetEq first performs PLC then PLC fades to CNG.
-  for (int n = 0; n < kNumPlc + kNumPlcCng; ++n) {
-    PullAudio();
-  }
-  acm_->GetDecodingCallStatistics(&stats);
-  EXPECT_EQ(kNumNormalCalls + kNumPlc + kNumPlcCng, stats.calls_to_neteq);
-  EXPECT_EQ(0, stats.calls_to_silence_generator);
-  EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
-  EXPECT_EQ(0, stats.decoded_cng);
-  EXPECT_EQ(kNumPlc, stats.decoded_neteq_plc);
-  EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
-  EXPECT_EQ(0, stats.decoded_muted_output);
-  // TODO(henrik.lundin) Add a test with muted state enabled.
-}
-
 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) {
   AudioFrame audio_frame;
   const int kSampleRateHz = 32000;
diff --git a/modules/audio_coding/include/audio_coding_module.h b/modules/audio_coding/include/audio_coding_module.h
index df91c0b..da8ffb5 100644
--- a/modules/audio_coding/include/audio_coding_module.h
+++ b/modules/audio_coding/include/audio_coding_module.h
@@ -250,9 +250,6 @@
   virtual int32_t GetNetworkStatistics(
       NetworkStatistics* network_statistics) = 0;
 
-  virtual void GetDecodingCallStatistics(
-      AudioDecodingCallStats* call_stats) const = 0;
-
   virtual ANAStats GetANAStats() const = 0;
 };