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

Unified Diff: webrtc/api/audio_codecs/audio_encoder.h

Issue 3011623002: Add new ANA stats to GetStats() to count the number of actions taken by each controller. (Closed)
Patch Set: Fix for failing test. Created 3 years, 3 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/api/audio_codecs/audio_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/audio_codecs/audio_encoder.h
diff --git a/webrtc/api/audio_codecs/audio_encoder.h b/webrtc/api/audio_codecs/audio_encoder.h
index 7406d7d6537d606861533a20e7a99817289cf732..a77894b7daedd36c7686093e00dbaa2c30c7ce75 100644
--- a/webrtc/api/audio_codecs/audio_encoder.h
+++ b/webrtc/api/audio_codecs/audio_encoder.h
@@ -27,6 +27,33 @@ namespace webrtc {
class Clock;
class RtcEventLog;
+// Statistics related to Audio Network Adaptation.
+struct ANAStats {
+ ANAStats();
+ ANAStats(const ANAStats&);
+ ~ANAStats();
+ // Number of actions taken by the ANA bitrate controller since the start of
+ // the call. If this value is not set, it indicates that the bitrate
+ // controller is disabled.
+ rtc::Optional<uint32_t> bitrate_action_counter;
+ // Number of actions taken by the ANA channel controller since the start of
+ // the call. If this value is not set, it indicates that the channel
+ // controller is disabled.
+ rtc::Optional<uint32_t> channel_action_counter;
+ // Number of actions taken by the ANA DTX controller since the start of the
+ // call. If this value is not set, it indicates that the DTX controller is
+ // disabled.
+ rtc::Optional<uint32_t> dtx_action_counter;
+ // Number of actions taken by the ANA FEC controller since the start of the
+ // call. If this value is not set, it indicates that the FEC controller is
+ // disabled.
+ rtc::Optional<uint32_t> fec_action_counter;
+ // Number of actions taken by the ANA frame length controller since the start
+ // of the call. If this value is not set, it indicates that the frame length
+ // controller is disabled.
+ rtc::Optional<uint32_t> frame_length_action_counter;
+};
+
// This is the interface class for encoders in AudioCoding module. Each codec
// type must have an implementation of this class.
class AudioEncoder {
@@ -203,6 +230,9 @@ class AudioEncoder {
virtual void SetReceiverFrameLengthRange(int min_frame_length_ms,
int max_frame_length_ms);
+ // Get statistics related to audio network adaptation.
+ virtual ANAStats GetANAStats() const;
+
protected:
// Subclasses implement this to perform the actual encoding. Called by
// Encode().
« no previous file with comments | « no previous file | webrtc/api/audio_codecs/audio_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698