| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include "webrtc/video/video_send_stream.h" | 10 #include "webrtc/video/video_send_stream.h" |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 790 |
| 791 RTC_DCHECK(!config_->rtp.ssrcs.empty()); | 791 RTC_DCHECK(!config_->rtp.ssrcs.empty()); |
| 792 RTC_DCHECK(call_stats_); | 792 RTC_DCHECK(call_stats_); |
| 793 RTC_DCHECK(congestion_controller_); | 793 RTC_DCHECK(congestion_controller_); |
| 794 RTC_DCHECK(remb_); | 794 RTC_DCHECK(remb_); |
| 795 | 795 |
| 796 congestion_controller_->EnablePeriodicAlrProbing( | 796 congestion_controller_->EnablePeriodicAlrProbing( |
| 797 config_->periodic_alr_bandwidth_probing); | 797 config_->periodic_alr_bandwidth_probing); |
| 798 | 798 |
| 799 // RTP/RTCP initialization. | 799 // RTP/RTCP initialization. |
| 800 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 800 |
| 801 // We add the highest spatial layer first to ensure it'll be prioritized |
| 802 // when sending padding, with the hope that the packet rate will be smaller, |
| 803 // and that it's more important to protect than the lower layers. |
| 804 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
| 801 packet_router_->AddRtpModule(rtp_rtcp); | 805 packet_router_->AddRtpModule(rtp_rtcp); |
| 802 } | |
| 803 | 806 |
| 804 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { | 807 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { |
| 805 const std::string& extension = config_->rtp.extensions[i].uri; | 808 const std::string& extension = config_->rtp.extensions[i].uri; |
| 806 int id = config_->rtp.extensions[i].id; | 809 int id = config_->rtp.extensions[i].id; |
| 807 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 810 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
| 808 RTC_DCHECK_GE(id, 1); | 811 RTC_DCHECK_GE(id, 1); |
| 809 RTC_DCHECK_LE(id, 14); | 812 RTC_DCHECK_LE(id, 14); |
| 810 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); | 813 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); |
| 811 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 814 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| 812 RTC_CHECK_EQ(0, rtp_rtcp->RegisterSendRtpHeaderExtension( | 815 RTC_CHECK_EQ(0, rtp_rtcp->RegisterSendRtpHeaderExtension( |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 std::min(config_->rtp.max_packet_size, | 1311 std::min(config_->rtp.max_packet_size, |
| 1309 kPathMTU - transport_overhead_bytes_per_packet_); | 1312 kPathMTU - transport_overhead_bytes_per_packet_); |
| 1310 | 1313 |
| 1311 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1314 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| 1312 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1315 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
| 1313 } | 1316 } |
| 1314 } | 1317 } |
| 1315 | 1318 |
| 1316 } // namespace internal | 1319 } // namespace internal |
| 1317 } // namespace webrtc | 1320 } // namespace webrtc |
| OLD | NEW |