OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 decoder.payload_type = prng->Rand(0, 127); | 158 decoder.payload_type = prng->Rand(0, 127); |
159 decoder.payload_name = (prng->Rand<bool>() ? "VP8" : "H264"); | 159 decoder.payload_name = (prng->Rand<bool>() ? "VP8" : "H264"); |
160 config->decoders.push_back(decoder); | 160 config->decoders.push_back(decoder); |
161 // Add SSRCs for the stream. | 161 // Add SSRCs for the stream. |
162 config->rtp.remote_ssrc = prng->Rand<uint32_t>(); | 162 config->rtp.remote_ssrc = prng->Rand<uint32_t>(); |
163 config->rtp.local_ssrc = prng->Rand<uint32_t>(); | 163 config->rtp.local_ssrc = prng->Rand<uint32_t>(); |
164 // Add extensions and settings for RTCP. | 164 // Add extensions and settings for RTCP. |
165 config->rtp.rtcp_mode = | 165 config->rtp.rtcp_mode = |
166 prng->Rand<bool>() ? RtcpMode::kCompound : RtcpMode::kReducedSize; | 166 prng->Rand<bool>() ? RtcpMode::kCompound : RtcpMode::kReducedSize; |
167 config->rtp.remb = prng->Rand<bool>(); | 167 config->rtp.remb = prng->Rand<bool>(); |
168 config->rtp.rtx_ssrc = prng->Rand<uint32_t>(); | 168 // Add a map from a payload type to a new ssrc and a new payload type for RTX. |
169 // Add a map from a payload type to a new payload type for RTX. | 169 VideoReceiveStream::Config::Rtp::Rtx rtx_pair; |
170 config->rtp.rtx_payload_types.insert( | 170 rtx_pair.ssrc = prng->Rand<uint32_t>(); |
171 std::make_pair(prng->Rand(0, 127), prng->Rand(0, 127))); | 171 rtx_pair.payload_type = prng->Rand(0, 127); |
| 172 config->rtp.rtx.insert(std::make_pair(prng->Rand(0, 127), rtx_pair)); |
172 // Add header extensions. | 173 // Add header extensions. |
173 for (unsigned i = 0; i < kNumExtensions; i++) { | 174 for (unsigned i = 0; i < kNumExtensions; i++) { |
174 if (extensions_bitvector & (1u << i)) { | 175 if (extensions_bitvector & (1u << i)) { |
175 config->rtp.extensions.push_back( | 176 config->rtp.extensions.push_back( |
176 RtpExtension(kExtensionNames[i], prng->Rand<int>())); | 177 RtpExtension(kExtensionNames[i], prng->Rand<int>())); |
177 } | 178 } |
178 } | 179 } |
179 } | 180 } |
180 | 181 |
181 void GenerateVideoSendConfig(uint32_t extensions_bitvector, | 182 void GenerateVideoSendConfig(uint32_t extensions_bitvector, |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 VideoSendConfigReadWriteTest test; | 652 VideoSendConfigReadWriteTest test; |
652 test.DoTest(); | 653 test.DoTest(); |
653 } | 654 } |
654 | 655 |
655 TEST(RtcEventLogTest, LogAudioNetworkAdaptation) { | 656 TEST(RtcEventLogTest, LogAudioNetworkAdaptation) { |
656 AudioNetworkAdaptationReadWriteTest test; | 657 AudioNetworkAdaptationReadWriteTest test; |
657 test.DoTest(); | 658 test.DoTest(); |
658 } | 659 } |
659 | 660 |
660 } // namespace webrtc | 661 } // namespace webrtc |
OLD | NEW |