OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 vie_channel_->SetSSRC(config_.rtp.rtx.ssrcs[i], kViEStreamTypeRtx, | 487 vie_channel_->SetSSRC(config_.rtp.rtx.ssrcs[i], kViEStreamTypeRtx, |
488 static_cast<unsigned char>(i)); | 488 static_cast<unsigned char>(i)); |
489 RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc); | 489 RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc); |
490 if (it != suspended_ssrcs_.end()) | 490 if (it != suspended_ssrcs_.end()) |
491 vie_channel_->SetRtpStateForSsrc(ssrc, it->second); | 491 vie_channel_->SetRtpStateForSsrc(ssrc, it->second); |
492 } | 492 } |
493 | 493 |
494 RTC_DCHECK_GE(config_.rtp.rtx.payload_type, 0); | 494 RTC_DCHECK_GE(config_.rtp.rtx.payload_type, 0); |
495 vie_channel_->SetRtxSendPayloadType(config_.rtp.rtx.payload_type, | 495 vie_channel_->SetRtxSendPayloadType(config_.rtp.rtx.payload_type, |
496 config_.encoder_settings.payload_type); | 496 config_.encoder_settings.payload_type); |
| 497 if (config_.rtp.fec.red_payload_type != -1 && |
| 498 config_.rtp.fec.red_rtx_payload_type != -1) { |
| 499 vie_channel_->SetRtxSendPayloadType(config_.rtp.fec.red_rtx_payload_type, |
| 500 config_.rtp.fec.red_payload_type); |
| 501 } |
497 } | 502 } |
498 | 503 |
499 std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const { | 504 std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const { |
500 std::map<uint32_t, RtpState> rtp_states; | 505 std::map<uint32_t, RtpState> rtp_states; |
501 for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) { | 506 for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) { |
502 uint32_t ssrc = config_.rtp.ssrcs[i]; | 507 uint32_t ssrc = config_.rtp.ssrcs[i]; |
503 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); | 508 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); |
504 } | 509 } |
505 | 510 |
506 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { | 511 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 vie_encoder_->SetSsrcs(used_ssrcs); | 580 vie_encoder_->SetSsrcs(used_ssrcs); |
576 | 581 |
577 // Restart the media flow | 582 // Restart the media flow |
578 vie_encoder_->Restart(); | 583 vie_encoder_->Restart(); |
579 | 584 |
580 return true; | 585 return true; |
581 } | 586 } |
582 | 587 |
583 } // namespace internal | 588 } // namespace internal |
584 } // namespace webrtc | 589 } // namespace webrtc |
OLD | NEW |