OLD | NEW |
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 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2333 if (flexfec_stream_) { | 2333 if (flexfec_stream_) { |
2334 call_->DestroyFlexfecReceiveStream(flexfec_stream_); | 2334 call_->DestroyFlexfecReceiveStream(flexfec_stream_); |
2335 flexfec_stream_ = nullptr; | 2335 flexfec_stream_ = nullptr; |
2336 } | 2336 } |
2337 if (stream_) { | 2337 if (stream_) { |
2338 call_->DestroyVideoReceiveStream(stream_); | 2338 call_->DestroyVideoReceiveStream(stream_); |
2339 } | 2339 } |
2340 stream_ = call_->CreateVideoReceiveStream(config_.Copy()); | 2340 stream_ = call_->CreateVideoReceiveStream(config_.Copy()); |
2341 stream_->Start(); | 2341 stream_->Start(); |
2342 if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) { | 2342 if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) { |
2343 flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_); | 2343 webrtc::FlexfecReceiveStream::Config config; |
| 2344 // Payload types and SSRCs come from the FlexFEC specific part of the SDP. |
| 2345 config.payload_type = flexfec_config_.flexfec_payload_type; |
| 2346 config.remote_ssrc = flexfec_config_.flexfec_ssrc; |
| 2347 config.protected_media_ssrcs = flexfec_config_.protected_media_ssrcs; |
| 2348 // RTCP messages and RTP header extensions apply to the entire track |
| 2349 // in the SDP. |
| 2350 config.transport_cc = config_.rtp.transport_cc; |
| 2351 config.extensions = config_.rtp.extensions; |
| 2352 flexfec_stream_ = call_->CreateFlexfecReceiveStream(config); |
2344 flexfec_stream_->Start(); | 2353 flexfec_stream_->Start(); |
2345 } | 2354 } |
2346 } | 2355 } |
2347 | 2356 |
2348 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders( | 2357 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders( |
2349 std::vector<AllocatedDecoder>* allocated_decoders) { | 2358 std::vector<AllocatedDecoder>* allocated_decoders) { |
2350 for (size_t i = 0; i < allocated_decoders->size(); ++i) { | 2359 for (size_t i = 0; i < allocated_decoders->size(); ++i) { |
2351 if ((*allocated_decoders)[i].external) { | 2360 if ((*allocated_decoders)[i].external) { |
2352 external_decoder_factory_->DestroyVideoDecoder( | 2361 external_decoder_factory_->DestroyVideoDecoder( |
2353 (*allocated_decoders)[i].external_decoder); | 2362 (*allocated_decoders)[i].external_decoder); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2564 rtx_mapping[video_codecs[i].codec.id] != | 2573 rtx_mapping[video_codecs[i].codec.id] != |
2565 ulpfec_config.red_payload_type) { | 2574 ulpfec_config.red_payload_type) { |
2566 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2575 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2567 } | 2576 } |
2568 } | 2577 } |
2569 | 2578 |
2570 return video_codecs; | 2579 return video_codecs; |
2571 } | 2580 } |
2572 | 2581 |
2573 } // namespace cricket | 2582 } // namespace cricket |
OLD | NEW |