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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 ++packet_counter_.num_packets; | 105 ++packet_counter_.num_packets; |
106 | 106 |
107 return true; | 107 return true; |
108 } | 108 } |
109 | 109 |
110 // Note that the implementation of this member function and the implementation | 110 // Note that the implementation of this member function and the implementation |
111 // in UlpfecReceiver::ProcessReceivedFec() are slightly different. | 111 // in UlpfecReceiver::ProcessReceivedFec() are slightly different. |
112 // This implementation only returns _recovered_ media packets through the | 112 // This implementation only returns _recovered_ media packets through the |
113 // callback, whereas the implementation in UlpfecReceiver returns _all inserted_ | 113 // callback, whereas the implementation in UlpfecReceiver returns _all inserted_ |
114 // media packets through the callback. The latter behaviour makes sense | 114 // media packets through the callback. The latter behaviour makes sense |
115 // for ULPFEC, since the ULPFEC receiver is owned by the RtpStreamReceiver. | 115 // for ULPFEC, since the ULPFEC receiver is owned by the RtpVideoStreamReceiver. |
116 // Here, however, the received media pipeline is more decoupled from the | 116 // Here, however, the received media pipeline is more decoupled from the |
117 // FlexFEC decoder, and we therefore do not interfere with the reception | 117 // FlexFEC decoder, and we therefore do not interfere with the reception |
118 // of non-recovered media packets. | 118 // of non-recovered media packets. |
119 bool FlexfecReceiver::ProcessReceivedPackets() { | 119 bool FlexfecReceiver::ProcessReceivedPackets() { |
120 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 120 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
121 | 121 |
122 // Decode. | 122 // Decode. |
123 if (!received_packets_.empty()) { | 123 if (!received_packets_.empty()) { |
124 if (erasure_code_->DecodeFec(&received_packets_, &recovered_packets_) != | 124 if (erasure_code_->DecodeFec(&received_packets_, &recovered_packets_) != |
125 0) { | 125 0) { |
(...skipping 18 matching lines...) Expand all Loading... |
144 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); | 144 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); |
145 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc | 145 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc |
146 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; | 146 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; |
147 last_recovered_packet_ms_ = now_ms; | 147 last_recovered_packet_ms_ = now_ms; |
148 } | 148 } |
149 } | 149 } |
150 return true; | 150 return true; |
151 } | 151 } |
152 | 152 |
153 } // namespace webrtc | 153 } // namespace webrtc |
OLD | NEW |