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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 receive_stream->Start(); | 276 receive_stream->Start(); |
277 | 277 |
278 uint32_t last_time_ms = 0; | 278 uint32_t last_time_ms = 0; |
279 int num_packets = 0; | 279 int num_packets = 0; |
280 std::map<uint32_t, int> unknown_packets; | 280 std::map<uint32_t, int> unknown_packets; |
281 while (true) { | 281 while (true) { |
282 test::RtpPacket packet; | 282 test::RtpPacket packet; |
283 if (!rtp_reader->NextPacket(&packet)) | 283 if (!rtp_reader->NextPacket(&packet)) |
284 break; | 284 break; |
285 ++num_packets; | 285 ++num_packets; |
286 switch (call->Receiver()->DeliverPacket(webrtc::MediaType::ANY, packet.data, | 286 switch (call->Receiver()->DeliverPacket( |
287 packet.length, PacketTime())) { | 287 webrtc::MediaType::VIDEO, packet.data, packet.length, PacketTime())) { |
288 case PacketReceiver::DELIVERY_OK: | 288 case PacketReceiver::DELIVERY_OK: |
289 break; | 289 break; |
290 case PacketReceiver::DELIVERY_UNKNOWN_SSRC: { | 290 case PacketReceiver::DELIVERY_UNKNOWN_SSRC: { |
291 RTPHeader header; | 291 RTPHeader header; |
292 std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); | 292 std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); |
293 parser->Parse(packet.data, packet.length, &header); | 293 parser->Parse(packet.data, packet.length, &header); |
294 if (unknown_packets[header.ssrc] == 0) | 294 if (unknown_packets[header.ssrc] == 0) |
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; |
(...skipping 29 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 |