| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 fec_packet_to_send->ReserveExtension<TransportSequenceNumber>(); | 127 fec_packet_to_send->ReserveExtension<TransportSequenceNumber>(); |
| 128 | 128 |
| 129 // RTP payload. | 129 // RTP payload. |
| 130 uint8_t* payload = fec_packet_to_send->AllocatePayload(fec_packet->length); | 130 uint8_t* payload = fec_packet_to_send->AllocatePayload(fec_packet->length); |
| 131 memcpy(payload, fec_packet->data, fec_packet->length); | 131 memcpy(payload, fec_packet->data, fec_packet->length); |
| 132 | 132 |
| 133 fec_packets_to_send.push_back(std::move(fec_packet_to_send)); | 133 fec_packets_to_send.push_back(std::move(fec_packet_to_send)); |
| 134 } | 134 } |
| 135 ulpfec_generator_.ResetState(); | 135 ulpfec_generator_.ResetState(); |
| 136 | 136 |
| 137 // TODO(brandtr): Remove this log output when the FlexFEC subsystem is | |
| 138 // properly wired up in a robust way. | |
| 139 int64_t now_ms = clock_->TimeInMilliseconds(); | 137 int64_t now_ms = clock_->TimeInMilliseconds(); |
| 140 if (!fec_packets_to_send.empty() && | 138 if (!fec_packets_to_send.empty() && |
| 141 now_ms - last_generated_packet_ms_ > kPacketLogIntervalMs) { | 139 now_ms - last_generated_packet_ms_ > kPacketLogIntervalMs) { |
| 142 LOG(LS_INFO) << "Generated " << fec_packets_to_send.size() | 140 LOG(LS_VERBOSE) << "Generated " << fec_packets_to_send.size() |
| 143 << " FlexFEC packets with payload type: " << payload_type_ | 141 << " FlexFEC packets with payload type: " << payload_type_ |
| 144 << " and SSRC: " << ssrc_ << "."; | 142 << " and SSRC: " << ssrc_ << "."; |
| 145 last_generated_packet_ms_ = now_ms; | 143 last_generated_packet_ms_ = now_ms; |
| 146 } | 144 } |
| 147 | 145 |
| 148 return fec_packets_to_send; | 146 return fec_packets_to_send; |
| 149 } | 147 } |
| 150 | 148 |
| 151 // The overhead is BWE RTP header extensions and FlexFEC header. | 149 // The overhead is BWE RTP header extensions and FlexFEC header. |
| 152 size_t FlexfecSender::MaxPacketOverhead() const { | 150 size_t FlexfecSender::MaxPacketOverhead() const { |
| 153 return rtp_header_extension_map_.GetTotalLengthInBytes() + | 151 return rtp_header_extension_map_.GetTotalLengthInBytes() + |
| 154 kFlexfecMaxHeaderSize; | 152 kFlexfecMaxHeaderSize; |
| 155 } | 153 } |
| 156 | 154 |
| 157 } // namespace webrtc | 155 } // namespace webrtc |
| OLD | NEW |