Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: logging/rtc_event_log/rtc_event_log_unittest.cc

Issue 2826263004: Move responsibility for RTP header extensions on video receive. (Closed)
Patch Set: Crude rebase. Created 3 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Add SSRCs for the stream. 159 // Add SSRCs for the stream.
160 config->remote_ssrc = prng->Rand<uint32_t>(); 160 config->remote_ssrc = prng->Rand<uint32_t>();
161 config->local_ssrc = prng->Rand<uint32_t>(); 161 config->local_ssrc = prng->Rand<uint32_t>();
162 // Add extensions and settings for RTCP. 162 // Add extensions and settings for RTCP.
163 config->rtcp_mode = 163 config->rtcp_mode =
164 prng->Rand<bool>() ? RtcpMode::kCompound : RtcpMode::kReducedSize; 164 prng->Rand<bool>() ? RtcpMode::kCompound : RtcpMode::kReducedSize;
165 config->remb = prng->Rand<bool>(); 165 config->remb = prng->Rand<bool>();
166 config->rtx_ssrc = prng->Rand<uint32_t>(); 166 config->rtx_ssrc = prng->Rand<uint32_t>();
167 config->codecs.emplace_back(prng->Rand<bool>() ? "VP8" : "H264", 167 config->codecs.emplace_back(prng->Rand<bool>() ? "VP8" : "H264",
168 prng->Rand(1, 127), prng->Rand(1, 127)); 168 prng->Rand(1, 127), prng->Rand(1, 127));
169 #if 0
169 // Add header extensions. 170 // Add header extensions.
170 for (unsigned i = 0; i < kNumExtensions; i++) { 171 for (unsigned i = 0; i < kNumExtensions; i++) {
171 if (extensions_bitvector & (1u << i)) { 172 if (extensions_bitvector & (1u << i)) {
172 config->rtp_extensions.emplace_back(kExtensionNames[i], 173 config->rtp_extensions.emplace_back(kExtensionNames[i],
173 prng->Rand<int>()); 174 prng->Rand<int>());
174 } 175 }
175 } 176 }
177 #endif
176 } 178 }
177 179
178 void GenerateVideoSendConfig(uint32_t extensions_bitvector, 180 void GenerateVideoSendConfig(uint32_t extensions_bitvector,
179 rtclog::StreamConfig* config, 181 rtclog::StreamConfig* config,
180 Random* prng) { 182 Random* prng) {
181 config->codecs.emplace_back(prng->Rand<bool>() ? "VP8" : "H264", 183 config->codecs.emplace_back(prng->Rand<bool>() ? "VP8" : "H264",
182 prng->Rand(1, 127), prng->Rand(1, 127)); 184 prng->Rand(1, 127), prng->Rand(1, 127));
183 config->local_ssrc = prng->Rand<uint32_t>(); 185 config->local_ssrc = prng->Rand<uint32_t>();
184 config->rtx_ssrc = prng->Rand<uint32_t>(); 186 config->rtx_ssrc = prng->Rand<uint32_t>();
185 // Add header extensions. 187 // Add header extensions.
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 VideoSendConfigReadWriteTest test; 870 VideoSendConfigReadWriteTest test;
869 test.DoTest(); 871 test.DoTest();
870 } 872 }
871 873
872 TEST(RtcEventLogTest, LogAudioNetworkAdaptation) { 874 TEST(RtcEventLogTest, LogAudioNetworkAdaptation) {
873 AudioNetworkAdaptationReadWriteTest test; 875 AudioNetworkAdaptationReadWriteTest test;
874 test.DoTest(); 876 test.DoTest();
875 } 877 }
876 878
877 } // namespace webrtc 879 } // namespace webrtc
OLDNEW
« no previous file with comments | « logging/rtc_event_log/rtc_event_log_parser.cc ('k') | logging/rtc_event_log/rtc_event_log_unittest_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698