Chromium Code Reviews| 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 packet_router_->AddRtpModule(rtp_rtcp); | 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, | |
|
mflodman
2017/01/26 13:01:40
Isn't this the opposite? AddRtpModule does a push_
stefan-webrtc
2017/01/27 11:52:38
Yes, you are right. Thanks :)
| |
| 803 // and that it's more important to protect than the lower layers. | |
| 804 for (auto rit = rtp_rtcp_modules_.rbegin(); rit != rtp_rtcp_modules_.rend(); | |
| 805 ++rit) { | |
| 806 packet_router->AddRtpModule(*rit); | |
| 802 } | 807 } |
| 803 | 808 |
| 804 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { | 809 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { |
| 805 const std::string& extension = config_->rtp.extensions[i].uri; | 810 const std::string& extension = config_->rtp.extensions[i].uri; |
| 806 int id = config_->rtp.extensions[i].id; | 811 int id = config_->rtp.extensions[i].id; |
| 807 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 812 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
| 808 RTC_DCHECK_GE(id, 1); | 813 RTC_DCHECK_GE(id, 1); |
| 809 RTC_DCHECK_LE(id, 14); | 814 RTC_DCHECK_LE(id, 14); |
| 810 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); | 815 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); |
| 811 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 816 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1308 std::min(config_->rtp.max_packet_size, | 1313 std::min(config_->rtp.max_packet_size, |
| 1309 kPathMTU - transport_overhead_bytes_per_packet_); | 1314 kPathMTU - transport_overhead_bytes_per_packet_); |
| 1310 | 1315 |
| 1311 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1316 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| 1312 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1317 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
| 1313 } | 1318 } |
| 1314 } | 1319 } |
| 1315 | 1320 |
| 1316 } // namespace internal | 1321 } // namespace internal |
| 1317 } // namespace webrtc | 1322 } // namespace webrtc |
| OLD | NEW |