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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 2518923003: Pass time constant to bwe smoothing filter. (Closed)
Patch Set: Add probing_interval_ms to NullBitrateObserver. Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { 222 bool AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
223 // TODO(solenberg): Tests call this function on a network thread, libjingle 223 // TODO(solenberg): Tests call this function on a network thread, libjingle
224 // calls on the worker thread. We should move towards always using a network 224 // calls on the worker thread. We should move towards always using a network
225 // thread. Then this check can be enabled. 225 // thread. Then this check can be enabled.
226 // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); 226 // RTC_DCHECK(!thread_checker_.CalledOnValidThread());
227 return channel_proxy_->ReceivedRTCPPacket(packet, length); 227 return channel_proxy_->ReceivedRTCPPacket(packet, length);
228 } 228 }
229 229
230 uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps, 230 uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
231 uint8_t fraction_loss, 231 uint8_t fraction_loss,
232 int64_t rtt) { 232 int64_t rtt,
233 int64_t probing_interval_ms) {
233 RTC_DCHECK_GE(bitrate_bps, 234 RTC_DCHECK_GE(bitrate_bps,
234 static_cast<uint32_t>(config_.min_bitrate_bps)); 235 static_cast<uint32_t>(config_.min_bitrate_bps));
235 // The bitrate allocator might allocate an higher than max configured bitrate 236 // The bitrate allocator might allocate an higher than max configured bitrate
236 // if there is room, to allow for, as example, extra FEC. Ignore that for now. 237 // if there is room, to allow for, as example, extra FEC. Ignore that for now.
237 const uint32_t max_bitrate_bps = config_.max_bitrate_bps; 238 const uint32_t max_bitrate_bps = config_.max_bitrate_bps;
238 if (bitrate_bps > max_bitrate_bps) 239 if (bitrate_bps > max_bitrate_bps)
239 bitrate_bps = max_bitrate_bps; 240 bitrate_bps = max_bitrate_bps;
240 241
241 channel_proxy_->SetBitrate(bitrate_bps); 242 channel_proxy_->SetBitrate(bitrate_bps, probing_interval_ms);
242 243
243 // The amount of audio protection is not exposed by the encoder, hence 244 // The amount of audio protection is not exposed by the encoder, hence
244 // always returning 0. 245 // always returning 0.
245 return 0; 246 return 0;
246 } 247 }
247 248
248 const webrtc::AudioSendStream::Config& AudioSendStream::config() const { 249 const webrtc::AudioSendStream::Config& AudioSendStream::config() const {
249 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 250 RTC_DCHECK(thread_checker_.CalledOnValidThread());
250 return config_; 251 return config_;
251 } 252 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); 378 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError();
378 return false; 379 return false;
379 } 380 }
380 } 381 }
381 } 382 }
382 return true; 383 return true;
383 } 384 }
384 385
385 } // namespace internal 386 } // namespace internal
386 } // namespace webrtc 387 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698