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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 2303
2304 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() { 2304 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() {
2305 if (stream_) { 2305 if (stream_) {
2306 call_->DestroyVideoReceiveStream(stream_); 2306 call_->DestroyVideoReceiveStream(stream_);
2307 stream_ = nullptr; 2307 stream_ = nullptr;
2308 } 2308 }
2309 if (flexfec_stream_) { 2309 if (flexfec_stream_) {
2310 call_->DestroyFlexfecReceiveStream(flexfec_stream_); 2310 call_->DestroyFlexfecReceiveStream(flexfec_stream_);
2311 flexfec_stream_ = nullptr; 2311 flexfec_stream_ = nullptr;
2312 } 2312 }
2313 if (flexfec_config_.IsCompleteAndEnabled()) { 2313 const bool use_flexfec = flexfec_config_.IsCompleteAndEnabled();
2314 // TODO(nisse): There are way too many copies here. And why isn't
2315 // the argument to CreateVideoReceiveStream a const ref?
2316 webrtc::VideoReceiveStream::Config config = config_.Copy();
2317 config.rtp.protected_by_flexfec = use_flexfec;
2318 stream_ = call_->CreateVideoReceiveStream(config.Copy());
2319 stream_->Start();
2320
2321 if (use_flexfec) {
2314 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_); 2322 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_);
2315 flexfec_stream_->Start(); 2323 flexfec_stream_->Start();
2316 } 2324 }
2317 stream_ = call_->CreateVideoReceiveStream(config_.Copy());
2318 stream_->Start();
2319 } 2325 }
2320 2326
2321 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders( 2327 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders(
2322 std::vector<AllocatedDecoder>* allocated_decoders) { 2328 std::vector<AllocatedDecoder>* allocated_decoders) {
2323 for (size_t i = 0; i < allocated_decoders->size(); ++i) { 2329 for (size_t i = 0; i < allocated_decoders->size(); ++i) {
2324 if ((*allocated_decoders)[i].external) { 2330 if ((*allocated_decoders)[i].external) {
2325 external_decoder_factory_->DestroyVideoDecoder( 2331 external_decoder_factory_->DestroyVideoDecoder(
2326 (*allocated_decoders)[i].external_decoder); 2332 (*allocated_decoders)[i].external_decoder);
2327 } 2333 }
2328 delete (*allocated_decoders)[i].decoder; 2334 delete (*allocated_decoders)[i].decoder;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 rtx_mapping[video_codecs[i].codec.id] != 2548 rtx_mapping[video_codecs[i].codec.id] !=
2543 ulpfec_config.red_payload_type) { 2549 ulpfec_config.red_payload_type) {
2544 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2550 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2545 } 2551 }
2546 } 2552 }
2547 2553
2548 return video_codecs; 2554 return video_codecs;
2549 } 2555 }
2550 2556
2551 } // namespace cricket 2557 } // namespace cricket
OLDNEW
« 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