Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 2973363002: Explicitly inform PacketRouter which RTP-RTCP modules are REMB-candidates (Closed)
Patch Set: Unit-tests added. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 835
836 if (config_->periodic_alr_bandwidth_probing) { 836 if (config_->periodic_alr_bandwidth_probing) {
837 transport->send_side_cc()->EnablePeriodicAlrProbing(true); 837 transport->send_side_cc()->EnablePeriodicAlrProbing(true);
838 } 838 }
839 839
840 // RTP/RTCP initialization. 840 // RTP/RTCP initialization.
841 841
842 // We add the highest spatial layer first to ensure it'll be prioritized 842 // We add the highest spatial layer first to ensure it'll be prioritized
843 // when sending padding, with the hope that the packet rate will be smaller, 843 // when sending padding, with the hope that the packet rate will be smaller,
844 // and that it's more important to protect than the lower layers. 844 // and that it's more important to protect than the lower layers.
845 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 845 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
846 transport->packet_router()->AddSendRtpModule(rtp_rtcp); 846 constexpr bool remb_candidate = true;
847 transport->packet_router()->AddSendRtpModule(rtp_rtcp, remb_candidate);
848 }
847 849
848 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { 850 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) {
849 const std::string& extension = config_->rtp.extensions[i].uri; 851 const std::string& extension = config_->rtp.extensions[i].uri;
850 int id = config_->rtp.extensions[i].id; 852 int id = config_->rtp.extensions[i].id;
851 // One-byte-extension local identifiers are in the range 1-14 inclusive. 853 // One-byte-extension local identifiers are in the range 1-14 inclusive.
852 RTC_DCHECK_GE(id, 1); 854 RTC_DCHECK_GE(id, 1);
853 RTC_DCHECK_LE(id, 14); 855 RTC_DCHECK_LE(id, 14);
854 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); 856 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension));
855 if (StringToRtpExtensionType(extension) == kRtpExtensionVideoContentType && 857 if (StringToRtpExtensionType(extension) == kRtpExtensionVideoContentType &&
856 !field_trial::IsEnabled("WebRTC-VideoContentTypeExtension")) { 858 !field_trial::IsEnabled("WebRTC-VideoContentTypeExtension")) {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 std::min(config_->rtp.max_packet_size, 1366 std::min(config_->rtp.max_packet_size,
1365 kPathMTU - transport_overhead_bytes_per_packet_); 1367 kPathMTU - transport_overhead_bytes_per_packet_);
1366 1368
1367 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1369 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1368 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1370 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1369 } 1371 }
1370 } 1372 }
1371 1373
1372 } // namespace internal 1374 } // namespace internal
1373 } // namespace webrtc 1375 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698