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 max_padding_bitrate_kbps_(0u), | 260 max_padding_bitrate_kbps_(0u), |
261 pacing_bitrate_kbps_(0), | 261 pacing_bitrate_kbps_(0), |
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, int num_packets) { | 270 void PacedSender::CreateProbeCluster(int bitrate_bps) { |
271 CriticalSectionScoped cs(critsect_.get()); | 271 CriticalSectionScoped cs(critsect_.get()); |
272 prober_->CreateProbeCluster(bitrate_bps, num_packets); | 272 prober_->CreateProbeCluster(bitrate_bps); |
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { | 501 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { |
502 media_budget_->IncreaseBudget(delta_time_ms); | 502 media_budget_->IncreaseBudget(delta_time_ms); |
503 padding_budget_->IncreaseBudget(delta_time_ms); | 503 padding_budget_->IncreaseBudget(delta_time_ms); |
504 } | 504 } |
505 | 505 |
506 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { | 506 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { |
507 media_budget_->UseBudget(bytes_sent); | 507 media_budget_->UseBudget(bytes_sent); |
508 padding_budget_->UseBudget(bytes_sent); | 508 padding_budget_->UseBudget(bytes_sent); |
509 } | 509 } |
510 } // namespace webrtc | 510 } // namespace webrtc |
OLD | NEW |