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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 config->rtp.remote_ssrc = prng->Rand<uint32_t>(); | 164 config->rtp.remote_ssrc = prng->Rand<uint32_t>(); |
165 config->rtp.local_ssrc = prng->Rand<uint32_t>(); | 165 config->rtp.local_ssrc = prng->Rand<uint32_t>(); |
166 // Add extensions and settings for RTCP. | 166 // Add extensions and settings for RTCP. |
167 config->rtp.rtcp_mode = | 167 config->rtp.rtcp_mode = |
168 prng->Rand<bool>() ? RtcpMode::kCompound : RtcpMode::kReducedSize; | 168 prng->Rand<bool>() ? RtcpMode::kCompound : RtcpMode::kReducedSize; |
169 config->rtp.remb = prng->Rand<bool>(); | 169 config->rtp.remb = prng->Rand<bool>(); |
170 config->rtp.rtx_ssrc = prng->Rand<uint32_t>(); | 170 config->rtp.rtx_ssrc = prng->Rand<uint32_t>(); |
171 // Add a map from a payload type to a new payload type for RTX. | 171 // Add a map from a payload type to a new payload type for RTX. |
172 config->rtp.rtx_payload_types.insert( | 172 config->rtp.rtx_payload_types.insert( |
173 std::make_pair(prng->Rand(0, 127), prng->Rand(0, 127))); | 173 std::make_pair(prng->Rand(0, 127), prng->Rand(0, 127))); |
| 174 #if 0 |
174 // Add header extensions. | 175 // Add header extensions. |
175 for (unsigned i = 0; i < kNumExtensions; i++) { | 176 for (unsigned i = 0; i < kNumExtensions; i++) { |
176 if (extensions_bitvector & (1u << i)) { | 177 if (extensions_bitvector & (1u << i)) { |
177 config->rtp.extensions.push_back( | 178 config->rtp.extensions.push_back( |
178 RtpExtension(kExtensionNames[i], prng->Rand<int>())); | 179 RtpExtension(kExtensionNames[i], prng->Rand<int>())); |
179 } | 180 } |
180 } | 181 } |
| 182 #endif |
181 } | 183 } |
182 | 184 |
183 void GenerateVideoSendConfig(uint32_t extensions_bitvector, | 185 void GenerateVideoSendConfig(uint32_t extensions_bitvector, |
184 VideoSendStream::Config* config, | 186 VideoSendStream::Config* config, |
185 Random* prng) { | 187 Random* prng) { |
186 // Create a map from a payload type to an encoder name. | 188 // Create a map from a payload type to an encoder name. |
187 config->encoder_settings.payload_type = prng->Rand(0, 127); | 189 config->encoder_settings.payload_type = prng->Rand(0, 127); |
188 config->encoder_settings.payload_name = (prng->Rand<bool>() ? "VP8" : "H264"); | 190 config->encoder_settings.payload_name = (prng->Rand<bool>() ? "VP8" : "H264"); |
189 // Add SSRCs for the stream. | 191 // Add SSRCs for the stream. |
190 config->rtp.ssrcs.push_back(prng->Rand<uint32_t>()); | 192 config->rtp.ssrcs.push_back(prng->Rand<uint32_t>()); |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 VideoSendConfigReadWriteTest test; | 884 VideoSendConfigReadWriteTest test; |
883 test.DoTest(); | 885 test.DoTest(); |
884 } | 886 } |
885 | 887 |
886 TEST(RtcEventLogTest, LogAudioNetworkAdaptation) { | 888 TEST(RtcEventLogTest, LogAudioNetworkAdaptation) { |
887 AudioNetworkAdaptationReadWriteTest test; | 889 AudioNetworkAdaptationReadWriteTest test; |
888 test.DoTest(); | 890 test.DoTest(); |
889 } | 891 } |
890 | 892 |
891 } // namespace webrtc | 893 } // namespace webrtc |
OLD | NEW |