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

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

Issue 2712683002: Add |protected_by_flexfec| flag to VideoReceiveStream::Config. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/call/call.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 8b4c5df1814601757b5d74b80eccf9087c745be5..6723b1b89fd466fa4b5332eabfd5c3f20215612a 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -2310,12 +2310,18 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() {
call_->DestroyFlexfecReceiveStream(flexfec_stream_);
flexfec_stream_ = nullptr;
}
- if (flexfec_config_.IsCompleteAndEnabled()) {
+ const bool use_flexfec = flexfec_config_.IsCompleteAndEnabled();
+ // TODO(nisse): There are way too many copies here. And why isn't
+ // the argument to CreateVideoReceiveStream a const ref?
+ 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(
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698