| 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 16 matching lines...) Expand all Loading... |
| 27 constexpr int kPacketLogIntervalMs = 10000; | 27 constexpr int kPacketLogIntervalMs = 10000; |
| 28 | 28 |
| 29 } // namespace | 29 } // namespace |
| 30 | 30 |
| 31 FlexfecReceiver::FlexfecReceiver( | 31 FlexfecReceiver::FlexfecReceiver( |
| 32 uint32_t ssrc, | 32 uint32_t ssrc, |
| 33 uint32_t protected_media_ssrc, | 33 uint32_t protected_media_ssrc, |
| 34 RecoveredPacketReceiver* recovered_packet_receiver) | 34 RecoveredPacketReceiver* recovered_packet_receiver) |
| 35 : ssrc_(ssrc), | 35 : ssrc_(ssrc), |
| 36 protected_media_ssrc_(protected_media_ssrc), | 36 protected_media_ssrc_(protected_media_ssrc), |
| 37 erasure_code_(ForwardErrorCorrection::CreateFlexfec()), | 37 erasure_code_( |
| 38 ForwardErrorCorrection::CreateFlexfec(ssrc, protected_media_ssrc)), |
| 38 recovered_packet_receiver_(recovered_packet_receiver), | 39 recovered_packet_receiver_(recovered_packet_receiver), |
| 39 clock_(Clock::GetRealTimeClock()), | 40 clock_(Clock::GetRealTimeClock()), |
| 40 last_recovered_packet_ms_(-1) { | 41 last_recovered_packet_ms_(-1) { |
| 41 // It's OK to create this object on a different thread/task queue than | 42 // It's OK to create this object on a different thread/task queue than |
| 42 // the one used during main operation. | 43 // the one used during main operation. |
| 43 sequence_checker_.Detach(); | 44 sequence_checker_.Detach(); |
| 44 } | 45 } |
| 45 | 46 |
| 46 FlexfecReceiver::~FlexfecReceiver() = default; | 47 FlexfecReceiver::~FlexfecReceiver() = default; |
| 47 | 48 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); | 145 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); |
| 145 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc | 146 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc |
| 146 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; | 147 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; |
| 147 last_recovered_packet_ms_ = now_ms; | 148 last_recovered_packet_ms_ = now_ms; |
| 148 } | 149 } |
| 149 } | 150 } |
| 150 return true; | 151 return true; |
| 151 } | 152 } |
| 152 | 153 |
| 153 } // namespace webrtc | 154 } // namespace webrtc |
| OLD | NEW |