Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: webrtc/video_engine/vie_channel_group.cc

Issue 1288033008: Update SendTimeHistory to store complete PacketInfo, not just send time (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698