Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: webrtc/video/rtp_stream_receiver.cc

Issue 2646073004: Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 EnableReceiveRtpHeaderExtension(config_.rtp.extensions[i].uri, 153 EnableReceiveRtpHeaderExtension(config_.rtp.extensions[i].uri,
154 config_.rtp.extensions[i].id); 154 config_.rtp.extensions[i].id);
155 } 155 }
156 156
157 static const int kMaxPacketAgeToNack = 450; 157 static const int kMaxPacketAgeToNack = 450;
158 const int max_reordering_threshold = (config_.rtp.nack.rtp_history_ms > 0) 158 const int max_reordering_threshold = (config_.rtp.nack.rtp_history_ms > 0)
159 ? kMaxPacketAgeToNack 159 ? kMaxPacketAgeToNack
160 : kDefaultMaxReorderingThreshold; 160 : kDefaultMaxReorderingThreshold;
161 rtp_receive_statistics_->SetMaxReorderingThreshold(max_reordering_threshold); 161 rtp_receive_statistics_->SetMaxReorderingThreshold(max_reordering_threshold);
162 162
163 // TODO(pbos): Support multiple RTX, per video payload. 163 if (config_.rtp.rtx_ssrc) {
brandtr 2017/01/20 14:49:23 Both an SSRC and the pt/apt mapping is needed to d
164 for (const auto& kv : config_.rtp.rtx) { 164 rtp_payload_registry_.SetRtxSsrc(config_.rtp.rtx_ssrc);
165 RTC_DCHECK(kv.second.ssrc != 0);
166 RTC_DCHECK(kv.second.payload_type != 0);
167 165
168 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc); 166 for (const auto& kv : config_.rtp.rtx_payload_types) {
169 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type, 167 RTC_DCHECK(kv.second != 0);
170 kv.first); 168 rtp_payload_registry_.SetRtxPayloadType(kv.second, kv.first);
169 }
171 } 170 }
172 171
173 if (IsUlpfecEnabled()) { 172 if (IsUlpfecEnabled()) {
174 VideoCodec ulpfec_codec = {}; 173 VideoCodec ulpfec_codec = {};
175 ulpfec_codec.codecType = kVideoCodecULPFEC; 174 ulpfec_codec.codecType = kVideoCodecULPFEC;
176 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); 175 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName));
177 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; 176 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type;
178 RTC_CHECK(AddReceiveCodec(ulpfec_codec)); 177 RTC_CHECK(AddReceiveCodec(ulpfec_codec));
179 } 178 }
180 179
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 if (sprop_base64_it == codec_params_it->second.end()) 680 if (sprop_base64_it == codec_params_it->second.end())
682 return; 681 return;
683 682
684 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second)) 683 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second))
685 return; 684 return;
686 685
687 tracker_.InsertSpsPps(sprop_decoder.sps_nalu(), sprop_decoder.pps_nalu()); 686 tracker_.InsertSpsPps(sprop_decoder.sps_nalu(), sprop_decoder.pps_nalu());
688 } 687 }
689 688
690 } // namespace webrtc 689 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698