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 |
11 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" | 11 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <string.h> | 14 #include <string.h> |
15 #ifdef WIN32 | 15 #ifdef WIN32 |
16 #include <winsock2.h> | 16 #include <winsock2.h> |
17 #else | 17 #else |
18 #include <netinet/in.h> | 18 #include <netinet/in.h> |
19 #endif | 19 #endif |
20 | 20 |
21 #include <memory> | 21 #include <memory> |
22 | 22 |
| 23 #include "webrtc/base/checks.h" |
23 #include "webrtc/modules/audio_coding/neteq/tools/packet.h" | 24 #include "webrtc/modules/audio_coding/neteq/tools/packet.h" |
24 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 25 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
25 #include "webrtc/rtc_base/checks.h" | |
26 #include "webrtc/test/rtp_file_reader.h" | 26 #include "webrtc/test/rtp_file_reader.h" |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 namespace test { | 29 namespace test { |
30 | 30 |
31 RtpFileSource* RtpFileSource::Create(const std::string& file_name) { | 31 RtpFileSource* RtpFileSource::Create(const std::string& file_name) { |
32 RtpFileSource* source = new RtpFileSource(); | 32 RtpFileSource* source = new RtpFileSource(); |
33 RTC_CHECK(source->OpenFile(file_name)); | 33 RTC_CHECK(source->OpenFile(file_name)); |
34 return source; | 34 return source; |
35 } | 35 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 rtp_reader_.reset(RtpFileReader::Create(RtpFileReader::kPcap, file_name)); | 94 rtp_reader_.reset(RtpFileReader::Create(RtpFileReader::kPcap, file_name)); |
95 if (!rtp_reader_) { | 95 if (!rtp_reader_) { |
96 FATAL() << "Couldn't open input file as either a rtpdump or .pcap. Note " | 96 FATAL() << "Couldn't open input file as either a rtpdump or .pcap. Note " |
97 "that .pcapng is not supported."; | 97 "that .pcapng is not supported."; |
98 } | 98 } |
99 return true; | 99 return true; |
100 } | 100 } |
101 | 101 |
102 } // namespace test | 102 } // namespace test |
103 } // namespace webrtc | 103 } // namespace webrtc |
OLD | NEW |