| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 for (unsigned i = 0; i < kNumExtensions; i++) { | 136 for (unsigned i = 0; i < kNumExtensions; i++) { |
| 137 if (extensions_bitvector & (1u << i)) { | 137 if (extensions_bitvector & (1u << i)) { |
| 138 rtp_sender.RegisterRtpHeaderExtension(kExtensionTypes[i], i + 1); | 138 rtp_sender.RegisterRtpHeaderExtension(kExtensionTypes[i], i + 1); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 int8_t payload_type = prng->Rand(0, 127); | 142 int8_t payload_type = prng->Rand(0, 127); |
| 143 bool marker_bit = prng->Rand<bool>(); | 143 bool marker_bit = prng->Rand<bool>(); |
| 144 uint32_t capture_timestamp = prng->Rand<uint32_t>(); | 144 uint32_t capture_timestamp = prng->Rand<uint32_t>(); |
| 145 int64_t capture_time_ms = prng->Rand<uint32_t>(); | 145 int64_t capture_time_ms = prng->Rand<uint32_t>(); |
| 146 bool timestamp_provided = prng->Rand<bool>(); | |
| 147 bool inc_sequence_number = prng->Rand<bool>(); | |
| 148 | 146 |
| 149 size_t header_size = rtp_sender.BuildRTPheader( | 147 size_t header_size = rtp_sender.BuildRtpHeader( |
| 150 packet, payload_type, marker_bit, capture_timestamp, capture_time_ms, | 148 packet, payload_type, marker_bit, capture_timestamp, capture_time_ms); |
| 151 timestamp_provided, inc_sequence_number); | |
| 152 | |
| 153 for (size_t i = header_size; i < packet_size; i++) { | 149 for (size_t i = header_size; i < packet_size; i++) { |
| 154 packet[i] = prng->Rand<uint8_t>(); | 150 packet[i] = prng->Rand<uint8_t>(); |
| 155 } | 151 } |
| 156 | 152 |
| 157 return header_size; | 153 return header_size; |
| 158 } | 154 } |
| 159 | 155 |
| 160 rtc::Buffer GenerateRtcpPacket(Random* prng) { | 156 rtc::Buffer GenerateRtcpPacket(Random* prng) { |
| 161 rtcp::ReportBlock report_block; | 157 rtcp::ReportBlock report_block; |
| 162 report_block.To(prng->Rand<uint32_t>()); // Remote SSRC. | 158 report_block.To(prng->Rand<uint32_t>()); // Remote SSRC. |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 rtcp_packet.size()); | 467 rtcp_packet.size()); |
| 472 | 468 |
| 473 RtcEventLogTestHelper::VerifyLogEndEvent(parsed_log, 3); | 469 RtcEventLogTestHelper::VerifyLogEndEvent(parsed_log, 3); |
| 474 | 470 |
| 475 // Clean up temporary file - can be pretty slow. | 471 // Clean up temporary file - can be pretty slow. |
| 476 remove(temp_filename.c_str()); | 472 remove(temp_filename.c_str()); |
| 477 } | 473 } |
| 478 } // namespace webrtc | 474 } // namespace webrtc |
| 479 | 475 |
| 480 #endif // ENABLE_RTC_EVENT_LOG | 476 #endif // ENABLE_RTC_EVENT_LOG |
| OLD | NEW |