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

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

Issue 2067673004: Style cleanups in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 4 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 | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_payload_registry.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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 for (unsigned i = 0; i < kNumExtensions; i++) { 137 for (unsigned i = 0; i < kNumExtensions; i++) {
138 if (extensions_bitvector & (1u << i)) { 138 if (extensions_bitvector & (1u << i)) {
139 rtp_sender.RegisterRtpHeaderExtension(kExtensionTypes[i], i + 1); 139 rtp_sender.RegisterRtpHeaderExtension(kExtensionTypes[i], i + 1);
140 } 140 }
141 } 141 }
142 142
143 int8_t payload_type = prng->Rand(0, 127); 143 int8_t payload_type = prng->Rand(0, 127);
144 bool marker_bit = prng->Rand<bool>(); 144 bool marker_bit = prng->Rand<bool>();
145 uint32_t capture_timestamp = prng->Rand<uint32_t>(); 145 uint32_t capture_timestamp = prng->Rand<uint32_t>();
146 int64_t capture_time_ms = prng->Rand<uint32_t>(); 146 int64_t capture_time_ms = prng->Rand<uint32_t>();
147 bool timestamp_provided = prng->Rand<bool>();
148 bool inc_sequence_number = prng->Rand<bool>();
149 147
150 size_t header_size = rtp_sender.BuildRTPheader( 148 size_t header_size = rtp_sender.BuildRtpHeader(
151 packet, payload_type, marker_bit, capture_timestamp, capture_time_ms, 149 packet, payload_type, marker_bit, capture_timestamp, capture_time_ms);
152 timestamp_provided, inc_sequence_number);
153
154 for (size_t i = header_size; i < packet_size; i++) { 150 for (size_t i = header_size; i < packet_size; i++) {
155 packet[i] = prng->Rand<uint8_t>(); 151 packet[i] = prng->Rand<uint8_t>();
156 } 152 }
157 153
158 return header_size; 154 return header_size;
159 } 155 }
160 156
161 rtc::Buffer GenerateRtcpPacket(Random* prng) { 157 rtc::Buffer GenerateRtcpPacket(Random* prng) {
162 rtcp::ReportBlock report_block; 158 rtcp::ReportBlock report_block;
163 report_block.To(prng->Rand<uint32_t>()); // Remote SSRC. 159 report_block.To(prng->Rand<uint32_t>()); // Remote SSRC.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 rtcp_packet.size()); 468 rtcp_packet.size());
473 469
474 RtcEventLogTestHelper::VerifyLogEndEvent(parsed_log, 3); 470 RtcEventLogTestHelper::VerifyLogEndEvent(parsed_log, 3);
475 471
476 // Clean up temporary file - can be pretty slow. 472 // Clean up temporary file - can be pretty slow.
477 remove(temp_filename.c_str()); 473 remove(temp_filename.c_str());
478 } 474 }
479 } // namespace webrtc 475 } // namespace webrtc
480 476
481 #endif // ENABLE_RTC_EVENT_LOG 477 #endif // ENABLE_RTC_EVENT_LOG
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698