Chromium Code Reviews| Index: webrtc/audio/audio_send_stream.cc |
| diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc |
| index b031762b4cecd173e21766e4ab3f91c070a37fd9..5245d6b18f1bfa9ed12c0d2f10b28a79d04cdcca 100644 |
| --- a/webrtc/audio/audio_send_stream.cc |
| +++ b/webrtc/audio/audio_send_stream.cc |
| @@ -240,6 +240,8 @@ uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps, |
| channel_proxy_->SetBitrate(bitrate_bps); |
| + if (first_update_bitrate_()) |
|
the sun
2016/12/01 09:16:55
nit: always {} in this file, even for one-liners
michaelt
2016/12/05 15:08:49
Done.
|
| + UpdateSmoothedBitrate(); |
| // The amount of audio protection is not exposed by the encoder, hence |
| // always returning 0. |
| return 0; |
| @@ -382,5 +384,12 @@ bool AudioSendStream::SetupSendCodec() { |
| return true; |
| } |
| +void AudioSendStream::UpdateSmoothedBitrate() { |
| + channel_proxy_->UpdateSmoothedBitrate(); |
| + constexpr uint32_t kUpdateSmoothedBitrateIntervalMs = 200; |
| + worker_queue_->PostDelayedTask([this]() { UpdateSmoothedBitrate(); }, |
| + kUpdateSmoothedBitrateIntervalMs); |
| +} |
| + |
| } // namespace internal |
| } // namespace webrtc |