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

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

Issue 2391963002: Rename FecConfig to UlpfecConfig in config.h. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
« no previous file with comments | « webrtc/video/replay.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // received. 158 // received.
159 // TODO(holmer): When Chrome no longer depends on this being false by default, 159 // TODO(holmer): When Chrome no longer depends on this being false by default,
160 // always use the mapping and remove this whole codepath. 160 // always use the mapping and remove this whole codepath.
161 rtp_payload_registry_.set_use_rtx_payload_mapping_on_restore( 161 rtp_payload_registry_.set_use_rtx_payload_mapping_on_restore(
162 config_.rtp.use_rtx_payload_mapping_on_restore); 162 config_.rtp.use_rtx_payload_mapping_on_restore);
163 163
164 if (IsFecEnabled()) { 164 if (IsFecEnabled()) {
165 VideoCodec ulpfec_codec = {}; 165 VideoCodec ulpfec_codec = {};
166 ulpfec_codec.codecType = kVideoCodecULPFEC; 166 ulpfec_codec.codecType = kVideoCodecULPFEC;
167 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); 167 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName));
168 ulpfec_codec.plType = config_.rtp.fec.ulpfec_payload_type; 168 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type;
169 RTC_CHECK(SetReceiveCodec(ulpfec_codec)); 169 RTC_CHECK(SetReceiveCodec(ulpfec_codec));
170 170
171 VideoCodec red_codec = {}; 171 VideoCodec red_codec = {};
172 red_codec.codecType = kVideoCodecRED; 172 red_codec.codecType = kVideoCodecRED;
173 strncpy(red_codec.plName, "red", sizeof(red_codec.plName)); 173 strncpy(red_codec.plName, "red", sizeof(red_codec.plName));
174 red_codec.plType = config_.rtp.fec.red_payload_type; 174 red_codec.plType = config_.rtp.ulpfec.red_payload_type;
175 RTC_CHECK(SetReceiveCodec(red_codec)); 175 RTC_CHECK(SetReceiveCodec(red_codec));
176 if (config_.rtp.fec.red_rtx_payload_type != -1) { 176 if (config_.rtp.ulpfec.red_rtx_payload_type != -1) {
177 rtp_payload_registry_.SetRtxPayloadType( 177 rtp_payload_registry_.SetRtxPayloadType(
178 config_.rtp.fec.red_rtx_payload_type, 178 config_.rtp.ulpfec.red_rtx_payload_type,
179 config_.rtp.fec.red_payload_type); 179 config_.rtp.ulpfec.red_payload_type);
180 } 180 }
181 181
182 rtp_rtcp_->SetGenericFECStatus(true, 182 rtp_rtcp_->SetGenericFECStatus(true, config_.rtp.ulpfec.red_payload_type,
183 config_.rtp.fec.red_payload_type, 183 config_.rtp.ulpfec.ulpfec_payload_type);
184 config_.rtp.fec.ulpfec_payload_type);
185 } 184 }
186 185
187 if (config_.rtp.rtcp_xr.receiver_reference_time_report) 186 if (config_.rtp.rtcp_xr.receiver_reference_time_report)
188 rtp_rtcp_->SetRtcpXrRrtrStatus(true); 187 rtp_rtcp_->SetRtcpXrRrtrStatus(true);
189 188
190 // Stats callback for CNAME changes. 189 // Stats callback for CNAME changes.
191 rtp_rtcp_->RegisterRtcpStatisticsCallback(receive_stats_proxy); 190 rtp_rtcp_->RegisterRtcpStatisticsCallback(receive_stats_proxy);
192 191
193 process_thread_->RegisterModule(rtp_rtcp_.get()); 192 process_thread_->RegisterModule(rtp_rtcp_.get());
194 } 193 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 return rtp_rtcp_->RequestKeyFrame(); 330 return rtp_rtcp_->RequestKeyFrame();
332 } 331 }
333 332
334 int32_t RtpStreamReceiver::SliceLossIndicationRequest( 333 int32_t RtpStreamReceiver::SliceLossIndicationRequest(
335 const uint64_t picture_id) { 334 const uint64_t picture_id) {
336 return rtp_rtcp_->SendRTCPSliceLossIndication( 335 return rtp_rtcp_->SendRTCPSliceLossIndication(
337 static_cast<uint8_t>(picture_id)); 336 static_cast<uint8_t>(picture_id));
338 } 337 }
339 338
340 bool RtpStreamReceiver::IsFecEnabled() const { 339 bool RtpStreamReceiver::IsFecEnabled() const {
341 return config_.rtp.fec.red_payload_type != -1 && 340 return config_.rtp.ulpfec.red_payload_type != -1 &&
342 config_.rtp.fec.ulpfec_payload_type != -1; 341 config_.rtp.ulpfec.ulpfec_payload_type != -1;
343 } 342 }
344 343
345 bool RtpStreamReceiver::IsRetransmissionsEnabled() const { 344 bool RtpStreamReceiver::IsRetransmissionsEnabled() const {
346 return config_.rtp.nack.rtp_history_ms > 0; 345 return config_.rtp.nack.rtp_history_ms > 0;
347 } 346 }
348 347
349 void RtpStreamReceiver::RequestPacketRetransmit( 348 void RtpStreamReceiver::RequestPacketRetransmit(
350 const std::vector<uint16_t>& sequence_numbers) { 349 const std::vector<uint16_t>& sequence_numbers) {
351 rtp_rtcp_->SendNack(sequence_numbers); 350 rtp_rtcp_->SendNack(sequence_numbers);
352 } 351 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 const std::string& extension, int id) { 536 const std::string& extension, int id) {
538 // One-byte-extension local identifiers are in the range 1-14 inclusive. 537 // One-byte-extension local identifiers are in the range 1-14 inclusive.
539 RTC_DCHECK_GE(id, 1); 538 RTC_DCHECK_GE(id, 1);
540 RTC_DCHECK_LE(id, 14); 539 RTC_DCHECK_LE(id, 14);
541 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); 540 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension));
542 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 541 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
543 StringToRtpExtensionType(extension), id)); 542 StringToRtpExtensionType(extension), id));
544 } 543 }
545 544
546 } // namespace webrtc 545 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/replay.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698