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

Side by Side Diff: webrtc/modules/pacing/alr_detector.h

Issue 2504023002: Implement periodic bandwidth probing in application-limited region. (Closed)
Patch Set: address feedback Created 4 years 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 17 matching lines...) Expand all
28 class AlrDetector { 28 class AlrDetector {
29 public: 29 public:
30 AlrDetector(); 30 AlrDetector();
31 ~AlrDetector(); 31 ~AlrDetector();
32 32
33 void OnBytesSent(size_t bytes_sent, int64_t now_ms); 33 void OnBytesSent(size_t bytes_sent, int64_t now_ms);
34 34
35 // Set current estimated bandwidth. 35 // Set current estimated bandwidth.
36 void SetEstimatedBitrate(int bitrate_bps); 36 void SetEstimatedBitrate(int bitrate_bps);
37 37
38 // Returns true if currently in application-limited region. 38 // Returns time in milliseconds when the current application-limited region
39 bool InApplicationLimitedRegion() const; 39 // started or empty result if the sender is currently not application-limited.
40 rtc::Optional<int64_t> GetApplicationLimitedRegionStartTime() const;
40 41
41 private: 42 private:
42 RateStatistics rate_; 43 RateStatistics rate_;
43 int estimated_bitrate_bps_ = 0; 44 int estimated_bitrate_bps_ = 0;
44 bool application_limited_ = false; 45
46 // Non-empty in ALR state.
47 rtc::Optional<int64_t> alr_started_time_ms_;
45 }; 48 };
46 49
47 } // namespace webrtc 50 } // namespace webrtc
48 51
49 #endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ 52 #endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller_unittest.cc ('k') | webrtc/modules/pacing/alr_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698