| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 red_packet->SetPayloadType(red_payload_type_); | 122 red_packet->SetPayloadType(red_payload_type_); |
| 123 if (protect) { | 123 if (protect) { |
| 124 producer_fec_.AddRtpPacketAndGenerateFec(media_packet->data(), | 124 producer_fec_.AddRtpPacketAndGenerateFec(media_packet->data(), |
| 125 media_packet->payload_size(), | 125 media_packet->payload_size(), |
| 126 media_packet->headers_size()); | 126 media_packet->headers_size()); |
| 127 } | 127 } |
| 128 uint16_t num_fec_packets = producer_fec_.NumAvailableFecPackets(); | 128 uint16_t num_fec_packets = producer_fec_.NumAvailableFecPackets(); |
| 129 if (num_fec_packets > 0) { | 129 if (num_fec_packets > 0) { |
| 130 uint16_t first_fec_sequence_number = | 130 uint16_t first_fec_sequence_number = |
| 131 rtp_sender_->AllocateSequenceNumber(num_fec_packets); | 131 rtp_sender_->AllocateSequenceNumber(num_fec_packets); |
| 132 fec_packets = producer_fec_.GetFecPacketsAsRed( | 132 fec_packets = producer_fec_.GetUlpfecPacketsAsRed( |
| 133 red_payload_type_, fec_payload_type_, first_fec_sequence_number, | 133 red_payload_type_, fec_payload_type_, first_fec_sequence_number, |
| 134 media_packet->headers_size()); | 134 media_packet->headers_size()); |
| 135 RTC_DCHECK_EQ(num_fec_packets, fec_packets.size()); | 135 RTC_DCHECK_EQ(num_fec_packets, fec_packets.size()); |
| 136 if (retransmission_settings_ & kRetransmitFECPackets) | 136 if (retransmission_settings_ & kRetransmitFECPackets) |
| 137 fec_storage = kAllowRetransmission; | 137 fec_storage = kAllowRetransmission; |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 // Send |red_packet| instead of |packet| for allocated sequence number. | 140 // Send |red_packet| instead of |packet| for allocated sequence number. |
| 141 size_t red_packet_size = red_packet->size(); | 141 size_t red_packet_size = red_packet->size(); |
| 142 if (rtp_sender_->SendToNetwork(std::move(red_packet), media_packet_storage, | 142 if (rtp_sender_->SendToNetwork(std::move(red_packet), media_packet_storage, |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 rtc::CritScope cs(&crit_); | 345 rtc::CritScope cs(&crit_); |
| 346 return retransmission_settings_; | 346 return retransmission_settings_; |
| 347 } | 347 } |
| 348 | 348 |
| 349 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 349 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
| 350 rtc::CritScope cs(&crit_); | 350 rtc::CritScope cs(&crit_); |
| 351 retransmission_settings_ = settings; | 351 retransmission_settings_ = settings; |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace webrtc | 354 } // namespace webrtc |
| OLD | NEW |