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 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 test_start_ms_(-1), | 50 test_start_ms_(-1), |
51 ramp_up_finished_ms_(-1), | 51 ramp_up_finished_ms_(-1), |
52 extension_type_(extension_type), | 52 extension_type_(extension_type), |
53 video_ssrcs_(GenerateSsrcs(num_video_streams_, 100)), | 53 video_ssrcs_(GenerateSsrcs(num_video_streams_, 100)), |
54 video_rtx_ssrcs_(GenerateSsrcs(num_video_streams_, 200)), | 54 video_rtx_ssrcs_(GenerateSsrcs(num_video_streams_, 200)), |
55 audio_ssrcs_(GenerateSsrcs(num_audio_streams_, 300)), | 55 audio_ssrcs_(GenerateSsrcs(num_audio_streams_, 300)), |
56 poller_thread_(&BitrateStatsPollingThread, | 56 poller_thread_(&BitrateStatsPollingThread, |
57 this, | 57 this, |
58 "BitrateStatsPollingThread") { | 58 "BitrateStatsPollingThread") { |
59 EXPECT_LE(num_audio_streams_, 1u); | 59 EXPECT_LE(num_audio_streams_, 1u); |
60 if (rtx_) { | |
61 for (size_t i = 0; i < video_ssrcs_.size(); ++i) | |
62 rtx_ssrc_map_[video_rtx_ssrcs_[i]] = video_ssrcs_[i]; | |
63 } | |
64 } | 60 } |
65 | 61 |
66 RampUpTester::~RampUpTester() { | 62 RampUpTester::~RampUpTester() { |
67 event_.Set(); | 63 event_.Set(); |
68 } | 64 } |
69 | 65 |
70 Call::Config RampUpTester::GetSenderCallConfig() { | 66 Call::Config RampUpTester::GetSenderCallConfig() { |
71 Call::Config call_config(&event_log_); | 67 Call::Config call_config(&event_log_); |
72 if (start_bitrate_bps_ != 0) { | 68 if (start_bitrate_bps_ != 0) { |
73 call_config.bitrate_config.start_bitrate_bps = start_bitrate_bps_; | 69 call_config.bitrate_config.start_bitrate_bps = start_bitrate_bps_; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 send_config->rtp.nack.rtp_history_ms = test::CallTest::kNackRtpHistoryMs; | 161 send_config->rtp.nack.rtp_history_ms = test::CallTest::kNackRtpHistoryMs; |
166 send_config->rtp.ssrcs = video_ssrcs_; | 162 send_config->rtp.ssrcs = video_ssrcs_; |
167 if (rtx_) { | 163 if (rtx_) { |
168 send_config->rtp.rtx.payload_type = test::CallTest::kSendRtxPayloadType; | 164 send_config->rtp.rtx.payload_type = test::CallTest::kSendRtxPayloadType; |
169 send_config->rtp.rtx.ssrcs = video_rtx_ssrcs_; | 165 send_config->rtp.rtx.ssrcs = video_rtx_ssrcs_; |
170 } | 166 } |
171 if (red_) { | 167 if (red_) { |
172 send_config->rtp.ulpfec.ulpfec_payload_type = | 168 send_config->rtp.ulpfec.ulpfec_payload_type = |
173 test::CallTest::kUlpfecPayloadType; | 169 test::CallTest::kUlpfecPayloadType; |
174 send_config->rtp.ulpfec.red_payload_type = test::CallTest::kRedPayloadType; | 170 send_config->rtp.ulpfec.red_payload_type = test::CallTest::kRedPayloadType; |
| 171 if (rtx_) { |
| 172 send_config->rtp.ulpfec.red_rtx_payload_type = |
| 173 test::CallTest::kRtxRedPayloadType; |
| 174 } |
175 } | 175 } |
176 | 176 |
177 size_t i = 0; | 177 size_t i = 0; |
178 for (VideoReceiveStream::Config& recv_config : *receive_configs) { | 178 for (VideoReceiveStream::Config& recv_config : *receive_configs) { |
179 recv_config.rtp.remb = remb; | 179 recv_config.rtp.remb = remb; |
180 recv_config.rtp.transport_cc = transport_cc; | 180 recv_config.rtp.transport_cc = transport_cc; |
181 recv_config.rtp.extensions = send_config->rtp.extensions; | 181 recv_config.rtp.extensions = send_config->rtp.extensions; |
182 | 182 |
183 recv_config.rtp.remote_ssrc = video_ssrcs_[i]; | 183 recv_config.rtp.remote_ssrc = video_ssrcs_[i]; |
184 recv_config.rtp.nack.rtp_history_ms = send_config->rtp.nack.rtp_history_ms; | 184 recv_config.rtp.nack.rtp_history_ms = send_config->rtp.nack.rtp_history_ms; |
185 | 185 |
186 if (red_) { | 186 if (red_) { |
187 recv_config.rtp.ulpfec.red_payload_type = | 187 recv_config.rtp.ulpfec.red_payload_type = |
188 send_config->rtp.ulpfec.red_payload_type; | 188 send_config->rtp.ulpfec.red_payload_type; |
189 recv_config.rtp.ulpfec.ulpfec_payload_type = | 189 recv_config.rtp.ulpfec.ulpfec_payload_type = |
190 send_config->rtp.ulpfec.ulpfec_payload_type; | 190 send_config->rtp.ulpfec.ulpfec_payload_type; |
| 191 if (rtx_) { |
| 192 recv_config.rtp.ulpfec.red_rtx_payload_type = |
| 193 send_config->rtp.ulpfec.red_rtx_payload_type; |
| 194 } |
191 } | 195 } |
192 | 196 |
193 if (rtx_) { | 197 if (rtx_) { |
194 recv_config.rtp.rtx[send_config->encoder_settings.payload_type].ssrc = | 198 recv_config.rtp.rtx[send_config->encoder_settings.payload_type].ssrc = |
195 video_rtx_ssrcs_[i]; | 199 video_rtx_ssrcs_[i]; |
196 recv_config.rtp.rtx[send_config->encoder_settings.payload_type] | 200 recv_config.rtp.rtx[send_config->encoder_settings.payload_type] |
197 .payload_type = send_config->rtp.rtx.payload_type; | 201 .payload_type = send_config->rtp.rtx.payload_type; |
198 } | 202 } |
199 ++i; | 203 ++i; |
200 } | 204 } |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 true); | 624 true); |
621 RunBaseTest(&test); | 625 RunBaseTest(&test); |
622 } | 626 } |
623 | 627 |
624 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) { | 628 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) { |
625 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps, | 629 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps, |
626 RtpExtension::kTransportSequenceNumberUri, false, false); | 630 RtpExtension::kTransportSequenceNumberUri, false, false); |
627 RunBaseTest(&test); | 631 RunBaseTest(&test); |
628 } | 632 } |
629 } // namespace webrtc | 633 } // namespace webrtc |
OLD | NEW |