OLD | NEW |
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 Loading... |
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 |
OLD | NEW |