OLD | NEW |
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) override; | 45 void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) override; |
46 | 46 |
47 void SetBitrates(int start_bitrate_bps, | 47 void SetBitrates(int start_bitrate_bps, |
48 int min_bitrate_bps, | 48 int min_bitrate_bps, |
49 int max_bitrate_bps) override; | 49 int max_bitrate_bps) override; |
50 | 50 |
51 void ResetBitrates(int bitrate_bps, | 51 void ResetBitrates(int bitrate_bps, |
52 int min_bitrate_bps, | 52 int min_bitrate_bps, |
53 int max_bitrate_bps) override; | 53 int max_bitrate_bps) override; |
54 | 54 |
55 void UpdateDelayBasedEstimate(uint32_t bitrate_bps) override; | |
56 | 55 |
57 void SetReservedBitrate(uint32_t reserved_bitrate_bps) override; | 56 void SetReservedBitrate(uint32_t reserved_bitrate_bps) override; |
58 | 57 |
59 // Returns true if the parameters have changed since the last call. | 58 // Returns true if the parameters have changed since the last call. |
60 bool GetNetworkParameters(uint32_t* bitrate, | 59 bool GetNetworkParameters(uint32_t* bitrate, |
61 uint8_t* fraction_loss, | 60 uint8_t* fraction_loss, |
62 int64_t* rtt) override; | 61 int64_t* rtt) override; |
63 | 62 |
64 void UpdateProbeBitrate(uint32_t bitrate_bps) override; | 63 // RemoteBitrateObserver overrides. |
| 64 void OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, |
| 65 uint32_t bitrate_bps) override; |
| 66 void OnProbeBitrate(uint32_t bitrate_bps) override; |
65 | 67 |
66 int64_t TimeUntilNextProcess() override; | 68 int64_t TimeUntilNextProcess() override; |
67 void Process() override; | 69 void Process() override; |
68 | 70 |
69 private: | 71 private: |
70 class RtcpBandwidthObserverImpl; | 72 class RtcpBandwidthObserverImpl; |
71 | 73 |
72 // Called by BitrateObserver's direct from the RTCP module. | 74 // Called by BitrateObserver's direct from the RTCP module. |
73 void OnReceivedEstimatedBitrate(uint32_t bitrate); | 75 void OnReceiverEstimatedBitrate(uint32_t bitrate); |
74 | 76 |
75 void OnReceivedRtcpReceiverReport(uint8_t fraction_loss, | 77 void OnReceivedRtcpReceiverReport(uint8_t fraction_loss, |
76 int64_t rtt, | 78 int64_t rtt, |
77 int number_of_packets, | 79 int number_of_packets, |
78 int64_t now_ms); | 80 int64_t now_ms); |
79 | 81 |
80 // Deprecated | 82 // Deprecated |
81 void MaybeTriggerOnNetworkChanged(); | 83 void MaybeTriggerOnNetworkChanged(); |
82 | 84 |
83 void OnNetworkChanged(uint32_t bitrate, | 85 void OnNetworkChanged(uint32_t bitrate, |
(...skipping 12 matching lines...) Expand all Loading... |
96 | 98 |
97 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); | 99 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); |
98 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); | 100 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); |
99 int64_t last_rtt_ms_ GUARDED_BY(critsect_); | 101 int64_t last_rtt_ms_ GUARDED_BY(critsect_); |
100 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); | 102 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); |
101 | 103 |
102 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); | 104 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); |
103 }; | 105 }; |
104 } // namespace webrtc | 106 } // namespace webrtc |
105 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ | 107 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ |
OLD | NEW |