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 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2255 config_.decoders.push_back(decoder); | 2255 config_.decoders.push_back(decoder); |
2256 config_.rtp.rtx_associated_payload_types[recv_codec.rtx_payload_type] = | 2256 config_.rtp.rtx_associated_payload_types[recv_codec.rtx_payload_type] = |
2257 recv_codec.codec.id; | 2257 recv_codec.codec.id; |
2258 | 2258 |
2259 const bool did_insert = | 2259 const bool did_insert = |
2260 allocated_decoders_ | 2260 allocated_decoders_ |
2261 .insert(std::make_pair(video_format, std::move(new_decoder))) | 2261 .insert(std::make_pair(video_format, std::move(new_decoder))) |
2262 .second; | 2262 .second; |
2263 RTC_CHECK(did_insert); | 2263 RTC_CHECK(did_insert); |
2264 } | 2264 } |
2265 | 2265 |
brandtr
2017/09/21 08:49:40
Maybe we should add a RTC_DCHECK(!recv_codecs.empt
nisse-webrtc
2017/09/21 08:57:29
Added a DCHECK at the top of the method.
I don't
| |
2266 config_.rtp.ulpfec = recv_codecs.front().ulpfec; | 2266 const auto& codec = recv_codecs.front(); |
2267 config_.rtp.ulpfec_payload_type = codec.ulpfec.ulpfec_payload_type; | |
2268 config_.rtp.red_payload_type = codec.ulpfec.red_payload_type; | |
2267 | 2269 |
2268 config_.rtp.nack.rtp_history_ms = | 2270 config_.rtp.nack.rtp_history_ms = HasNack(codec.codec) ? kNackHistoryMs : 0; |
2269 HasNack(recv_codecs.begin()->codec) ? kNackHistoryMs : 0; | 2271 if (codec.ulpfec.red_rtx_payload_type != -1) { |
2270 if (config_.rtp.ulpfec.red_rtx_payload_type != -1) { | |
2271 config_.rtp | 2272 config_.rtp |
2272 .rtx_associated_payload_types[config_.rtp.ulpfec.red_rtx_payload_type] = | 2273 .rtx_associated_payload_types[codec.ulpfec.red_rtx_payload_type] = |
2273 config_.rtp.ulpfec.red_payload_type; | 2274 codec.ulpfec.red_payload_type; |
2274 } | 2275 } |
2275 } | 2276 } |
2276 | 2277 |
2277 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureFlexfecCodec( | 2278 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureFlexfecCodec( |
2278 int flexfec_payload_type) { | 2279 int flexfec_payload_type) { |
2279 flexfec_config_.payload_type = flexfec_payload_type; | 2280 flexfec_config_.payload_type = flexfec_payload_type; |
2280 } | 2281 } |
2281 | 2282 |
2282 void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetLocalSsrc( | 2283 void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetLocalSsrc( |
2283 uint32_t local_ssrc) { | 2284 uint32_t local_ssrc) { |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2681 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - | 2682 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - |
2682 1); | 2683 1); |
2683 } | 2684 } |
2684 | 2685 |
2685 std::vector<webrtc::VideoStream> streams; | 2686 std::vector<webrtc::VideoStream> streams; |
2686 streams.push_back(stream); | 2687 streams.push_back(stream); |
2687 return streams; | 2688 return streams; |
2688 } | 2689 } |
2689 | 2690 |
2690 } // namespace cricket | 2691 } // namespace cricket |
OLD | NEW |