Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 void GiveFeedback(const FeedbackPacket& feedback) override; | 52 void GiveFeedback(const FeedbackPacket& feedback) override; |
| 53 int64_t TimeUntilNextProcess() override; | 53 int64_t TimeUntilNextProcess() override; |
| 54 void Process() override; | 54 void Process() override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 void EnterStartup(); | 57 void EnterStartup(); |
| 58 bool UpdateBandwidthAndMinRtt(); | 58 bool UpdateBandwidthAndMinRtt(); |
| 59 void TryExitingStartup(); | 59 void TryExitingStartup(); |
| 60 void TryExitingDrain(int64_t now_ms); | 60 void TryExitingDrain(int64_t now_ms); |
| 61 void EnterProbeBw(int64_t now_ms); | 61 void EnterProbeBw(int64_t now_ms); |
| 62 void EnterProbeRtt(int64_t now_ms); | |
| 63 void TryUpdatingCyclePhase(int64_t now_ms); | 62 void TryUpdatingCyclePhase(int64_t now_ms); |
| 64 void TryEnteringProbeRtt(int64_t now_ms); | 63 void TryEnteringProbeRtt(int64_t now_ms, bool min_rtt_expired); |
| 65 void TryExitingProbeRtt(int64_t now_ms); | 64 void TryExitingProbeRtt(int64_t now_ms, int64_t round, bool min_rtt_expired); |
| 65 size_t TargetCongestionWindow(float gain); | |
| 66 Clock* const clock_; | 66 Clock* const clock_; |
| 67 Mode mode_; | 67 Mode mode_; |
| 68 std::unique_ptr<MaxBandwidthFilter> max_bandwidth_filter_; | 68 std::unique_ptr<MaxBandwidthFilter> max_bandwidth_filter_; |
| 69 std::unique_ptr<MinRttFilter> min_rtt_filter_; | |
| 70 std::unique_ptr<CongestionWindow> congestion_window_; | |
| 69 uint64_t round_count_; | 71 uint64_t round_count_; |
| 70 uint64_t last_packet_sent_; | 72 uint64_t last_packet_sent_; |
| 71 uint64_t round_trip_end_; | 73 uint64_t round_trip_end_; |
| 72 float pacing_gain_; | 74 float pacing_gain_; |
| 73 float congestion_window_gain_; | 75 float congestion_window_gain_; |
| 74 | 76 |
| 75 // If optimal bandwidth has been discovered and reached, (for example after | 77 // If optimal bandwidth has been discovered and reached, (for example after |
| 76 // Startup mode) set this variable to true. | 78 // Startup mode) set this variable to true. |
| 77 bool full_bandwidth_reached_; | 79 bool full_bandwidth_reached_; |
| 80 int64_t cycle_start_time_ms_; | |
|
philipel
2017/07/26 11:37:16
Add comments for these variables.
gnish1
2017/07/27 08:38:37
Done.
| |
| 81 int64_t cycle_index_; | |
| 82 size_t prior_in_flight_; | |
| 83 int64_t probe_rtt_start_time_ms_; | |
| 84 int64_t minimum_congestion_window_start_time_ms_; | |
| 85 int64_t minimum_congestion_window_start_round_; | |
| 78 }; | 86 }; |
| 79 | 87 |
| 80 class BbrBweReceiver : public BweReceiver { | 88 class BbrBweReceiver : public BweReceiver { |
| 81 public: | 89 public: |
| 82 explicit BbrBweReceiver(int flow_id); | 90 explicit BbrBweReceiver(int flow_id); |
| 83 virtual ~BbrBweReceiver(); | 91 virtual ~BbrBweReceiver(); |
| 84 void ReceivePacket(int64_t arrival_time_ms, | 92 void ReceivePacket(int64_t arrival_time_ms, |
| 85 const MediaPacket& media_packet) override; | 93 const MediaPacket& media_packet) override; |
| 86 FeedbackPacket* GetFeedback(int64_t now_ms) override; | 94 FeedbackPacket* GetFeedback(int64_t now_ms) override; |
| 87 | 95 |
| 88 private: | 96 private: |
| 89 SimulatedClock clock_; | 97 SimulatedClock clock_; |
| 90 }; | 98 }; |
| 91 } // namespace bwe | 99 } // namespace bwe |
| 92 } // namespace testing | 100 } // namespace testing |
| 93 } // namespace webrtc | 101 } // namespace webrtc |
| 94 | 102 |
| 95 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_BBR_H_ | 103 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_BBR_H_ |
| OLD | NEW |