NetEq/ACM: Refactor how packet waiting times are calculated

With this change, the aggregates for packet waiting times are
calculated in NetEq's StatisticsCalculator insead of in
AcmReceiver. This simplifies things somewhat, and avoids having to
copy the raw data on polling.

R=ivoc@webrtc.org, minyue@webrtc.org

Review URL: https://codereview.webrtc.org/1296633002 .

Cr-Commit-Position: refs/heads/master@{#9778}
diff --git a/webrtc/modules/audio_coding/neteq/interface/neteq.h b/webrtc/modules/audio_coding/neteq/interface/neteq.h
index 865a8b3..e2ea00d 100644
--- a/webrtc/modules/audio_coding/neteq/interface/neteq.h
+++ b/webrtc/modules/audio_coding/neteq/interface/neteq.h
@@ -14,7 +14,6 @@
 #include <string.h>  // Provide access to size_t.
 
 #include <string>
-#include <vector>
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/common_types.h"
@@ -46,6 +45,12 @@
   int32_t clockdrift_ppm;  // Average clock-drift in parts-per-million
                            // (positive or negative).
   size_t added_zero_samples;  // Number of zero samples added in "off" mode.
+  // Statistics for packet waiting times, i.e., the time between a packet
+  // arrives until it is decoded.
+  int mean_waiting_time_ms;
+  int median_waiting_time_ms;
+  int min_waiting_time_ms;
+  int max_waiting_time_ms;
 };
 
 enum NetEqOutputType {
@@ -227,11 +232,6 @@
   // after the call.
   virtual int NetworkStatistics(NetEqNetworkStatistics* stats) = 0;
 
-  // Writes the last packet waiting times (in ms) to |waiting_times|. The number
-  // of values written is no more than 100, but may be smaller if the interface
-  // is polled again before 100 packets has arrived.
-  virtual void WaitingTimes(std::vector<int>* waiting_times) = 0;
-
   // Writes the current RTCP statistics to |stats|. The statistics are reset
   // and a new report period is started with the call.
   virtual void GetRtcpStatistics(RtcpStatistics* stats) = 0;