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