| 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_CHECK(field_trial::FindFullName( |
| 828 AlrDetector::kStrictPacingAndProbingExperimentName) |
| 829 .empty() || |
| 830 field_trial::FindFullName( |
| 831 AlrDetector::kScreenshareProbingBweExperimentName) |
| 832 .empty()); |
| 833 rtc::Optional<AlrDetector::AlrExperimentSettings> alr_settings; |
| 828 if (content_type == VideoEncoderConfig::ContentType::kScreen) { | 834 if (content_type == VideoEncoderConfig::ContentType::kScreen) { |
| 829 rtc::Optional<AlrDetector::AlrExperimentSettings> alr_settings = | 835 alr_settings = AlrDetector::ParseAlrSettingsFromFieldTrial( |
| 830 AlrDetector::ParseAlrSettingsFromFieldTrial(); | 836 AlrDetector::kScreenshareProbingBweExperimentName); |
| 831 if (alr_settings) { | 837 } else { |
| 832 transport->send_side_cc()->EnablePeriodicAlrProbing(true); | 838 alr_settings = AlrDetector::ParseAlrSettingsFromFieldTrial( |
| 833 transport->send_side_cc()->pacer()->SetPacingFactor( | 839 AlrDetector::kStrictPacingAndProbingExperimentName); |
| 834 alr_settings->pacing_factor); | 840 } |
| 835 transport->send_side_cc()->pacer()->SetQueueTimeLimit( | 841 if (alr_settings) { |
| 836 alr_settings->max_paced_queue_time); | 842 transport->send_side_cc()->EnablePeriodicAlrProbing(true); |
| 837 } | 843 transport->send_side_cc()->pacer()->SetPacingFactor( |
| 844 alr_settings->pacing_factor); |
| 845 transport->send_side_cc()->pacer()->SetQueueTimeLimit( |
| 846 alr_settings->max_paced_queue_time); |
| 838 } | 847 } |
| 839 | 848 |
| 840 if (config_->periodic_alr_bandwidth_probing) { | 849 if (config_->periodic_alr_bandwidth_probing) { |
| 841 transport->send_side_cc()->EnablePeriodicAlrProbing(true); | 850 transport->send_side_cc()->EnablePeriodicAlrProbing(true); |
| 842 } | 851 } |
| 843 | 852 |
| 844 // RTP/RTCP initialization. | 853 // RTP/RTCP initialization. |
| 845 | 854 |
| 846 // We add the highest spatial layer first to ensure it'll be prioritized | 855 // 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, | 856 // 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 Loading... |
| 1370 std::min(config_->rtp.max_packet_size, | 1379 std::min(config_->rtp.max_packet_size, |
| 1371 kPathMTU - transport_overhead_bytes_per_packet_); | 1380 kPathMTU - transport_overhead_bytes_per_packet_); |
| 1372 | 1381 |
| 1373 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1382 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| 1374 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1383 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
| 1375 } | 1384 } |
| 1376 } | 1385 } |
| 1377 | 1386 |
| 1378 } // namespace internal | 1387 } // namespace internal |
| 1379 } // namespace webrtc | 1388 } // namespace webrtc |
| OLD | NEW |