OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 Loading... |
41 crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), | 41 crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), |
42 rbe_(new RemoteBitrateEstimatorSingleStream(observer_, clock_)), | 42 rbe_(new RemoteBitrateEstimatorSingleStream(observer_, clock_)), |
43 using_absolute_send_time_(false), | 43 using_absolute_send_time_(false), |
44 packets_since_absolute_send_time_(0), | 44 packets_since_absolute_send_time_(0), |
45 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) {} | 45 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) {} |
46 | 46 |
47 virtual ~WrappingBitrateEstimator() {} | 47 virtual ~WrappingBitrateEstimator() {} |
48 | 48 |
49 void IncomingPacket(int64_t arrival_time_ms, | 49 void IncomingPacket(int64_t arrival_time_ms, |
50 size_t payload_size, | 50 size_t payload_size, |
51 const RTPHeader& header, | 51 const RTPHeader& header) override { |
52 bool was_paced) override { | |
53 CriticalSectionScoped cs(crit_sect_.get()); | 52 CriticalSectionScoped cs(crit_sect_.get()); |
54 PickEstimatorFromHeader(header); | 53 PickEstimatorFromHeader(header); |
55 rbe_->IncomingPacket(arrival_time_ms, payload_size, header, was_paced); | 54 rbe_->IncomingPacket(arrival_time_ms, payload_size, header); |
56 } | 55 } |
57 | 56 |
58 void Process() override { | 57 void Process() override { |
59 CriticalSectionScoped cs(crit_sect_.get()); | 58 CriticalSectionScoped cs(crit_sect_.get()); |
60 rbe_->Process(); | 59 rbe_->Process(); |
61 } | 60 } |
62 | 61 |
63 int64_t TimeUntilNextProcess() override { | 62 int64_t TimeUntilNextProcess() override { |
64 CriticalSectionScoped cs(crit_sect_.get()); | 63 CriticalSectionScoped cs(crit_sect_.get()); |
65 return rbe_->TimeUntilNextProcess(); | 64 return rbe_->TimeUntilNextProcess(); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 bool CongestionController::IsSendQueueFull() const { | 340 bool CongestionController::IsSendQueueFull() const { |
342 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 341 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
343 } | 342 } |
344 | 343 |
345 bool CongestionController::IsNetworkDown() const { | 344 bool CongestionController::IsNetworkDown() const { |
346 rtc::CritScope cs(&critsect_); | 345 rtc::CritScope cs(&critsect_); |
347 return network_state_ == kNetworkDown; | 346 return network_state_ == kNetworkDown; |
348 } | 347 } |
349 | 348 |
350 } // namespace webrtc | 349 } // namespace webrtc |
OLD | NEW |