OLD | NEW |
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 RecordBitrate(); | 149 RecordBitrate(); |
150 } | 150 } |
151 | 151 |
152 uint32_t VideoSender::TargetBitrateKbps() { | 152 uint32_t VideoSender::TargetBitrateKbps() { |
153 return (source_->bits_per_second() + 500) / 1000; | 153 return (source_->bits_per_second() + 500) / 1000; |
154 } | 154 } |
155 | 155 |
156 PacedVideoSender::PacedVideoSender(PacketProcessorListener* listener, | 156 PacedVideoSender::PacedVideoSender(PacketProcessorListener* listener, |
157 VideoSource* source, | 157 VideoSource* source, |
158 BandwidthEstimatorType estimator) | 158 BandwidthEstimatorType estimator) |
159 : VideoSender(listener, source, estimator), pacer_(&clock_, this, nullptr) { | 159 : VideoSender(listener, source, estimator), |
| 160 pacer_(&clock_, this) { |
160 modules_.push_back(&pacer_); | 161 modules_.push_back(&pacer_); |
161 pacer_.SetEstimatedBitrate(source->bits_per_second()); | 162 pacer_.SetEstimatedBitrate(source->bits_per_second()); |
162 } | 163 } |
163 | 164 |
164 PacedVideoSender::~PacedVideoSender() { | 165 PacedVideoSender::~PacedVideoSender() { |
165 for (Packet* packet : pacer_queue_) | 166 for (Packet* packet : pacer_queue_) |
166 delete packet; | 167 delete packet; |
167 for (Packet* packet : queue_) | 168 for (Packet* packet : queue_) |
168 delete packet; | 169 delete packet; |
169 } | 170 } |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 RecordBitrate(); | 479 RecordBitrate(); |
479 } | 480 } |
480 | 481 |
481 uint32_t TcpSender::TargetBitrateKbps() { | 482 uint32_t TcpSender::TargetBitrateKbps() { |
482 return bitrate_kbps_; | 483 return bitrate_kbps_; |
483 } | 484 } |
484 | 485 |
485 } // namespace bwe | 486 } // namespace bwe |
486 } // namespace testing | 487 } // namespace testing |
487 } // namespace webrtc | 488 } // namespace webrtc |
OLD | NEW |