OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 RTC_CHECK(receiver_config.has_remote_ssrc()); | 305 RTC_CHECK(receiver_config.has_remote_ssrc()); |
306 config->rtp.remote_ssrc = receiver_config.remote_ssrc(); | 306 config->rtp.remote_ssrc = receiver_config.remote_ssrc(); |
307 RTC_CHECK(receiver_config.has_local_ssrc()); | 307 RTC_CHECK(receiver_config.has_local_ssrc()); |
308 config->rtp.local_ssrc = receiver_config.local_ssrc(); | 308 config->rtp.local_ssrc = receiver_config.local_ssrc(); |
309 // Get RTCP settings. | 309 // Get RTCP settings. |
310 RTC_CHECK(receiver_config.has_rtcp_mode()); | 310 RTC_CHECK(receiver_config.has_rtcp_mode()); |
311 config->rtp.rtcp_mode = GetRuntimeRtcpMode(receiver_config.rtcp_mode()); | 311 config->rtp.rtcp_mode = GetRuntimeRtcpMode(receiver_config.rtcp_mode()); |
312 RTC_CHECK(receiver_config.has_remb()); | 312 RTC_CHECK(receiver_config.has_remb()); |
313 config->rtp.remb = receiver_config.remb(); | 313 config->rtp.remb = receiver_config.remb(); |
314 // Get RTX map. | 314 // Get RTX map. |
315 config->rtp.rtx.clear(); | 315 config->rtp.rtx_payload_types.clear(); |
316 for (int i = 0; i < receiver_config.rtx_map_size(); i++) { | 316 for (int i = 0; i < receiver_config.rtx_map_size(); i++) { |
317 const rtclog::RtxMap& map = receiver_config.rtx_map(i); | 317 const rtclog::RtxMap& map = receiver_config.rtx_map(i); |
318 RTC_CHECK(map.has_payload_type()); | 318 RTC_CHECK(map.has_payload_type()); |
319 RTC_CHECK(map.has_config()); | 319 RTC_CHECK(map.has_config()); |
320 RTC_CHECK(map.config().has_rtx_ssrc()); | 320 RTC_CHECK(map.config().has_rtx_ssrc()); |
321 RTC_CHECK(map.config().has_rtx_payload_type()); | 321 RTC_CHECK(map.config().has_rtx_payload_type()); |
322 webrtc::VideoReceiveStream::Config::Rtp::Rtx rtx_pair; | 322 config->rtp.rtx_ssrc = map.config().rtx_ssrc(); |
terelius
2017/01/23 12:52:01
Check that all RTX-SSRCs are identical?
brandtr
2017/01/24 10:04:40
WDYT about this approach?
| |
323 rtx_pair.ssrc = map.config().rtx_ssrc(); | 323 config->rtp.rtx_payload_types.insert( |
324 rtx_pair.payload_type = map.config().rtx_payload_type(); | 324 std::make_pair(map.payload_type(), map.config().rtx_payload_type())); |
325 config->rtp.rtx.insert(std::make_pair(map.payload_type(), rtx_pair)); | |
326 } | 325 } |
327 // Get header extensions. | 326 // Get header extensions. |
328 GetHeaderExtensions(&config->rtp.extensions, | 327 GetHeaderExtensions(&config->rtp.extensions, |
329 receiver_config.header_extensions()); | 328 receiver_config.header_extensions()); |
330 // Get decoders. | 329 // Get decoders. |
331 config->decoders.clear(); | 330 config->decoders.clear(); |
332 for (int i = 0; i < receiver_config.decoders_size(); i++) { | 331 for (int i = 0; i < receiver_config.decoders_size(); i++) { |
333 RTC_CHECK(receiver_config.decoders(i).has_name()); | 332 RTC_CHECK(receiver_config.decoders(i).has_name()); |
334 RTC_CHECK(receiver_config.decoders(i).has_payload_type()); | 333 RTC_CHECK(receiver_config.decoders(i).has_payload_type()); |
335 VideoReceiveStream::Decoder decoder; | 334 VideoReceiveStream::Decoder decoder; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 if (fraction_loss != nullptr) { | 447 if (fraction_loss != nullptr) { |
449 *fraction_loss = loss_event.fraction_loss(); | 448 *fraction_loss = loss_event.fraction_loss(); |
450 } | 449 } |
451 RTC_CHECK(loss_event.has_total_packets()); | 450 RTC_CHECK(loss_event.has_total_packets()); |
452 if (total_packets != nullptr) { | 451 if (total_packets != nullptr) { |
453 *total_packets = loss_event.total_packets(); | 452 *total_packets = loss_event.total_packets(); |
454 } | 453 } |
455 } | 454 } |
456 | 455 |
457 } // namespace webrtc | 456 } // namespace webrtc |
OLD | NEW |