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

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

Issue 2628563003: Propagate packet pacing information to SenTimeHistory (Closed)
Patch Set: . Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 LOG(LS_INFO) << "Probing successful" 108 LOG(LS_INFO) << "Probing successful"
109 << " [cluster id: " << packet_info.probe_cluster_id 109 << " [cluster id: " << packet_info.probe_cluster_id
110 << "] [send: " << send_size << " bytes / " << send_interval_ms 110 << "] [send: " << send_size << " bytes / " << send_interval_ms
111 << " ms = " << send_bps / 1000 << " kb/s]" 111 << " ms = " << send_bps / 1000 << " kb/s]"
112 << " [receive: " << receive_size << " bytes / " 112 << " [receive: " << receive_size << " bytes / "
113 << receive_interval_ms << " ms = " << receive_bps / 1000 113 << receive_interval_ms << " ms = " << receive_bps / 1000
114 << " kb/s]"; 114 << " kb/s]";
115 return std::min(send_bps, receive_bps); 115 return std::min(send_bps, receive_bps);
116 } 116 }
117 117
118 void ProbeBitrateEstimator::OnProbingClusterCreated(int cluster_id,
119 int min_bytes,
120 int min_probes) {
121 // TODO(philipel): Use this info to make better estimates.
122 }
123
118 void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) { 124 void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) {
119 for (auto it = clusters_.begin(); it != clusters_.end();) { 125 for (auto it = clusters_.begin(); it != clusters_.end();) {
120 if (it->second.last_receive_ms < timestamp_ms) { 126 if (it->second.last_receive_ms < timestamp_ms) {
121 it = clusters_.erase(it); 127 it = clusters_.erase(it);
122 } else { 128 } else {
123 ++it; 129 ++it;
124 } 130 }
125 } 131 }
126 } 132 }
127 } // namespace webrtc 133 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698