| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 time_last_update_us_(clock->TimeInMicroseconds()), | 262 time_last_update_us_(clock->TimeInMicroseconds()), |
| 263 packets_(new paced_sender::PacketQueue(clock)), | 263 packets_(new paced_sender::PacketQueue(clock)), |
| 264 packet_counter_(0) { | 264 packet_counter_(0) { |
| 265 UpdateBudgetWithElapsedTime(kMinPacketLimitMs); | 265 UpdateBudgetWithElapsedTime(kMinPacketLimitMs); |
| 266 } | 266 } |
| 267 | 267 |
| 268 PacedSender::~PacedSender() {} | 268 PacedSender::~PacedSender() {} |
| 269 | 269 |
| 270 void PacedSender::CreateProbeCluster(int bitrate_bps) { | 270 void PacedSender::CreateProbeCluster(int bitrate_bps) { |
| 271 CriticalSectionScoped cs(critsect_.get()); | 271 CriticalSectionScoped cs(critsect_.get()); |
| 272 prober_->CreateProbeCluster(bitrate_bps); | 272 prober_->CreateProbeCluster(bitrate_bps, clock_->TimeInMilliseconds()); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void PacedSender::Pause() { | 275 void PacedSender::Pause() { |
| 276 LOG(LS_INFO) << "PacedSender paused."; | 276 LOG(LS_INFO) << "PacedSender paused."; |
| 277 CriticalSectionScoped cs(critsect_.get()); | 277 CriticalSectionScoped cs(critsect_.get()); |
| 278 paused_ = true; | 278 paused_ = true; |
| 279 } | 279 } |
| 280 | 280 |
| 281 void PacedSender::Resume() { | 281 void PacedSender::Resume() { |
| 282 LOG(LS_INFO) << "PacedSender resumed."; | 282 LOG(LS_INFO) << "PacedSender resumed."; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { | 494 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { |
| 495 media_budget_->IncreaseBudget(delta_time_ms); | 495 media_budget_->IncreaseBudget(delta_time_ms); |
| 496 padding_budget_->IncreaseBudget(delta_time_ms); | 496 padding_budget_->IncreaseBudget(delta_time_ms); |
| 497 } | 497 } |
| 498 | 498 |
| 499 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { | 499 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { |
| 500 media_budget_->UseBudget(bytes_sent); | 500 media_budget_->UseBudget(bytes_sent); |
| 501 padding_budget_->UseBudget(bytes_sent); | 501 padding_budget_->UseBudget(bytes_sent); |
| 502 } | 502 } |
| 503 } // namespace webrtc | 503 } // namespace webrtc |
| OLD | NEW |