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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 private: | 51 private: |
52 enum class State { | 52 enum class State { |
53 // Initial state where no probing has been triggered yet. | 53 // Initial state where no probing has been triggered yet. |
54 kInit, | 54 kInit, |
55 // Waiting for probing results to continue further probing. | 55 // Waiting for probing results to continue further probing. |
56 kWaitingForProbingResult, | 56 kWaitingForProbingResult, |
57 // Probing is complete. | 57 // Probing is complete. |
58 kProbingComplete, | 58 kProbingComplete, |
59 }; | 59 }; |
60 | 60 |
61 void InitiateExponentialProbing() EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 61 void InitiateExponentialProbing() RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
62 void InitiateProbing(int64_t now_ms, | 62 void InitiateProbing(int64_t now_ms, |
63 std::initializer_list<int64_t> bitrates_to_probe, | 63 std::initializer_list<int64_t> bitrates_to_probe, |
64 bool probe_further) EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 64 bool probe_further) |
| 65 RTC_EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
65 | 66 |
66 rtc::CriticalSection critsect_; | 67 rtc::CriticalSection critsect_; |
67 PacedSender* const pacer_; | 68 PacedSender* const pacer_; |
68 const Clock* const clock_; | 69 const Clock* const clock_; |
69 NetworkState network_state_ GUARDED_BY(critsect_); | 70 NetworkState network_state_ RTC_GUARDED_BY(critsect_); |
70 State state_ GUARDED_BY(critsect_); | 71 State state_ RTC_GUARDED_BY(critsect_); |
71 int64_t min_bitrate_to_probe_further_bps_ GUARDED_BY(critsect_); | 72 int64_t min_bitrate_to_probe_further_bps_ RTC_GUARDED_BY(critsect_); |
72 int64_t time_last_probing_initiated_ms_ GUARDED_BY(critsect_); | 73 int64_t time_last_probing_initiated_ms_ RTC_GUARDED_BY(critsect_); |
73 int64_t estimated_bitrate_bps_ GUARDED_BY(critsect_); | 74 int64_t estimated_bitrate_bps_ RTC_GUARDED_BY(critsect_); |
74 int64_t start_bitrate_bps_ GUARDED_BY(critsect_); | 75 int64_t start_bitrate_bps_ RTC_GUARDED_BY(critsect_); |
75 int64_t max_bitrate_bps_ GUARDED_BY(critsect_); | 76 int64_t max_bitrate_bps_ RTC_GUARDED_BY(critsect_); |
76 int64_t last_bwe_drop_probing_time_ms_ GUARDED_BY(critsect_); | 77 int64_t last_bwe_drop_probing_time_ms_ RTC_GUARDED_BY(critsect_); |
77 rtc::Optional<int64_t> alr_end_time_ms_ GUARDED_BY(critsect_); | 78 rtc::Optional<int64_t> alr_end_time_ms_ RTC_GUARDED_BY(critsect_); |
78 bool enable_periodic_alr_probing_ GUARDED_BY(critsect_); | 79 bool enable_periodic_alr_probing_ RTC_GUARDED_BY(critsect_); |
79 int64_t time_of_last_large_drop_ms_ GUARDED_BY(critsect_); | 80 int64_t time_of_last_large_drop_ms_ RTC_GUARDED_BY(critsect_); |
80 int64_t bitrate_before_last_large_drop_bps_ GUARDED_BY(critsect_); | 81 int64_t bitrate_before_last_large_drop_bps_ RTC_GUARDED_BY(critsect_); |
81 | 82 |
82 bool in_rapid_recovery_experiment_ GUARDED_BY(critsect_); | 83 bool in_rapid_recovery_experiment_ RTC_GUARDED_BY(critsect_); |
83 // For WebRTC.BWE.MidCallProbing.* metric. | 84 // For WebRTC.BWE.MidCallProbing.* metric. |
84 bool mid_call_probing_waiting_for_result_ GUARDED_BY(&critsect_); | 85 bool mid_call_probing_waiting_for_result_ RTC_GUARDED_BY(&critsect_); |
85 int64_t mid_call_probing_bitrate_bps_ GUARDED_BY(&critsect_); | 86 int64_t mid_call_probing_bitrate_bps_ RTC_GUARDED_BY(&critsect_); |
86 int64_t mid_call_probing_succcess_threshold_ GUARDED_BY(&critsect_); | 87 int64_t mid_call_probing_succcess_threshold_ RTC_GUARDED_BY(&critsect_); |
87 | 88 |
88 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ProbeController); | 89 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ProbeController); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace webrtc | 92 } // namespace webrtc |
92 | 93 |
93 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_CONTROLLER_H_ | 94 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_PROBE_CONTROLLER_H_ |
OLD | NEW |