Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index f3021fef6fec31f8e727fa3698158628dc1d89ee..464145bf9b10420cb980b9b609483157f0c7a8d2 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -1304,7 +1304,7 @@ int32_t Channel::SetSendCodec(const CodecInst& codec) { |
return 0; |
} |
-void Channel::SetBitRate(int bitrate_bps) { |
+void Channel::SetBitRate(int bitrate_bps, int probing_interval_ms) { |
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
"Channel::SetBitRate(bitrate_bps=%d)", bitrate_bps); |
audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
@@ -1315,10 +1315,7 @@ void Channel::SetBitRate(int bitrate_bps) { |
// We give smoothed bitrate allocation to audio network adaptor as |
// the uplink bandwidth. |
- // TODO(michaelt) : Remove kDefaultBitrateSmoothingTimeConstantMs as soon as |
- // we pass the probing interval to this function. |
- constexpr int64_t kDefaultBitrateSmoothingTimeConstantMs = 20000; |
- bitrate_smoother_.SetTimeConstantMs(kDefaultBitrateSmoothingTimeConstantMs); |
+ bitrate_smoother_.SetTimeConstantMs(probing_interval_ms * 4); |
minyue-webrtc
2016/11/22 10:14:25
add some reason of choosing 4
michaelt
2016/11/22 16:29:00
Done.
|
bitrate_smoother_.AddSample(bitrate_bps); |
audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
if (*encoder) { |