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

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

Issue 2254733005: Only use payload size within the receive/send interval for bitrate probing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase fix Created 4 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 | « no previous file | webrtc/modules/congestion_controller/probe_bitrate_estimator.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) 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 15 matching lines...) Expand all
26 // Returns the estimated bitrate if the probe completes a valid cluster. 26 // Returns the estimated bitrate if the probe completes a valid cluster.
27 int HandleProbeAndEstimateBitrate(const PacketInfo& packet_info); 27 int HandleProbeAndEstimateBitrate(const PacketInfo& packet_info);
28 28
29 private: 29 private:
30 struct AggregatedCluster { 30 struct AggregatedCluster {
31 int num_probes = 0; 31 int num_probes = 0;
32 int64_t first_send_ms = std::numeric_limits<int64_t>::max(); 32 int64_t first_send_ms = std::numeric_limits<int64_t>::max();
33 int64_t last_send_ms = 0; 33 int64_t last_send_ms = 0;
34 int64_t first_receive_ms = std::numeric_limits<int64_t>::max(); 34 int64_t first_receive_ms = std::numeric_limits<int64_t>::max();
35 int64_t last_receive_ms = 0; 35 int64_t last_receive_ms = 0;
36 size_t size = 0; 36 int size_last_send = 0;
37 int size_first_receive = 0;
38 int size_total = 0;
37 }; 39 };
38 40
39 // Erases old cluster data that was seen before |timestamp_ms|. 41 // Erases old cluster data that was seen before |timestamp_ms|.
40 void EraseOldClusters(int64_t timestamp_ms); 42 void EraseOldClusters(int64_t timestamp_ms);
41 43
42 std::map<int, AggregatedCluster> clusters_; 44 std::map<int, AggregatedCluster> clusters_;
43 }; 45 };
44 46
45 } // namespace webrtc 47 } // namespace webrtc
46 48
47 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_ 49 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_BITRATE_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/probe_bitrate_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698