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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2649973005: Inform jitter buffer about FlexFEC protection. (Closed)
Patch Set: Take 2. Created 3 years, 11 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/test/call_test.cc » ('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 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 needs_recreation = true; 2271 needs_recreation = true;
2272 } 2272 }
2273 if (needs_recreation) { 2273 if (needs_recreation) {
2274 LOG(LS_INFO) << "RecreateWebRtcStream (recv) because of SetRecvParameters"; 2274 LOG(LS_INFO) << "RecreateWebRtcStream (recv) because of SetRecvParameters";
2275 RecreateWebRtcStream(); 2275 RecreateWebRtcStream();
2276 ClearDecoders(&old_decoders); 2276 ClearDecoders(&old_decoders);
2277 } 2277 }
2278 } 2278 }
2279 2279
2280 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() { 2280 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() {
2281 if (stream_) {
2282 call_->DestroyVideoReceiveStream(stream_);
stefan-webrtc 2017/01/27 13:26:02 Should we set stream_ to nullptr here too just to
brandtr 2017/01/27 14:10:46 Might as well. Done.
2283 }
2281 if (flexfec_stream_) { 2284 if (flexfec_stream_) {
2282 call_->DestroyFlexfecReceiveStream(flexfec_stream_); 2285 call_->DestroyFlexfecReceiveStream(flexfec_stream_);
2283 flexfec_stream_ = nullptr; 2286 flexfec_stream_ = nullptr;
2284 } 2287 }
2285 if (stream_) {
2286 call_->DestroyVideoReceiveStream(stream_);
2287 }
2288 stream_ = call_->CreateVideoReceiveStream(config_.Copy());
2289 stream_->Start();
2290 if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) { 2288 if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) {
2291 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_); 2289 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_);
2292 flexfec_stream_->Start(); 2290 flexfec_stream_->Start();
2293 } 2291 }
2292 stream_ = call_->CreateVideoReceiveStream(config_.Copy());
2293 stream_->Start();
2294 } 2294 }
2295 2295
2296 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders( 2296 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders(
2297 std::vector<AllocatedDecoder>* allocated_decoders) { 2297 std::vector<AllocatedDecoder>* allocated_decoders) {
2298 for (size_t i = 0; i < allocated_decoders->size(); ++i) { 2298 for (size_t i = 0; i < allocated_decoders->size(); ++i) {
2299 if ((*allocated_decoders)[i].external) { 2299 if ((*allocated_decoders)[i].external) {
2300 external_decoder_factory_->DestroyVideoDecoder( 2300 external_decoder_factory_->DestroyVideoDecoder(
2301 (*allocated_decoders)[i].external_decoder); 2301 (*allocated_decoders)[i].external_decoder);
2302 } 2302 }
2303 delete (*allocated_decoders)[i].decoder; 2303 delete (*allocated_decoders)[i].decoder;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2516 rtx_mapping[video_codecs[i].codec.id] != 2516 rtx_mapping[video_codecs[i].codec.id] !=
2517 ulpfec_config.red_payload_type) { 2517 ulpfec_config.red_payload_type) {
2518 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2518 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2519 } 2519 }
2520 } 2520 }
2521 2521
2522 return video_codecs; 2522 return video_codecs;
2523 } 2523 }
2524 2524
2525 } // namespace cricket 2525 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698