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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // TODO(pbos): Support multiple RTX, per video payload. | 161 // TODO(pbos): Support multiple RTX, per video payload. |
162 for (const auto& kv : config_.rtp.rtx) { | 162 for (const auto& kv : config_.rtp.rtx) { |
163 RTC_DCHECK(kv.second.ssrc != 0); | 163 RTC_DCHECK(kv.second.ssrc != 0); |
164 RTC_DCHECK(kv.second.payload_type != 0); | 164 RTC_DCHECK(kv.second.payload_type != 0); |
165 | 165 |
166 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc); | 166 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc); |
167 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type, | 167 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type, |
168 kv.first); | 168 kv.first); |
169 } | 169 } |
170 | 170 |
171 if (IsFecEnabled()) { | 171 if (IsUlpfecEnabled()) { |
172 VideoCodec ulpfec_codec = {}; | 172 VideoCodec ulpfec_codec = {}; |
173 ulpfec_codec.codecType = kVideoCodecULPFEC; | 173 ulpfec_codec.codecType = kVideoCodecULPFEC; |
174 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); | 174 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); |
175 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; | 175 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; |
176 RTC_CHECK(SetReceiveCodec(ulpfec_codec)); | 176 RTC_CHECK(SetReceiveCodec(ulpfec_codec)); |
177 } | 177 } |
178 | 178 |
179 if (IsRedEnabled()) { | 179 if (IsRedEnabled()) { |
180 VideoCodec red_codec = {}; | 180 VideoCodec red_codec = {}; |
181 red_codec.codecType = kVideoCodecRED; | 181 red_codec.codecType = kVideoCodecRED; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 int32_t RtpStreamReceiver::RequestKeyFrame() { | 372 int32_t RtpStreamReceiver::RequestKeyFrame() { |
373 return rtp_rtcp_->RequestKeyFrame(); | 373 return rtp_rtcp_->RequestKeyFrame(); |
374 } | 374 } |
375 | 375 |
376 int32_t RtpStreamReceiver::SliceLossIndicationRequest( | 376 int32_t RtpStreamReceiver::SliceLossIndicationRequest( |
377 const uint64_t picture_id) { | 377 const uint64_t picture_id) { |
378 return rtp_rtcp_->SendRTCPSliceLossIndication( | 378 return rtp_rtcp_->SendRTCPSliceLossIndication( |
379 static_cast<uint8_t>(picture_id)); | 379 static_cast<uint8_t>(picture_id)); |
380 } | 380 } |
381 | 381 |
382 bool RtpStreamReceiver::IsFecEnabled() const { | 382 bool RtpStreamReceiver::IsUlpfecEnabled() const { |
383 return config_.rtp.ulpfec.ulpfec_payload_type != -1; | 383 return config_.rtp.ulpfec.ulpfec_payload_type != -1; |
384 } | 384 } |
385 | 385 |
386 bool RtpStreamReceiver::IsRedEnabled() const { | 386 bool RtpStreamReceiver::IsRedEnabled() const { |
387 return config_.rtp.ulpfec.red_payload_type != -1; | 387 return config_.rtp.ulpfec.red_payload_type != -1; |
388 } | 388 } |
389 | 389 |
390 bool RtpStreamReceiver::IsRetransmissionsEnabled() const { | 390 bool RtpStreamReceiver::IsRetransmissionsEnabled() const { |
391 return config_.rtp.nack.rtp_history_ms > 0; | 391 return config_.rtp.nack.rtp_history_ms > 0; |
392 } | 392 } |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 const std::string& extension, int id) { | 644 const std::string& extension, int id) { |
645 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 645 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
646 RTC_DCHECK_GE(id, 1); | 646 RTC_DCHECK_GE(id, 1); |
647 RTC_DCHECK_LE(id, 14); | 647 RTC_DCHECK_LE(id, 14); |
648 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); | 648 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); |
649 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( | 649 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( |
650 StringToRtpExtensionType(extension), id)); | 650 StringToRtpExtensionType(extension), id)); |
651 } | 651 } |
652 | 652 |
653 } // namespace webrtc | 653 } // namespace webrtc |
OLD | NEW |