Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1173)

Unified Diff: webrtc/modules/audio_coding/neteq/statistics_calculator.h

Issue 1284303003: NetEq: Implement Average Excess Buffer Delay stats (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@neteq-metrics2
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/neteq/statistics_calculator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c27aabe1281b757926df125dbc4abf85c86907ee..bd14530f0e3aa813a59f2e6c9a55cf8bcb83e38b 100644
--- a/webrtc/modules/audio_coding/neteq/statistics_calculator.h
+++ b/webrtc/modules/audio_coding/neteq/statistics_calculator.h
@@ -113,6 +113,24 @@ class StatisticsCalculator {
int timer_ = 0;
};
+ class AverageExcessBufferDelayMs {
minyue-webrtc 2015/08/17 13:38:08 Since AverageExcessBufferDelayMs and DelayedPacket
hlundin-webrtc 2015/08/18 07:41:44 I thought about it at first. And now I tried it, b
+ public:
+ ~AverageExcessBufferDelayMs() {
+ LogToUma(); // Log the average for the current (incomplete) interval.
+ }
+ void RegisterPacketWaitingTime(int time_ms);
+ void AdvanceClock(int step_ms);
+
+ private:
+ static const int kReportIntervalMs = 60 * 1000; // One minute.
+
+ void LogToUma();
+
+ double sum_ = 0.0;
+ int num_packets_ = 0;
+ int timer_ = 0;
+ };
+
// Calculates numerator / denominator, and returns the value in Q14.
static uint16_t CalculateQ14Ratio(uint32_t numerator, uint32_t denominator);
@@ -129,6 +147,7 @@ class StatisticsCalculator {
int next_waiting_time_index_;
uint32_t secondary_decoded_samples_;
DelayedPacketOutagesPerMinuteCounter delayed_packet_outage_counter_;
+ AverageExcessBufferDelayMs excess_buffer_delay_;
DISALLOW_COPY_AND_ASSIGN(StatisticsCalculator);
};
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/neteq/statistics_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698