| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 EnableReceiveRtpHeaderExtension(config_.rtp.extensions[i].uri, | 143 EnableReceiveRtpHeaderExtension(config_.rtp.extensions[i].uri, |
| 144 config_.rtp.extensions[i].id); | 144 config_.rtp.extensions[i].id); |
| 145 } | 145 } |
| 146 | 146 |
| 147 static const int kMaxPacketAgeToNack = 450; | 147 static const int kMaxPacketAgeToNack = 450; |
| 148 const int max_reordering_threshold = (config_.rtp.nack.rtp_history_ms > 0) | 148 const int max_reordering_threshold = (config_.rtp.nack.rtp_history_ms > 0) |
| 149 ? kMaxPacketAgeToNack | 149 ? kMaxPacketAgeToNack |
| 150 : kDefaultMaxReorderingThreshold; | 150 : kDefaultMaxReorderingThreshold; |
| 151 rtp_receive_statistics_->SetMaxReorderingThreshold(max_reordering_threshold); | 151 rtp_receive_statistics_->SetMaxReorderingThreshold(max_reordering_threshold); |
| 152 | 152 |
| 153 // TODO(pbos): Support multiple RTX, per video payload. | 153 if (config_.rtp.rtx_ssrc) { |
| 154 for (const auto& kv : config_.rtp.rtx) { | 154 rtp_payload_registry_.SetRtxSsrc(config_.rtp.rtx_ssrc); |
| 155 RTC_DCHECK(kv.second.ssrc != 0); | |
| 156 RTC_DCHECK(kv.second.payload_type != 0); | |
| 157 | 155 |
| 158 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc); | 156 for (const auto& kv : config_.rtp.rtx_payload_types) { |
| 159 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type, | 157 RTC_DCHECK(kv.second != 0); |
| 160 kv.first); | 158 rtp_payload_registry_.SetRtxPayloadType(kv.second, kv.first); |
| 159 } |
| 161 } | 160 } |
| 162 | 161 |
| 163 if (IsUlpfecEnabled()) { | 162 if (IsUlpfecEnabled()) { |
| 164 VideoCodec ulpfec_codec = {}; | 163 VideoCodec ulpfec_codec = {}; |
| 165 ulpfec_codec.codecType = kVideoCodecULPFEC; | 164 ulpfec_codec.codecType = kVideoCodecULPFEC; |
| 166 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); | 165 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); |
| 167 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; | 166 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; |
| 168 RTC_CHECK(AddReceiveCodec(ulpfec_codec)); | 167 RTC_CHECK(AddReceiveCodec(ulpfec_codec)); |
| 169 } | 168 } |
| 170 | 169 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 return; | 656 return; |
| 658 | 657 |
| 659 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) | 658 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) |
| 660 return; | 659 return; |
| 661 | 660 |
| 662 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), | 661 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), |
| 663 sprop_decoder.pps_nalu()); | 662 sprop_decoder.pps_nalu()); |
| 664 } | 663 } |
| 665 | 664 |
| 666 } // namespace webrtc | 665 } // namespace webrtc |
| OLD | NEW |