| 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. Provides the ability | 6 // that have been seen, and the running parity. Provides 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 20 matching lines...) Expand all Loading... |
| 31 base::StringPiece redundancy) override; | 31 base::StringPiece redundancy) override; |
| 32 bool CanRevive() const override; | 32 bool CanRevive() const override; |
| 33 bool IsFinished() const override; | 33 bool IsFinished() const override; |
| 34 size_t Revive(QuicPacketHeader* header, | 34 size_t Revive(QuicPacketHeader* header, |
| 35 char* decrypted_payload, | 35 char* decrypted_payload, |
| 36 size_t decrypted_payload_len) override; | 36 size_t decrypted_payload_len) override; |
| 37 bool IsWaitingForPacketBefore(QuicPacketNumber num) const override; | 37 bool IsWaitingForPacketBefore(QuicPacketNumber num) const override; |
| 38 const base::StringPiece PayloadParity() const override; | 38 const base::StringPiece PayloadParity() const override; |
| 39 QuicPacketCount NumReceivedPackets() const override; | 39 QuicPacketCount NumReceivedPackets() const override; |
| 40 EncryptionLevel EffectiveEncryptionLevel() const override; | 40 EncryptionLevel EffectiveEncryptionLevel() const override; |
| 41 QuicFecGroupNumber FecGroupNumber() const override; |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 bool UpdateParity(base::StringPiece payload); | 44 bool UpdateParity(base::StringPiece payload); |
| 44 // Returns the number of missing packets, or QuicPacketCount max | 45 // Returns the number of missing packets, or QuicPacketCount max |
| 45 // if the number of missing packets is not known. | 46 // if the number of missing packets is not known. |
| 46 QuicPacketCount NumMissingPackets() const; | 47 QuicPacketCount NumMissingPackets() const; |
| 47 | 48 |
| 48 bool has_received_fec_packet() const { | 49 bool has_received_fec_packet() const { |
| 49 return max_protected_packet_ != kInvalidPacketNumber; | 50 return max_protected_packet_ != kInvalidPacketNumber; |
| 50 } | 51 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 65 // The effective encryption level, which is the lowest encryption level of | 66 // The effective encryption level, which is the lowest encryption level of |
| 66 // the data and FEC in the group. | 67 // the data and FEC in the group. |
| 67 EncryptionLevel effective_encryption_level_; | 68 EncryptionLevel effective_encryption_level_; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(QuicFecGroup); | 70 DISALLOW_COPY_AND_ASSIGN(QuicFecGroup); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace net | 73 } // namespace net |
| 73 | 74 |
| 74 #endif // NET_QUIC_QUIC_FEC_GROUP_H_ | 75 #endif // NET_QUIC_QUIC_FEC_GROUP_H_ |
| OLD | NEW |