Index: webrtc/video/video_send_stream.cc |
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc |
index 4ef90dd8498fbf397f4f91693f343045b74ab3a3..1fb1c993cde8a182e4f195a1149470a374f359e1 100644 |
--- a/webrtc/video/video_send_stream.cc |
+++ b/webrtc/video/video_send_stream.cc |
@@ -147,28 +147,14 @@ VideoSendStream::VideoSendStream( |
channel_group_->SetChannelRembStatus(true, false, vie_channel_); |
// Enable NACK, FEC or both. |
- bool enable_protection_nack = false; |
- bool enable_protection_fec = false; |
- if (config_.rtp.fec.red_payload_type != -1) { |
- enable_protection_fec = true; |
- DCHECK(config_.rtp.fec.ulpfec_payload_type != -1); |
- if (config_.rtp.nack.rtp_history_ms > 0) { |
- enable_protection_nack = true; |
- vie_channel_->SetHybridNACKFECStatus( |
- true, static_cast<unsigned char>(config_.rtp.fec.red_payload_type), |
- static_cast<unsigned char>(config_.rtp.fec.ulpfec_payload_type)); |
- } else { |
- vie_channel_->SetFECStatus( |
- true, static_cast<unsigned char>(config_.rtp.fec.red_payload_type), |
- static_cast<unsigned char>(config_.rtp.fec.ulpfec_payload_type)); |
- } |
- // TODO(changbin): Should set RTX for RED mapping in RTP sender in future. |
- } else { |
- enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; |
- vie_channel_->SetNACKStatus(config_.rtp.nack.rtp_history_ms > 0); |
- } |
+ const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; |
+ const bool enable_protection_fec = config_.rtp.fec.red_payload_type != -1; |
+ // TODO(changbin): Should set RTX for RED mapping in RTP sender in future. |
+ vie_channel_->SetProtectionMode(enable_protection_nack, enable_protection_fec, |
+ config_.rtp.fec.red_payload_type, |
+ config_.rtp.fec.ulpfec_payload_type); |
stefan-webrtc
2015/07/14 12:29:12
I approve.
pbos-webrtc
2015/07/14 12:41:57
Acknowledged.
|
vie_encoder_->UpdateProtectionMethod(enable_protection_nack, |
- enable_protection_fec); |
+ enable_protection_fec); |
ConfigureSsrcs(); |