| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 FlexfecSenderImpl::~FlexfecSenderImpl() = default; | 98 FlexfecSenderImpl::~FlexfecSenderImpl() = default; |
| 99 | 99 |
| 100 // We are reusing the implementation from ProducerFec for SetFecParameters, | 100 // We are reusing the implementation from ProducerFec for SetFecParameters, |
| 101 // AddRtpPacketAndGenerateFec, and FecAvailable. | 101 // AddRtpPacketAndGenerateFec, and FecAvailable. |
| 102 void FlexfecSenderImpl::SetFecParameters(const FecProtectionParams& params) { | 102 void FlexfecSenderImpl::SetFecParameters(const FecProtectionParams& params) { |
| 103 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 103 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
| 104 ulpfec_generator_.SetFecParameters(¶ms); | 104 ulpfec_generator_.SetFecParameters(params); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool FlexfecSenderImpl::AddRtpPacketAndGenerateFec( | 107 bool FlexfecSenderImpl::AddRtpPacketAndGenerateFec( |
| 108 const RtpPacketToSend& packet) { | 108 const RtpPacketToSend& packet) { |
| 109 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 109 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
| 110 // TODO(brandtr): Generalize this SSRC check when we support multistream | 110 // TODO(brandtr): Generalize this SSRC check when we support multistream |
| 111 // protection. | 111 // protection. |
| 112 RTC_DCHECK_EQ(packet.Ssrc(), protected_media_ssrc_); | 112 RTC_DCHECK_EQ(packet.Ssrc(), protected_media_ssrc_); |
| 113 return ulpfec_generator_.AddRtpPacketAndGenerateFec( | 113 return ulpfec_generator_.AddRtpPacketAndGenerateFec( |
| 114 packet.data(), packet.payload_size(), packet.headers_size()) == 0; | 114 packet.data(), packet.payload_size(), packet.headers_size()) == 0; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 } | 166 } |
| 167 | 167 |
| 168 return fec_packets_to_send; | 168 return fec_packets_to_send; |
| 169 } | 169 } |
| 170 | 170 |
| 171 size_t FlexfecSenderImpl::MaxPacketOverhead() const { | 171 size_t FlexfecSenderImpl::MaxPacketOverhead() const { |
| 172 return kFlexfecMaxHeaderSize; | 172 return kFlexfecMaxHeaderSize; |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace webrtc | 175 } // namespace webrtc |
| OLD | NEW |