Chromium Code Reviews| 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(). |