| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 packet->length = len; | 197 packet->length = len; |
| 198 packet->original_length = plen; | 198 packet->original_length = plen; |
| 199 packet->time_ms = offset; | 199 packet->time_ms = offset; |
| 200 return true; | 200 return true; |
| 201 } | 201 } |
| 202 | 202 |
| 203 private: | 203 private: |
| 204 FILE* file_; | 204 FILE* file_; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(RtpDumpReader); | 206 RTC_DISALLOW_COPY_AND_ASSIGN(RtpDumpReader); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 enum { | 209 enum { |
| 210 kResultFail = -1, | 210 kResultFail = -1, |
| 211 kResultSuccess = 0, | 211 kResultSuccess = 0, |
| 212 kResultSkip = 1, | 212 kResultSkip = 1, |
| 213 | 213 |
| 214 kPcapVersionMajor = 2, | 214 kPcapVersionMajor = 2, |
| 215 kPcapVersionMinor = 4, | 215 kPcapVersionMinor = 4, |
| 216 kLinktypeNull = 0, | 216 kLinktypeNull = 0, |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 633 |
| 634 FILE* file_; | 634 FILE* file_; |
| 635 bool swap_pcap_byte_order_; | 635 bool swap_pcap_byte_order_; |
| 636 const bool swap_network_byte_order_; | 636 const bool swap_network_byte_order_; |
| 637 uint8_t read_buffer_[kMaxReadBufferSize]; | 637 uint8_t read_buffer_[kMaxReadBufferSize]; |
| 638 | 638 |
| 639 SsrcMap packets_by_ssrc_; | 639 SsrcMap packets_by_ssrc_; |
| 640 std::vector<RtpPacketMarker> packets_; | 640 std::vector<RtpPacketMarker> packets_; |
| 641 PacketIterator next_packet_it_; | 641 PacketIterator next_packet_it_; |
| 642 | 642 |
| 643 DISALLOW_COPY_AND_ASSIGN(PcapReader); | 643 RTC_DISALLOW_COPY_AND_ASSIGN(PcapReader); |
| 644 }; | 644 }; |
| 645 | 645 |
| 646 RtpFileReader* RtpFileReader::Create(FileFormat format, | 646 RtpFileReader* RtpFileReader::Create(FileFormat format, |
| 647 const std::string& filename, | 647 const std::string& filename, |
| 648 const std::set<uint32_t>& ssrc_filter) { | 648 const std::set<uint32_t>& ssrc_filter) { |
| 649 RtpFileReaderImpl* reader = NULL; | 649 RtpFileReaderImpl* reader = NULL; |
| 650 switch (format) { | 650 switch (format) { |
| 651 case kPcap: | 651 case kPcap: |
| 652 reader = new PcapReader(); | 652 reader = new PcapReader(); |
| 653 break; | 653 break; |
| (...skipping 11 matching lines...) Expand all 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 |