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

Side by Side Diff: webrtc/modules/congestion_controller/transport_feedback_adapter.cc

Issue 2687013005: Increase the send-time history to 60 seconds. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | webrtc/modules/congestion_controller/transport_feedback_adapter_unittest.cc » ('j') | 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) 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
11 #include "webrtc/modules/congestion_controller/transport_feedback_adapter.h" 11 #include "webrtc/modules/congestion_controller/transport_feedback_adapter.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <limits> 14 #include <limits>
15 15
16 #include "webrtc/base/checks.h" 16 #include "webrtc/base/checks.h"
17 #include "webrtc/base/logging.h" 17 #include "webrtc/base/logging.h"
18 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 18 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
19 #include "webrtc/modules/congestion_controller/delay_based_bwe.h" 19 #include "webrtc/modules/congestion_controller/delay_based_bwe.h"
20 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" 20 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
21 #include "webrtc/modules/utility/include/process_thread.h" 21 #include "webrtc/modules/utility/include/process_thread.h"
22 #include "webrtc/system_wrappers/include/field_trial.h" 22 #include "webrtc/system_wrappers/include/field_trial.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 const int64_t kNoTimestamp = -1; 26 const int64_t kNoTimestamp = -1;
27 const int64_t kSendTimeHistoryWindowMs = 10000; 27 const int64_t kSendTimeHistoryWindowMs = 60000;
28 const int64_t kBaseTimestampScaleFactor = 28 const int64_t kBaseTimestampScaleFactor =
29 rtcp::TransportFeedback::kDeltaScaleFactor * (1 << 8); 29 rtcp::TransportFeedback::kDeltaScaleFactor * (1 << 8);
30 const int64_t kBaseTimestampRangeSizeUs = kBaseTimestampScaleFactor * (1 << 24); 30 const int64_t kBaseTimestampRangeSizeUs = kBaseTimestampScaleFactor * (1 << 24);
31 31
32 class PacketInfoComparator { 32 class PacketInfoComparator {
33 public: 33 public:
34 inline bool operator()(const PacketInfo& lhs, const PacketInfo& rhs) { 34 inline bool operator()(const PacketInfo& lhs, const PacketInfo& rhs) {
35 if (lhs.arrival_time_ms != rhs.arrival_time_ms) 35 if (lhs.arrival_time_ms != rhs.arrival_time_ms)
36 return lhs.arrival_time_ms < rhs.arrival_time_ms; 36 return lhs.arrival_time_ms < rhs.arrival_time_ms;
37 if (lhs.send_time_ms != rhs.send_time_ms) 37 if (lhs.send_time_ms != rhs.send_time_ms)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return last_packet_feedback_vector_; 163 return last_packet_feedback_vector_;
164 } 164 }
165 165
166 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, 166 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms,
167 int64_t max_rtt_ms) { 167 int64_t max_rtt_ms) {
168 rtc::CritScope cs(&bwe_lock_); 168 rtc::CritScope cs(&bwe_lock_);
169 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); 169 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
170 } 170 }
171 171
172 } // namespace webrtc 172 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/transport_feedback_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698