| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc); | 295 fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc); |
| 296 ++unknown_packets[header.ssrc]; | 296 ++unknown_packets[header.ssrc]; |
| 297 break; | 297 break; |
| 298 } | 298 } |
| 299 case PacketReceiver::DELIVERY_PACKET_ERROR: { | 299 case PacketReceiver::DELIVERY_PACKET_ERROR: { |
| 300 fprintf(stderr, "Packet error, corrupt packets or incorrect setup?\n"); | 300 fprintf(stderr, "Packet error, corrupt packets or incorrect setup?\n"); |
| 301 RTPHeader header; | 301 RTPHeader header; |
| 302 std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); | 302 std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); |
| 303 parser->Parse(packet.data, packet.length, &header); | 303 parser->Parse(packet.data, packet.length, &header); |
| 304 fprintf(stderr, "Packet len=%zu pt=%u seq=%u ts=%u ssrc=0x%8x\n", | 304 fprintf(stderr, "Packet len=%zu pt=%u seq=%u ts=%u ssrc=0x%8x\n", |
| 305 packet.length, header.payloadType, header.sequenceNumber, | 305 packet.length, header.payloadType, header.sequenceNumber, |
| 306 header.timestamp, header.ssrc); | 306 header.timestamp, header.ssrc); |
| 307 break; | 307 break; |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 if (last_time_ms != 0 && last_time_ms != packet.time_ms) { | 310 if (last_time_ms != 0 && last_time_ms != packet.time_ms) { |
| 311 SleepMs(packet.time_ms - last_time_ms); | 311 SleepMs(packet.time_ms - last_time_ms); |
| 312 } | 312 } |
| 313 last_time_ms = packet.time_ms; | 313 last_time_ms = packet.time_ms; |
| 314 } | 314 } |
| 315 fprintf(stderr, "num_packets: %d\n", num_packets); | 315 fprintf(stderr, "num_packets: %d\n", num_packets); |
| 316 | 316 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 327 } | 327 } |
| 328 } // namespace webrtc | 328 } // namespace webrtc |
| 329 | 329 |
| 330 int main(int argc, char* argv[]) { | 330 int main(int argc, char* argv[]) { |
| 331 ::testing::InitGoogleTest(&argc, argv); | 331 ::testing::InitGoogleTest(&argc, argv); |
| 332 google::ParseCommandLineFlags(&argc, &argv, true); | 332 google::ParseCommandLineFlags(&argc, &argv, true); |
| 333 | 333 |
| 334 webrtc::test::RunTest(webrtc::RtpReplay); | 334 webrtc::test::RunTest(webrtc::RtpReplay); |
| 335 return 0; | 335 return 0; |
| 336 } | 336 } |
| OLD | NEW |