OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return; | 52 return; |
53 } | 53 } |
54 ProcessReceivedPackets(); | 54 ProcessReceivedPackets(); |
55 } | 55 } |
56 | 56 |
57 FecPacketCounter FlexfecReceiver::GetPacketCounter() const { | 57 FecPacketCounter FlexfecReceiver::GetPacketCounter() const { |
58 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 58 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
59 return packet_counter_; | 59 return packet_counter_; |
60 } | 60 } |
61 | 61 |
| 62 // TODO(eladalon): Consider using packet.recovered() to avoid processing |
| 63 // recovered packets here. |
62 bool FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) { | 64 bool FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) { |
63 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 65 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
64 | 66 |
65 // RTP packets with a full base header (12 bytes), but without payload, | 67 // RTP packets with a full base header (12 bytes), but without payload, |
66 // could conceivably be useful in the decoding. Therefore we check | 68 // could conceivably be useful in the decoding. Therefore we check |
67 // with a non-strict inequality here. | 69 // with a non-strict inequality here. |
68 RTC_DCHECK_GE(packet.size(), kRtpHeaderSize); | 70 RTC_DCHECK_GE(packet.size(), kRtpHeaderSize); |
69 | 71 |
70 // Demultiplex based on SSRC, and insert into erasure code decoder. | 72 // Demultiplex based on SSRC, and insert into erasure code decoder. |
71 std::unique_ptr<ReceivedPacket> received_packet(new ReceivedPacket()); | 73 std::unique_ptr<ReceivedPacket> received_packet(new ReceivedPacket()); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); | 147 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); |
146 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc | 148 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc |
147 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; | 149 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; |
148 last_recovered_packet_ms_ = now_ms; | 150 last_recovered_packet_ms_ = now_ms; |
149 } | 151 } |
150 } | 152 } |
151 return true; | 153 return true; |
152 } | 154 } |
153 | 155 |
154 } // namespace webrtc | 156 } // namespace webrtc |
OLD | NEW |