| 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 27 matching lines...) Expand all Loading... |
| 38 recovered_packet_receiver_(recovered_packet_receiver), | 38 recovered_packet_receiver_(recovered_packet_receiver), |
| 39 clock_(Clock::GetRealTimeClock()), | 39 clock_(Clock::GetRealTimeClock()), |
| 40 last_recovered_packet_ms_(-1) { | 40 last_recovered_packet_ms_(-1) { |
| 41 // It's OK to create this object on a different thread/task queue than | 41 // It's OK to create this object on a different thread/task queue than |
| 42 // the one used during main operation. | 42 // the one used during main operation. |
| 43 sequence_checker_.Detach(); | 43 sequence_checker_.Detach(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 FlexfecReceiver::~FlexfecReceiver() = default; | 46 FlexfecReceiver::~FlexfecReceiver() = default; |
| 47 | 47 |
| 48 bool FlexfecReceiver::AddAndProcessReceivedPacket( | 48 void FlexfecReceiver::OnRtpPacket(const RtpPacketReceived& packet) { |
| 49 const RtpPacketReceived& packet) { | |
| 50 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 49 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
| 51 if (!AddReceivedPacket(std::move(packet))) { | 50 if (!AddReceivedPacket(packet)) { |
| 52 return false; | 51 return; |
| 53 } | 52 } |
| 54 return ProcessReceivedPackets(); | 53 ProcessReceivedPackets(); |
| 55 } | 54 } |
| 56 | 55 |
| 57 FecPacketCounter FlexfecReceiver::GetPacketCounter() const { | 56 FecPacketCounter FlexfecReceiver::GetPacketCounter() const { |
| 58 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 57 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
| 59 return packet_counter_; | 58 return packet_counter_; |
| 60 } | 59 } |
| 61 | 60 |
| 62 bool FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) { | 61 bool FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) { |
| 63 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 62 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
| 64 | 63 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); | 144 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); |
| 146 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc | 145 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc |
| 147 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; | 146 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; |
| 148 last_recovered_packet_ms_ = now_ms; | 147 last_recovered_packet_ms_ = now_ms; |
| 149 } | 148 } |
| 150 } | 149 } |
| 151 return true; | 150 return true; |
| 152 } | 151 } |
| 153 | 152 |
| 154 } // namespace webrtc | 153 } // namespace webrtc |
| OLD | NEW |