Index: webrtc/modules/audio_coding/neteq/statistics_calculator.h |
diff --git a/webrtc/modules/audio_coding/neteq/statistics_calculator.h b/webrtc/modules/audio_coding/neteq/statistics_calculator.h |
index 3bd3e55d46e276e6092ae6c28a7604ab62f1fd34..5bb66b669736f790720ff60e5d018a19a2fd4e13 100644 |
--- a/webrtc/modules/audio_coding/neteq/statistics_calculator.h |
+++ b/webrtc/modules/audio_coding/neteq/statistics_calculator.h |
@@ -11,8 +11,8 @@ |
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_STATISTICS_CALCULATOR_H_ |
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_STATISTICS_CALCULATOR_H_ |
+#include <deque> |
#include <string> |
-#include <vector> |
#include "webrtc/base/constructormagic.h" |
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h" |
@@ -29,7 +29,7 @@ class StatisticsCalculator { |
public: |
StatisticsCalculator(); |
- virtual ~StatisticsCalculator() {} |
+ virtual ~StatisticsCalculator(); |
// Resets most of the counters. |
void Reset(); |
@@ -37,9 +37,6 @@ class StatisticsCalculator { |
// Resets the counters that are not handled by Reset(). |
void ResetMcu(); |
- // Resets the waiting time statistics. |
- void ResetWaitingTimeStatistics(); |
- |
// Reports that |num_samples| samples were produced through expansion, and |
// that the expansion produced other than just noise samples. |
void ExpandedVoiceSamples(size_t num_samples); |
@@ -91,11 +88,9 @@ class StatisticsCalculator { |
const DecisionLogic& decision_logic, |
NetEqNetworkStatistics *stats); |
- void WaitingTimes(std::vector<int>* waiting_times); |
- |
private: |
static const int kMaxReportPeriod = 60; // Seconds before auto-reset. |
- static const int kLenWaitingTimes = 100; |
+ static const size_t kLenWaitingTimes = 100; |
class PeriodicUmaLogger { |
public: |
@@ -160,9 +155,7 @@ class StatisticsCalculator { |
size_t discarded_packets_; |
size_t lost_timestamps_; |
uint32_t timestamps_since_last_report_; |
- int waiting_times_[kLenWaitingTimes]; // Used as a circular buffer. |
- int len_waiting_times_; |
- int next_waiting_time_index_; |
+ std::deque<int> waiting_times_; |
uint32_t secondary_decoded_samples_; |
PeriodicUmaCount delayed_packet_outage_counter_; |
PeriodicUmaAverage excess_buffer_delay_; |