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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // the last one. | 117 // the last one. |
118 expected_bitrate_bps_ = encoder_config->streams.back().min_bitrate_bps; | 118 expected_bitrate_bps_ = encoder_config->streams.back().min_bitrate_bps; |
119 for (size_t i = 0; i < encoder_config->streams.size() - 1; ++i) { | 119 for (size_t i = 0; i < encoder_config->streams.size() - 1; ++i) { |
120 expected_bitrate_bps_ += encoder_config->streams[i].target_bitrate_bps; | 120 expected_bitrate_bps_ += encoder_config->streams[i].target_bitrate_bps; |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
124 send_config->rtp.extensions.clear(); | 124 send_config->rtp.extensions.clear(); |
125 | 125 |
126 bool remb; | 126 bool remb; |
| 127 bool transport_cc; |
127 if (extension_type_ == RtpExtension::kAbsSendTime) { | 128 if (extension_type_ == RtpExtension::kAbsSendTime) { |
128 remb = true; | 129 remb = true; |
| 130 transport_cc = false; |
129 send_config->rtp.extensions.push_back( | 131 send_config->rtp.extensions.push_back( |
130 RtpExtension(extension_type_.c_str(), kAbsSendTimeExtensionId)); | 132 RtpExtension(extension_type_.c_str(), kAbsSendTimeExtensionId)); |
131 } else if (extension_type_ == RtpExtension::kTransportSequenceNumber) { | 133 } else if (extension_type_ == RtpExtension::kTransportSequenceNumber) { |
132 remb = false; | 134 remb = false; |
| 135 transport_cc = true; |
133 send_config->rtp.extensions.push_back(RtpExtension( | 136 send_config->rtp.extensions.push_back(RtpExtension( |
134 extension_type_.c_str(), kTransportSequenceNumberExtensionId)); | 137 extension_type_.c_str(), kTransportSequenceNumberExtensionId)); |
135 } else { | 138 } else { |
136 remb = true; | 139 remb = true; |
| 140 transport_cc = false; |
137 send_config->rtp.extensions.push_back(RtpExtension( | 141 send_config->rtp.extensions.push_back(RtpExtension( |
138 extension_type_.c_str(), kTransmissionTimeOffsetExtensionId)); | 142 extension_type_.c_str(), kTransmissionTimeOffsetExtensionId)); |
139 } | 143 } |
140 | 144 |
141 send_config->rtp.nack.rtp_history_ms = test::CallTest::kNackRtpHistoryMs; | 145 send_config->rtp.nack.rtp_history_ms = test::CallTest::kNackRtpHistoryMs; |
142 send_config->rtp.ssrcs = ssrcs_; | 146 send_config->rtp.ssrcs = ssrcs_; |
143 if (rtx_) { | 147 if (rtx_) { |
144 send_config->rtp.rtx.payload_type = test::CallTest::kSendRtxPayloadType; | 148 send_config->rtp.rtx.payload_type = test::CallTest::kSendRtxPayloadType; |
145 send_config->rtp.rtx.ssrcs = rtx_ssrcs_; | 149 send_config->rtp.rtx.ssrcs = rtx_ssrcs_; |
146 } | 150 } |
147 if (red_) { | 151 if (red_) { |
148 send_config->rtp.fec.ulpfec_payload_type = | 152 send_config->rtp.fec.ulpfec_payload_type = |
149 test::CallTest::kUlpfecPayloadType; | 153 test::CallTest::kUlpfecPayloadType; |
150 send_config->rtp.fec.red_payload_type = test::CallTest::kRedPayloadType; | 154 send_config->rtp.fec.red_payload_type = test::CallTest::kRedPayloadType; |
151 } | 155 } |
152 | 156 |
153 size_t i = 0; | 157 size_t i = 0; |
154 for (VideoReceiveStream::Config& recv_config : *receive_configs) { | 158 for (VideoReceiveStream::Config& recv_config : *receive_configs) { |
155 recv_config.rtp.remb = remb; | 159 recv_config.rtp.remb = remb; |
| 160 recv_config.rtp.transport_cc = transport_cc; |
156 recv_config.rtp.extensions = send_config->rtp.extensions; | 161 recv_config.rtp.extensions = send_config->rtp.extensions; |
157 | 162 |
158 recv_config.rtp.remote_ssrc = ssrcs_[i]; | 163 recv_config.rtp.remote_ssrc = ssrcs_[i]; |
159 recv_config.rtp.nack.rtp_history_ms = send_config->rtp.nack.rtp_history_ms; | 164 recv_config.rtp.nack.rtp_history_ms = send_config->rtp.nack.rtp_history_ms; |
160 | 165 |
161 if (red_) { | 166 if (red_) { |
162 recv_config.rtp.fec.red_payload_type = | 167 recv_config.rtp.fec.red_payload_type = |
163 send_config->rtp.fec.red_payload_type; | 168 send_config->rtp.fec.red_payload_type; |
164 recv_config.rtp.fec.ulpfec_payload_type = | 169 recv_config.rtp.fec.ulpfec_payload_type = |
165 send_config->rtp.fec.ulpfec_payload_type; | 170 send_config->rtp.fec.ulpfec_payload_type; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 RampUpTester test(3, 0, RtpExtension::kTransportSequenceNumber, true, true); | 503 RampUpTester test(3, 0, RtpExtension::kTransportSequenceNumber, true, true); |
499 RunBaseTest(&test, FakeNetworkPipe::Config()); | 504 RunBaseTest(&test, FakeNetworkPipe::Config()); |
500 } | 505 } |
501 | 506 |
502 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) { | 507 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) { |
503 RampUpTester test(1, 0.9 * kSingleStreamTargetBps, | 508 RampUpTester test(1, 0.9 * kSingleStreamTargetBps, |
504 RtpExtension::kTransportSequenceNumber, false, false); | 509 RtpExtension::kTransportSequenceNumber, false, false); |
505 RunBaseTest(&test, FakeNetworkPipe::Config()); | 510 RunBaseTest(&test, FakeNetworkPipe::Config()); |
506 } | 511 } |
507 } // namespace webrtc | 512 } // namespace webrtc |
OLD | NEW |