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

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

Issue 3011943002: Move optional.h to webrtc/api/ (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_BITRATE_ESTIMATOR_H_ 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_BITRATE_ESTIMATOR_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_BITRATE_ESTIMATOR_H_ 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_BITRATE_ESTIMATOR_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/rtc_base/optional.h" 16 #include "webrtc/api/optional.h"
17 17
18 namespace webrtc { 18 namespace webrtc {
19 19
20 // Computes a bayesian estimate of the throughput given acks containing 20 // Computes a bayesian estimate of the throughput given acks containing
21 // the arrival time and payload size. Samples which are far from the current 21 // the arrival time and payload size. Samples which are far from the current
22 // estimate or are based on few packets are given a smaller weight, as they 22 // estimate or are based on few packets are given a smaller weight, as they
23 // are considered to be more likely to have been caused by, e.g., delay spikes 23 // are considered to be more likely to have been caused by, e.g., delay spikes
24 // unrelated to congestion. 24 // unrelated to congestion.
25 class BitrateEstimator { 25 class BitrateEstimator {
26 public: 26 public:
(...skipping 10 matching lines...) Expand all
37 int sum_; 37 int sum_;
38 int64_t current_win_ms_; 38 int64_t current_win_ms_;
39 int64_t prev_time_ms_; 39 int64_t prev_time_ms_;
40 float bitrate_estimate_; 40 float bitrate_estimate_;
41 float bitrate_estimate_var_; 41 float bitrate_estimate_var_;
42 }; 42 };
43 43
44 } // namespace webrtc 44 } // namespace webrtc
45 45
46 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_BITRATE_ESTIMATOR_H_ 46 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_BITRATE_ESTIMATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698