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 if (config_.rtp.rtx_ssrc) { | 153 // TODO(pbos): Support multiple RTX, per video payload. |
154 rtp_payload_registry_.SetRtxSsrc(config_.rtp.rtx_ssrc); | 154 for (const auto& kv : config_.rtp.rtx) { |
| 155 RTC_DCHECK(kv.second.ssrc != 0); |
| 156 RTC_DCHECK(kv.second.payload_type != 0); |
155 | 157 |
156 for (const auto& kv : config_.rtp.rtx_payload_types) { | 158 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc); |
157 RTC_DCHECK(kv.second != 0); | 159 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type, |
158 rtp_payload_registry_.SetRtxPayloadType(kv.second, kv.first); | 160 kv.first); |
159 } | |
160 } | 161 } |
161 | 162 |
162 if (IsUlpfecEnabled()) { | 163 if (IsUlpfecEnabled()) { |
163 VideoCodec ulpfec_codec = {}; | 164 VideoCodec ulpfec_codec = {}; |
164 ulpfec_codec.codecType = kVideoCodecULPFEC; | 165 ulpfec_codec.codecType = kVideoCodecULPFEC; |
165 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); | 166 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); |
166 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; | 167 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; |
167 RTC_CHECK(AddReceiveCodec(ulpfec_codec)); | 168 RTC_CHECK(AddReceiveCodec(ulpfec_codec)); |
168 } | 169 } |
169 | 170 |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 return; | 657 return; |
657 | 658 |
658 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) | 659 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) |
659 return; | 660 return; |
660 | 661 |
661 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), | 662 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), |
662 sprop_decoder.pps_nalu()); | 663 sprop_decoder.pps_nalu()); |
663 } | 664 } |
664 | 665 |
665 } // namespace webrtc | 666 } // namespace webrtc |
OLD | NEW |