Chromium Code Reviews| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 time_last_update_us_(clock->TimeInMicroseconds()), | 260 time_last_update_us_(clock->TimeInMicroseconds()), |
| 261 packets_(new paced_sender::PacketQueue(clock)), | 261 packets_(new paced_sender::PacketQueue(clock)), |
| 262 packet_counter_(0) { | 262 packet_counter_(0) { |
| 263 UpdateBytesPerInterval(kMinPacketLimitMs); | 263 UpdateBytesPerInterval(kMinPacketLimitMs); |
| 264 prober_->ProbeAtBitrate(900000, 6); | 264 prober_->ProbeAtBitrate(900000, 6); |
| 265 prober_->ProbeAtBitrate(1800000, 5); | 265 prober_->ProbeAtBitrate(1800000, 5); |
| 266 } | 266 } |
| 267 | 267 |
| 268 PacedSender::~PacedSender() {} | 268 PacedSender::~PacedSender() {} |
| 269 | 269 |
| 270 void PacedSender::ProbeAtBitrate(int bitrate_bps, int num_packets) { | |
|
stefan-webrtc
2016/08/16 11:48:39
I still think "CreateProbeAtBitrate" would be bett
philipel
2016/08/16 13:04:32
Changed to CreateProbeCluster
| |
| 271 CriticalSectionScoped cs(critsect_.get()); | |
| 272 prober_->ProbeAtBitrate(bitrate_bps, num_packets); | |
| 273 } | |
| 274 | |
| 270 void PacedSender::Pause() { | 275 void PacedSender::Pause() { |
| 271 LOG(LS_INFO) << "PacedSender paused."; | 276 LOG(LS_INFO) << "PacedSender paused."; |
| 272 CriticalSectionScoped cs(critsect_.get()); | 277 CriticalSectionScoped cs(critsect_.get()); |
| 273 paused_ = true; | 278 paused_ = true; |
| 274 } | 279 } |
| 275 | 280 |
| 276 void PacedSender::Resume() { | 281 void PacedSender::Resume() { |
| 277 LOG(LS_INFO) << "PacedSender resumed."; | 282 LOG(LS_INFO) << "PacedSender resumed."; |
| 278 CriticalSectionScoped cs(critsect_.get()); | 283 CriticalSectionScoped cs(critsect_.get()); |
| 279 paused_ = false; | 284 paused_ = false; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 media_budget_->UseBudget(bytes_sent); | 484 media_budget_->UseBudget(bytes_sent); |
| 480 padding_budget_->UseBudget(bytes_sent); | 485 padding_budget_->UseBudget(bytes_sent); |
| 481 } | 486 } |
| 482 } | 487 } |
| 483 | 488 |
| 484 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { | 489 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { |
| 485 media_budget_->IncreaseBudget(delta_time_ms); | 490 media_budget_->IncreaseBudget(delta_time_ms); |
| 486 padding_budget_->IncreaseBudget(delta_time_ms); | 491 padding_budget_->IncreaseBudget(delta_time_ms); |
| 487 } | 492 } |
| 488 } // namespace webrtc | 493 } // namespace webrtc |
| OLD | NEW |