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

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

Issue 2649973005: Inform jitter buffer about FlexFEC protection. (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 unified diff | Download patch
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 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 2279
2280 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() { 2280 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() {
2281 if (flexfec_stream_) { 2281 if (flexfec_stream_) {
2282 call_->DestroyFlexfecReceiveStream(flexfec_stream_); 2282 call_->DestroyFlexfecReceiveStream(flexfec_stream_);
2283 flexfec_stream_ = nullptr; 2283 flexfec_stream_ = nullptr;
2284 } 2284 }
2285 if (stream_) { 2285 if (stream_) {
2286 call_->DestroyVideoReceiveStream(stream_); 2286 call_->DestroyVideoReceiveStream(stream_);
2287 } 2287 }
2288 stream_ = call_->CreateVideoReceiveStream(config_.Copy()); 2288 stream_ = call_->CreateVideoReceiveStream(config_.Copy());
2289 stream_->Start();
2290 if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) { 2289 if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) {
2291 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_); 2290 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_);
2292 flexfec_stream_->Start(); 2291 flexfec_stream_->Start();
2293 } 2292 }
2293 // Start VideoReceiveStream after FlexfecReceiveStream has been created,
2294 // so that the former is aware of the existence of the latter.
2295 stream_->Start();
2294 } 2296 }
2295 2297
2296 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders( 2298 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders(
2297 std::vector<AllocatedDecoder>* allocated_decoders) { 2299 std::vector<AllocatedDecoder>* allocated_decoders) {
2298 for (size_t i = 0; i < allocated_decoders->size(); ++i) { 2300 for (size_t i = 0; i < allocated_decoders->size(); ++i) {
2299 if ((*allocated_decoders)[i].external) { 2301 if ((*allocated_decoders)[i].external) {
2300 external_decoder_factory_->DestroyVideoDecoder( 2302 external_decoder_factory_->DestroyVideoDecoder(
2301 (*allocated_decoders)[i].external_decoder); 2303 (*allocated_decoders)[i].external_decoder);
2302 } 2304 }
2303 delete (*allocated_decoders)[i].decoder; 2305 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] != 2518 rtx_mapping[video_codecs[i].codec.id] !=
2517 ulpfec_config.red_payload_type) { 2519 ulpfec_config.red_payload_type) {
2518 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2520 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2519 } 2521 }
2520 } 2522 }
2521 2523
2522 return video_codecs; 2524 return video_codecs;
2523 } 2525 }
2524 2526
2525 } // namespace cricket 2527 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698