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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 static const int64_t kSendTimeHistoryWindowMs = 2000; | 142 static const int64_t kSendTimeHistoryWindowMs = 2000; |
143 | 143 |
144 } // namespace | 144 } // namespace |
145 | 145 |
146 class AdaptedSendTimeHistory : public SendTimeHistory, public SendTimeObserver { | 146 class AdaptedSendTimeHistory : public SendTimeHistory, public SendTimeObserver { |
147 public: | 147 public: |
148 AdaptedSendTimeHistory() : SendTimeHistory(kSendTimeHistoryWindowMs) {} | 148 AdaptedSendTimeHistory() : SendTimeHistory(kSendTimeHistoryWindowMs) {} |
149 virtual ~AdaptedSendTimeHistory() {} | 149 virtual ~AdaptedSendTimeHistory() {} |
150 | 150 |
151 void OnPacketSent(uint16_t sequence_number, int64_t send_time) override { | 151 void OnPacketSent(uint16_t sequence_number, int64_t send_time) override { |
152 SendTimeHistory::AddAndRemoveOldSendTimes(sequence_number, send_time); | 152 PacketInfo info(0, send_time, sequence_number, 0, false); |
| 153 SendTimeHistory::AddAndRemoveOld(info); |
153 } | 154 } |
154 }; | 155 }; |
155 | 156 |
156 ChannelGroup::ChannelGroup(ProcessThread* process_thread) | 157 ChannelGroup::ChannelGroup(ProcessThread* process_thread) |
157 : remb_(new VieRemb()), | 158 : remb_(new VieRemb()), |
158 bitrate_allocator_(new BitrateAllocator()), | 159 bitrate_allocator_(new BitrateAllocator()), |
159 call_stats_(new CallStats()), | 160 call_stats_(new CallStats()), |
160 encoder_state_feedback_(new EncoderStateFeedback()), | 161 encoder_state_feedback_(new EncoderStateFeedback()), |
161 packet_router_(new PacketRouter()), | 162 packet_router_(new PacketRouter()), |
162 pacer_(new PacedSender(Clock::GetRealTimeClock(), | 163 pacer_(new PacedSender(Clock::GetRealTimeClock(), |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 rtc::CritScope lock(&encoder_map_crit_); | 383 rtc::CritScope lock(&encoder_map_crit_); |
383 for (const auto& encoder : vie_encoder_map_) | 384 for (const auto& encoder : vie_encoder_map_) |
384 pad_up_to_bitrate_bps += encoder.second->GetPaddingNeededBps(); | 385 pad_up_to_bitrate_bps += encoder.second->GetPaddingNeededBps(); |
385 } | 386 } |
386 pacer_->UpdateBitrate( | 387 pacer_->UpdateBitrate( |
387 target_bitrate_bps / 1000, | 388 target_bitrate_bps / 1000, |
388 PacedSender::kDefaultPaceMultiplier * target_bitrate_bps / 1000, | 389 PacedSender::kDefaultPaceMultiplier * target_bitrate_bps / 1000, |
389 pad_up_to_bitrate_bps / 1000); | 390 pad_up_to_bitrate_bps / 1000); |
390 } | 391 } |
391 } // namespace webrtc | 392 } // namespace webrtc |
OLD | NEW |