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 20 matching lines...) Expand all Loading... |
31 // * PLR (packet-loss-rate) is reliably computable once the statuses of | 31 // * PLR (packet-loss-rate) is reliably computable once the statuses of |
32 // |plr_min_num_acked_packets| packets are known. | 32 // |plr_min_num_acked_packets| packets are known. |
33 // * RPLR (recoverable-packet-loss-rate) is reliably computable once the | 33 // * RPLR (recoverable-packet-loss-rate) is reliably computable once the |
34 // statuses of |rplr_min_num_acked_pairs| pairs are known. | 34 // statuses of |rplr_min_num_acked_pairs| pairs are known. |
35 TransportFeedbackPacketLossTracker(int64_t max_window_size_ms, | 35 TransportFeedbackPacketLossTracker(int64_t max_window_size_ms, |
36 size_t plr_min_num_acked_packets, | 36 size_t plr_min_num_acked_packets, |
37 size_t rplr_min_num_acked_pairs); | 37 size_t rplr_min_num_acked_pairs); |
38 | 38 |
39 void OnPacketAdded(uint16_t seq_num, int64_t send_time_ms); | 39 void OnPacketAdded(uint16_t seq_num, int64_t send_time_ms); |
40 | 40 |
41 void OnNewTransportFeedbackVector( | 41 void OnPacketFeedbackVector( |
42 const std::vector<PacketFeedback>& packet_feedbacks_vector); | 42 const std::vector<PacketFeedback>& packet_feedbacks_vector); |
43 | 43 |
44 // Returns the packet loss rate, if the window has enough packet statuses to | 44 // Returns the packet loss rate, if the window has enough packet statuses to |
45 // reliably compute it. Otherwise, returns empty. | 45 // reliably compute it. Otherwise, returns empty. |
46 rtc::Optional<float> GetPacketLossRate() const; | 46 rtc::Optional<float> GetPacketLossRate() const; |
47 | 47 |
48 // Returns the first-order-FEC recoverable packet loss rate, if the window has | 48 // Returns the first-order-FEC recoverable packet loss rate, if the window has |
49 // enough status pairs to reliably compute it. Otherwise, returns empty. | 49 // enough status pairs to reliably compute it. Otherwise, returns empty. |
50 rtc::Optional<float> GetRecoverablePacketLossRate() const; | 50 rtc::Optional<float> GetRecoverablePacketLossRate() const; |
51 | 51 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // of all pairs of consecutive acked packets. | 132 // of all pairs of consecutive acked packets. |
133 const size_t min_num_acked_pairs_; | 133 const size_t min_num_acked_pairs_; |
134 size_t num_acked_pairs_; | 134 size_t num_acked_pairs_; |
135 size_t num_recoverable_losses_; | 135 size_t num_recoverable_losses_; |
136 } rplr_state_; | 136 } rplr_state_; |
137 }; | 137 }; |
138 | 138 |
139 } // namespace webrtc | 139 } // namespace webrtc |
140 | 140 |
141 #endif // WEBRTC_VOICE_ENGINE_TRANSPORT_FEEDBACK_PACKET_LOSS_TRACKER_H_ | 141 #endif // WEBRTC_VOICE_ENGINE_TRANSPORT_FEEDBACK_PACKET_LOSS_TRACKER_H_ |
OLD | NEW |