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

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

Issue 2121183002: New ProbingCalculator class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Clean up Created 4 years, 5 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBING_CALCULATOR_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBING_CALCULATOR_H_
13
14 #include <map>
15 #include <limits>
16
17 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
18
19 namespace webrtc {
20
21 class AimdRateControl;
22
23 class ProbingCalculator {
24 public:
25 explicit ProbingCalculator(AimdRateControl* rate_controller);
26
27 void PacketFeedback(const PacketInfo& packet_info);
28
29 private:
30 struct AggregatedCluster {
31 int num_probes = 0;
32 int64_t first_send_ms = std::numeric_limits<int64_t>::max();
33 int64_t last_send_ms = 0;
34 int64_t first_receive_ms = std::numeric_limits<int64_t>::max();
35 int64_t last_receive_ms = 0;
36 size_t size = 0;
37 };
38
39 std::map<int, AggregatedCluster> clusters_;
40 AimdRateControl* rate_controller_;
41 int last_valid_cluster_id_;
42 };
43
44 } // namespace webrtc
45
46 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBING_CALCULATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698