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

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

Issue 2994623002: Add an experiment for stricter pacing and ALR probing. (Closed)
Patch Set: Created 3 years, 4 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 transport_overhead_bytes_per_packet_(0) { 817 transport_overhead_bytes_per_packet_(0) {
818 RTC_DCHECK_RUN_ON(worker_queue_); 818 RTC_DCHECK_RUN_ON(worker_queue_);
819 LOG(LS_INFO) << "VideoSendStreamInternal: " << config_->ToString(); 819 LOG(LS_INFO) << "VideoSendStreamInternal: " << config_->ToString();
820 weak_ptr_ = weak_ptr_factory_.GetWeakPtr(); 820 weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
821 module_process_thread_checker_.DetachFromThread(); 821 module_process_thread_checker_.DetachFromThread();
822 822
823 RTC_DCHECK(!config_->rtp.ssrcs.empty()); 823 RTC_DCHECK(!config_->rtp.ssrcs.empty());
824 RTC_DCHECK(call_stats_); 824 RTC_DCHECK(call_stats_);
825 RTC_DCHECK(transport_); 825 RTC_DCHECK(transport_);
826 RTC_DCHECK(transport_->send_side_cc()); 826 RTC_DCHECK(transport_->send_side_cc());
827 827 rtc::Optional<AlrDetector::AlrExperimentSettings> alr_settings;
828 if (content_type == VideoEncoderConfig::ContentType::kScreen) { 828 if (content_type == VideoEncoderConfig::ContentType::kScreen) {
829 rtc::Optional<AlrDetector::AlrExperimentSettings> alr_settings = 829 alr_settings = AlrDetector::ParseAlrSettingsFromFieldTrial(
830 AlrDetector::ParseAlrSettingsFromFieldTrial(); 830 AlrDetector::kScreenshareProbingBweExperimentName);
831 if (alr_settings) { 831 } else {
832 transport->send_side_cc()->EnablePeriodicAlrProbing(true); 832 alr_settings = AlrDetector::ParseAlrSettingsFromFieldTrial(
philipel 2017/08/08 11:48:55 CHECK that not both experiments...?
stefan-webrtc 2017/08/08 12:20:51 Done.
833 transport->send_side_cc()->pacer()->SetPacingFactor( 833 AlrDetector::kStrictPacingAndProbingExperimentName);
834 alr_settings->pacing_factor); 834 }
835 transport->send_side_cc()->pacer()->SetQueueTimeLimit( 835 if (alr_settings) {
836 alr_settings->max_paced_queue_time); 836 transport->send_side_cc()->EnablePeriodicAlrProbing(true);
837 } 837 transport->send_side_cc()->pacer()->SetPacingFactor(
838 alr_settings->pacing_factor);
839 transport->send_side_cc()->pacer()->SetQueueTimeLimit(
840 alr_settings->max_paced_queue_time);
838 } 841 }
839 842
840 if (config_->periodic_alr_bandwidth_probing) { 843 if (config_->periodic_alr_bandwidth_probing) {
841 transport->send_side_cc()->EnablePeriodicAlrProbing(true); 844 transport->send_side_cc()->EnablePeriodicAlrProbing(true);
842 } 845 }
843 846
844 // RTP/RTCP initialization. 847 // RTP/RTCP initialization.
845 848
846 // We add the highest spatial layer first to ensure it'll be prioritized 849 // We add the highest spatial layer first to ensure it'll be prioritized
847 // when sending padding, with the hope that the packet rate will be smaller, 850 // when sending padding, with the hope that the packet rate will be smaller,
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 std::min(config_->rtp.max_packet_size, 1373 std::min(config_->rtp.max_packet_size,
1371 kPathMTU - transport_overhead_bytes_per_packet_); 1374 kPathMTU - transport_overhead_bytes_per_packet_);
1372 1375
1373 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1376 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1374 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1377 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1375 } 1378 }
1376 } 1379 }
1377 1380
1378 } // namespace internal 1381 } // namespace internal
1379 } // namespace webrtc 1382 } // namespace webrtc
OLDNEW
« webrtc/modules/pacing/alr_detector.cc ('K') | « webrtc/modules/pacing/alr_detector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698