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

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: Initial version Created 3 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
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 bd8c7deb942ab9bf9006c3845c7bd9d996291c4b..6fdb4995f5a65917576a48721268c9c50864e77f 100644
--- a/webrtc/api/audio_codecs/audio_encoder.h
+++ b/webrtc/api/audio_codecs/audio_encoder.h
@@ -80,6 +80,18 @@ class AudioEncoder {
std::vector<EncodedInfoLeaf> redundant;
};
+ // Statistics that can be obtained from an AudioEncoder.
+ struct AudioEncoderStats {
+ AudioEncoderStats();
+ AudioEncoderStats(const AudioEncoderStats&);
+ ~AudioEncoderStats();
+ rtc::Optional<int> ana_bitrate_action_counter;
ossu 2017/08/31 13:13:10 Are all these individually optional? Since they'
ivoc 2017/08/31 14:57:50 I think some Optionality is needed here, since ANA
ossu 2017/08/31 15:40:20 1. If ANA being enabled or not is one statistic we
ivoc 2017/09/01 09:34:24 Re 1: I think it would be a bit strange to have a
ossu 2017/09/01 14:28:52 I guess if we don't really know if other stats wil
ivoc 2017/09/01 15:27:16 Thanks, that sounds like a good plan. As discussed
hbos 2017/09/04 08:49:54 Using optional is correct. If the value is being c
+ rtc::Optional<int> ana_channel_action_counter;
+ rtc::Optional<int> ana_dtx_action_counter;
+ rtc::Optional<int> ana_fec_action_counter;
+ rtc::Optional<int> ana_frame_length_action_counter;
+ };
+
virtual ~AudioEncoder() = default;
// Returns the input sample rate in Hz and the number of input channels.
@@ -203,6 +215,9 @@ class AudioEncoder {
virtual void SetReceiverFrameLengthRange(int min_frame_length_ms,
int max_frame_length_ms);
+ // Get statistics related to the audio encoder.
+ virtual AudioEncoderStats GetStats() 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') | webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698