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

Unified Diff: webrtc/video_engine/vie_encoder.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_engine/vie_channel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_engine/vie_encoder.cc
diff --git a/webrtc/video_engine/vie_encoder.cc b/webrtc/video_engine/vie_encoder.cc
index 0eea5f5506290a5ab922c628048fe4f48265f36d..26e76e7de859101e3d71802b5f0adc1cde22cc65 100644
--- a/webrtc/video_engine/vie_encoder.cc
+++ b/webrtc/video_engine/vie_encoder.cc
@@ -612,13 +612,14 @@ int32_t ViEEncoder::UpdateProtectionMethod(bool nack, bool fec) {
nack_enabled_ = nack;
// Set Video Protection for VCM.
- if (fec_enabled_ && nack_enabled_) {
- vcm_->SetVideoProtection(webrtc::kProtectionNackFEC, true);
+ VCMVideoProtection protection_mode;
+ if (fec_enabled_) {
+ protection_mode =
+ nack_enabled_ ? webrtc::kProtectionNackFEC : kProtectionFEC;
} else {
- vcm_->SetVideoProtection(webrtc::kProtectionFEC, fec_enabled_);
- vcm_->SetVideoProtection(webrtc::kProtectionNackSender, nack_enabled_);
- vcm_->SetVideoProtection(webrtc::kProtectionNackFEC, false);
+ protection_mode = nack_enabled_ ? kProtectionNack : kProtectionNone;
}
+ vcm_->SetVideoProtection(protection_mode, true);
if (fec_enabled_ || nack_enabled_) {
// The send codec must be registered to set correct MTU.
« no previous file with comments | « webrtc/video_engine/vie_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698