| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Tracks information about an FEC group, including the packets | 5 // Tracks information about an FEC group, including the packets |
| 6 // that have been seen, and the running parity. Provided the ability | 6 // that have been seen, and the running parity. Provided the ability |
| 7 // to revive a dropped packet. | 7 // to revive a dropped packet. |
| 8 | 8 |
| 9 #ifndef NET_QUIC_QUIC_FEC_GROUP_H_ | 9 #ifndef NET_QUIC_QUIC_FEC_GROUP_H_ |
| 10 #define NET_QUIC_QUIC_FEC_GROUP_H_ | 10 #define NET_QUIC_QUIC_FEC_GROUP_H_ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ~QuicFecGroup(); | 22 ~QuicFecGroup(); |
| 23 | 23 |
| 24 // Updates the FEC group based on the delivery of a data packet. | 24 // Updates the FEC group based on the delivery of a data packet. |
| 25 // Returns false if this packet has already been seen, true otherwise. | 25 // Returns false if this packet has already been seen, true otherwise. |
| 26 bool Update(const QuicPacketHeader& header, | 26 bool Update(const QuicPacketHeader& header, |
| 27 base::StringPiece decrypted_payload); | 27 base::StringPiece decrypted_payload); |
| 28 | 28 |
| 29 // Updates the FEC group based on the delivery of an FEC packet. | 29 // Updates the FEC group based on the delivery of an FEC packet. |
| 30 // Returns false if this packet has already been seen or if it does | 30 // Returns false if this packet has already been seen or if it does |
| 31 // not claim to protect all the packets previously seen in this group. | 31 // not claim to protect all the packets previously seen in this group. |
| 32 // |fec_packet_entropy|: XOR of entropy of all packets in the fec group. |
| 32 bool UpdateFec(QuicPacketSequenceNumber fec_packet_sequence_number, | 33 bool UpdateFec(QuicPacketSequenceNumber fec_packet_sequence_number, |
| 33 bool fec_entropy_flag, | 34 bool fec_packet_entropy, |
| 34 const QuicFecData& fec); | 35 const QuicFecData& fec); |
| 35 | 36 |
| 36 // Returns true if a packet can be revived from this FEC group. | 37 // Returns true if a packet can be revived from this FEC group. |
| 37 bool CanRevive() const; | 38 bool CanRevive() const; |
| 38 | 39 |
| 39 // Returns true if all packets (FEC and data) from this FEC group have been | 40 // Returns true if all packets (FEC and data) from this FEC group have been |
| 40 // seen or revived | 41 // seen or revived |
| 41 bool IsFinished() const; | 42 bool IsFinished() const; |
| 42 | 43 |
| 43 // Revives the missing packet from this FEC group. This may return a packet | 44 // Revives the missing packet from this FEC group. This may return a packet |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 char payload_parity_[kMaxPacketSize]; | 89 char payload_parity_[kMaxPacketSize]; |
| 89 size_t payload_parity_len_; | 90 size_t payload_parity_len_; |
| 90 bool entropy_parity_; | 91 bool entropy_parity_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(QuicFecGroup); | 93 DISALLOW_COPY_AND_ASSIGN(QuicFecGroup); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace net | 96 } // namespace net |
| 96 | 97 |
| 97 #endif // NET_QUIC_QUIC_FEC_GROUP_H_ | 98 #endif // NET_QUIC_QUIC_FEC_GROUP_H_ |
| OLD | NEW |