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

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2712683002: Add |protected_by_flexfec| flag to VideoReceiveStream::Config. (Closed)
Patch Set: Created 3 years, 10 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/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index c192b52402ee95ef3f2ffd9dbe25f65ded5ecf6d..f3d16ff2730454cd00e6540f6107a7ae26587a32 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -2295,12 +2295,20 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() {
call_->DestroyFlexfecReceiveStream(flexfec_stream_);
flexfec_stream_ = nullptr;
}
- if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) {
+
+ const bool use_flexfec =
+ IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled();
+ // TODO(nisse): There are way too many copies here. And why isn't
+ // the argument to CreateVideoReceiveStream a const ref?
brandtr 2017/02/23 11:58:32 Agree that this should be cleaned up at some point
nisse-webrtc 2017/02/23 13:01:22 I noticed a std::move(configuration) in Call::Crea
brandtr 2017/02/23 15:28:35 I guess that std::move saves a copy at that call s
+ webrtc::VideoReceiveStream::Config config = config_.Copy();
+ config.rtp.protected_by_flexfec = use_flexfec;
+ stream_ = call_->CreateVideoReceiveStream(config.Copy());
+ stream_->Start();
+
+ if (use_flexfec) {
flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_);
flexfec_stream_->Start();
}
- stream_ = call_->CreateVideoReceiveStream(config_.Copy());
- stream_->Start();
}
void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders(

Powered by Google App Engine
This is Rietveld 408576698