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

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: rebase 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
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index 9001897323194f6cb3d5d7c56446218424f69209..0b59c8bba283ba77b96c811aaba7385f340b12ba 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);
vie_encoder_->UpdateProtectionMethod(enable_protection_nack,
- enable_protection_fec);
+ enable_protection_fec);
ConfigureSsrcs();
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698