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

Side by Side Diff: webrtc/call/bitrate_allocator.cc

Issue 2504783002: Revert of Start probes only after network is connected. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
41 return 1.0; 41 return 1.0;
42 42
43 uint32_t media_bitrate = allocated_bitrate - protection_bitrate; 43 uint32_t media_bitrate = allocated_bitrate - protection_bitrate;
44 return media_bitrate / static_cast<double>(allocated_bitrate); 44 return media_bitrate / static_cast<double>(allocated_bitrate);
45 } 45 }
46 } // namespace 46 } // namespace
47 47
48 BitrateAllocator::BitrateAllocator(LimitObserver* limit_observer) 48 BitrateAllocator::BitrateAllocator(LimitObserver* limit_observer)
49 : limit_observer_(limit_observer), 49 : limit_observer_(limit_observer),
50 bitrate_observer_configs_(), 50 bitrate_observer_configs_(),
51 last_bitrate_bps_(0), 51 last_bitrate_bps_(kDefaultBitrateBps),
52 last_non_zero_bitrate_bps_(kDefaultBitrateBps), 52 last_non_zero_bitrate_bps_(kDefaultBitrateBps),
53 last_fraction_loss_(0), 53 last_fraction_loss_(0),
54 last_rtt_(0), 54 last_rtt_(0),
55 num_pause_events_(0), 55 num_pause_events_(0),
56 clock_(Clock::GetRealTimeClock()), 56 clock_(Clock::GetRealTimeClock()),
57 last_bwe_log_time_(0) { 57 last_bwe_log_time_(0) {
58 sequenced_checker_.Detach(); 58 sequenced_checker_.Detach();
59 } 59 }
60 60
61 BitrateAllocator::~BitrateAllocator() { 61 BitrateAllocator::~BitrateAllocator() {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 (bitrate - sum_min_bitrates) / 410 (bitrate - sum_min_bitrates) /
411 static_cast<uint32_t>(bitrate_observer_configs_.size()); 411 static_cast<uint32_t>(bitrate_observer_configs_.size());
412 for (const auto& observer_config : bitrate_observer_configs_) { 412 for (const auto& observer_config : bitrate_observer_configs_) {
413 if (observer_config.min_bitrate_bps + extra_bitrate_per_observer < 413 if (observer_config.min_bitrate_bps + extra_bitrate_per_observer <
414 MinBitrateWithHysteresis(observer_config)) 414 MinBitrateWithHysteresis(observer_config))
415 return false; 415 return false;
416 } 416 }
417 return true; 417 return true;
418 } 418 }
419 } // namespace webrtc 419 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698