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

Side by Side Diff: webrtc/call/rtc_event_log_unittest.cc

Issue 1373903003: Unify newapi::RtcpMode and RTCPMethod. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: ehm, compile the code Created 5 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
« no previous file with comments | « webrtc/call/rtc_event_log.cc ('k') | webrtc/common_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 ASSERT_EQ(rtclog::Event::VIDEO_RECEIVER_CONFIG_EVENT, event.type()); 122 ASSERT_EQ(rtclog::Event::VIDEO_RECEIVER_CONFIG_EVENT, event.type());
123 const rtclog::VideoReceiveConfig& receiver_config = 123 const rtclog::VideoReceiveConfig& receiver_config =
124 event.video_receiver_config(); 124 event.video_receiver_config();
125 // Check SSRCs. 125 // Check SSRCs.
126 ASSERT_TRUE(receiver_config.has_remote_ssrc()); 126 ASSERT_TRUE(receiver_config.has_remote_ssrc());
127 EXPECT_EQ(config.rtp.remote_ssrc, receiver_config.remote_ssrc()); 127 EXPECT_EQ(config.rtp.remote_ssrc, receiver_config.remote_ssrc());
128 ASSERT_TRUE(receiver_config.has_local_ssrc()); 128 ASSERT_TRUE(receiver_config.has_local_ssrc());
129 EXPECT_EQ(config.rtp.local_ssrc, receiver_config.local_ssrc()); 129 EXPECT_EQ(config.rtp.local_ssrc, receiver_config.local_ssrc());
130 // Check RTCP settings. 130 // Check RTCP settings.
131 ASSERT_TRUE(receiver_config.has_rtcp_mode()); 131 ASSERT_TRUE(receiver_config.has_rtcp_mode());
132 if (config.rtp.rtcp_mode == newapi::kRtcpCompound) 132 if (config.rtp.rtcp_mode == RtcpMode::kCompound)
133 EXPECT_EQ(rtclog::VideoReceiveConfig::RTCP_COMPOUND, 133 EXPECT_EQ(rtclog::VideoReceiveConfig::RTCP_COMPOUND,
134 receiver_config.rtcp_mode()); 134 receiver_config.rtcp_mode());
135 else 135 else
136 EXPECT_EQ(rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE, 136 EXPECT_EQ(rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE,
137 receiver_config.rtcp_mode()); 137 receiver_config.rtcp_mode());
138 ASSERT_TRUE(receiver_config.has_receiver_reference_time_report()); 138 ASSERT_TRUE(receiver_config.has_receiver_reference_time_report());
139 EXPECT_EQ(config.rtp.rtcp_xr.receiver_reference_time_report, 139 EXPECT_EQ(config.rtp.rtcp_xr.receiver_reference_time_report,
140 receiver_config.receiver_reference_time_report()); 140 receiver_config.receiver_reference_time_report());
141 ASSERT_TRUE(receiver_config.has_remb()); 141 ASSERT_TRUE(receiver_config.has_remb());
142 EXPECT_EQ(config.rtp.remb, receiver_config.remb()); 142 EXPECT_EQ(config.rtp.remb, receiver_config.remb());
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 VideoReceiveStream::Config* config) { 349 VideoReceiveStream::Config* config) {
350 // Create a map from a payload type to an encoder name. 350 // Create a map from a payload type to an encoder name.
351 VideoReceiveStream::Decoder decoder; 351 VideoReceiveStream::Decoder decoder;
352 decoder.payload_type = rand(); 352 decoder.payload_type = rand();
353 decoder.payload_name = (rand() % 2 ? "VP8" : "H264"); 353 decoder.payload_name = (rand() % 2 ? "VP8" : "H264");
354 config->decoders.push_back(decoder); 354 config->decoders.push_back(decoder);
355 // Add SSRCs for the stream. 355 // Add SSRCs for the stream.
356 config->rtp.remote_ssrc = rand(); 356 config->rtp.remote_ssrc = rand();
357 config->rtp.local_ssrc = rand(); 357 config->rtp.local_ssrc = rand();
358 // Add extensions and settings for RTCP. 358 // Add extensions and settings for RTCP.
359 config->rtp.rtcp_mode = rand() % 2 ? newapi::kRtcpCompound 359 config->rtp.rtcp_mode =
360 : newapi::kRtcpReducedSize; 360 rand() % 2 ? RtcpMode::kCompound : RtcpMode::kReducedSize;
361 config->rtp.rtcp_xr.receiver_reference_time_report = (rand() % 2 == 1); 361 config->rtp.rtcp_xr.receiver_reference_time_report = (rand() % 2 == 1);
362 config->rtp.remb = (rand() % 2 == 1); 362 config->rtp.remb = (rand() % 2 == 1);
363 // Add a map from a payload type to a new ssrc and a new payload type for RTX. 363 // Add a map from a payload type to a new ssrc and a new payload type for RTX.
364 VideoReceiveStream::Config::Rtp::Rtx rtx_pair; 364 VideoReceiveStream::Config::Rtp::Rtx rtx_pair;
365 rtx_pair.ssrc = rand(); 365 rtx_pair.ssrc = rand();
366 rtx_pair.payload_type = rand(); 366 rtx_pair.payload_type = rand();
367 config->rtp.rtx.insert(std::make_pair(rand(), rtx_pair)); 367 config->rtp.rtx.insert(std::make_pair(rand(), rtx_pair));
368 // Add header extensions. 368 // Add header extensions.
369 for (unsigned i = 0; i < kNumExtensions; i++) { 369 for (unsigned i = 0; i < kNumExtensions; i++) {
370 if (extensions_bitvector & (1u << i)) { 370 if (extensions_bitvector & (1u << i)) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 extensions, // Bit vector choosing extensions 545 extensions, // Bit vector choosing extensions
546 csrcs_count, // Number of contributing sources 546 csrcs_count, // Number of contributing sources
547 rand()); 547 rand());
548 } 548 }
549 } 549 }
550 } 550 }
551 551
552 } // namespace webrtc 552 } // namespace webrtc
553 553
554 #endif // ENABLE_RTC_EVENT_LOG 554 #endif // ENABLE_RTC_EVENT_LOG
OLDNEW
« no previous file with comments | « webrtc/call/rtc_event_log.cc ('k') | webrtc/common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698