| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 printf("Packet too large!\n"); | 451 printf("Packet too large!\n"); |
| 452 return kResultFail; | 452 return kResultFail; |
| 453 } | 453 } |
| 454 TRY_PCAP(Read(read_buffer_, marker.payload_length)); | 454 TRY_PCAP(Read(read_buffer_, marker.payload_length)); |
| 455 | 455 |
| 456 RtpUtility::RtpHeaderParser rtp_parser(read_buffer_, marker.payload_length); | 456 RtpUtility::RtpHeaderParser rtp_parser(read_buffer_, marker.payload_length); |
| 457 if (rtp_parser.RTCP()) { | 457 if (rtp_parser.RTCP()) { |
| 458 rtp_parser.ParseRtcp(&marker.rtp_header); | 458 rtp_parser.ParseRtcp(&marker.rtp_header); |
| 459 packets_.push_back(marker); | 459 packets_.push_back(marker); |
| 460 } else { | 460 } else { |
| 461 if (!rtp_parser.Parse(marker.rtp_header, NULL)) { | 461 if (!rtp_parser.Parse(&marker.rtp_header, nullptr)) { |
| 462 DEBUG_LOG("Not recognized as RTP/RTCP"); | 462 DEBUG_LOG("Not recognized as RTP/RTCP"); |
| 463 return kResultSkip; | 463 return kResultSkip; |
| 464 } | 464 } |
| 465 | 465 |
| 466 uint32_t ssrc = marker.rtp_header.ssrc; | 466 uint32_t ssrc = marker.rtp_header.ssrc; |
| 467 if (ssrc_filter.empty() || ssrc_filter.find(ssrc) != ssrc_filter.end()) { | 467 if (ssrc_filter.empty() || ssrc_filter.find(ssrc) != ssrc_filter.end()) { |
| 468 packets_by_ssrc_[ssrc].push_back( | 468 packets_by_ssrc_[ssrc].push_back( |
| 469 static_cast<uint32_t>(packets_.size())); | 469 static_cast<uint32_t>(packets_.size())); |
| 470 packets_.push_back(marker); | 470 packets_.push_back(marker); |
| 471 } else { | 471 } else { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 return reader; | 665 return reader; |
| 666 } | 666 } |
| 667 | 667 |
| 668 RtpFileReader* RtpFileReader::Create(FileFormat format, | 668 RtpFileReader* RtpFileReader::Create(FileFormat format, |
| 669 const std::string& filename) { | 669 const std::string& filename) { |
| 670 return RtpFileReader::Create(format, filename, std::set<uint32_t>()); | 670 return RtpFileReader::Create(format, filename, std::set<uint32_t>()); |
| 671 } | 671 } |
| 672 | 672 |
| 673 } // namespace test | 673 } // namespace test |
| 674 } // namespace webrtc | 674 } // namespace webrtc |
| OLD | NEW |