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

Unified Diff: webrtc/video/video_send_stream.cc

Issue 1226143013: Merge methods for configuring NACK/FEC/hybrid. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove distinction between send and receive NACK. Allow disabling receive-side. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698