| 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 513322f882525c712d073c871181a56822778cfb..c27aabe1281b757926df125dbc4abf85c86907ee 100644
|
| --- a/webrtc/modules/audio_coding/neteq/statistics_calculator.h
|
| +++ b/webrtc/modules/audio_coding/neteq/statistics_calculator.h
|
| @@ -64,7 +64,8 @@ class StatisticsCalculator {
|
| void LostSamples(int num_samples);
|
|
|
| // Increases the report interval counter with |num_samples| at a sample rate
|
| - // of |fs_hz|.
|
| + // of |fs_hz|. This is how the StatisticsCalculator gets notified that current
|
| + // time is increasing.
|
| void IncreaseCounter(int num_samples, int fs_hz);
|
|
|
| // Stores new packet waiting time in waiting time statistics.
|
| @@ -95,6 +96,23 @@ class StatisticsCalculator {
|
| static const int kMaxReportPeriod = 60; // Seconds before auto-reset.
|
| static const int kLenWaitingTimes = 100;
|
|
|
| + class DelayedPacketOutagesPerMinuteCounter {
|
| + public:
|
| + ~DelayedPacketOutagesPerMinuteCounter() {
|
| + LogToUma(); // Log the count for the current (incomplete) interval.
|
| + }
|
| + void RegisterEvent();
|
| + void AdvanceClock(int step_ms);
|
| +
|
| + private:
|
| + static const int kReportIntervalMs = 60 * 1000; // One minute.
|
| +
|
| + void LogToUma() const;
|
| +
|
| + int counter_ = 0;
|
| + int timer_ = 0;
|
| + };
|
| +
|
| // Calculates numerator / denominator, and returns the value in Q14.
|
| static uint16_t CalculateQ14Ratio(uint32_t numerator, uint32_t denominator);
|
|
|
| @@ -110,6 +128,7 @@ class StatisticsCalculator {
|
| int len_waiting_times_;
|
| int next_waiting_time_index_;
|
| uint32_t secondary_decoded_samples_;
|
| + DelayedPacketOutagesPerMinuteCounter delayed_packet_outage_counter_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(StatisticsCalculator);
|
| };
|
|
|