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

Side by Side Diff: webrtc/modules/bitrate_controller/bitrate_controller_impl.h

Issue 2999073002: Tweaked version of BBR for WebRTC. (Closed)
Patch Set: Updated according to comments. Created 3 years, 4 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 * Usage: this class will register multiple RtcpBitrateObserver's one at each 10 * Usage: this class will register multiple RtcpBitrateObserver's one at each
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void OnDelayBasedBweResult(const DelayBasedBwe::Result& result) override; 65 void OnDelayBasedBweResult(const DelayBasedBwe::Result& result) override;
66 66
67 int64_t TimeUntilNextProcess() override; 67 int64_t TimeUntilNextProcess() override;
68 void Process() override; 68 void Process() override;
69 69
70 private: 70 private:
71 class RtcpBandwidthObserverImpl; 71 class RtcpBandwidthObserverImpl;
72 72
73 // Called by BitrateObserver's direct from the RTCP module. 73 // Called by BitrateObserver's direct from the RTCP module.
74 // Implements RtcpBandwidthObserver. 74 // Implements RtcpBandwidthObserver.
75 void OnReceivedEstimatedBitrate(uint32_t bitrate) override; 75 void OnReceivedEstimatedBitrate(uint32_t bitrate);
76 76
77 void OnReceivedRtcpReceiverReport(const ReportBlockList& report_blocks, 77 void OnReceivedRtcpReceiverReport(const ReportBlockList& report_blocks,
78 int64_t rtt, 78 int64_t rtt,
79 int64_t now_ms) override; 79 int64_t now_ms);
80 80
81 // Deprecated 81 // Deprecated
82 void MaybeTriggerOnNetworkChanged(); 82 void MaybeTriggerOnNetworkChanged();
83 83
84 void OnNetworkChanged(uint32_t bitrate, 84 void OnNetworkChanged(uint32_t bitrate,
85 uint8_t fraction_loss, // 0 - 255. 85 uint8_t fraction_loss, // 0 - 255.
86 int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_); 86 int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_);
87 87
88 // Used by process thread. 88 // Used by process thread.
89 const Clock* const clock_; 89 const Clock* const clock_;
90 BitrateObserver* const observer_; 90 BitrateObserver* const observer_;
91 int64_t last_bitrate_update_ms_; 91 int64_t last_bitrate_update_ms_;
92 RtcEventLog* const event_log_; 92 RtcEventLog* const event_log_;
93 93
94 rtc::CriticalSection critsect_; 94 rtc::CriticalSection critsect_;
95 std::map<uint32_t, uint32_t> ssrc_to_last_received_extended_high_seq_num_ 95 std::map<uint32_t, uint32_t> ssrc_to_last_received_extended_high_seq_num_
96 GUARDED_BY(critsect_); 96 GUARDED_BY(critsect_);
97 SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_); 97 SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_);
98 uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_); 98 uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_);
99 99
100 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); 100 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_);
101 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); 101 uint8_t last_fraction_loss_ GUARDED_BY(critsect_);
102 int64_t last_rtt_ms_ GUARDED_BY(critsect_); 102 int64_t last_rtt_ms_ GUARDED_BY(critsect_);
103 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); 103 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_);
104 104
105 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); 105 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl);
106 }; 106 };
107 } // namespace webrtc 107 } // namespace webrtc
108 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ 108 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698