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 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_FILE_SOURCE_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_FILE_SOURCE_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_FILE_SOURCE_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_FILE_SOURCE_H_ |
13 | 13 |
14 #include <stdio.h> | 14 #include <stdio.h> |
| 15 |
| 16 #include <memory> |
15 #include <string> | 17 #include <string> |
16 | 18 |
17 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
18 #include "webrtc/base/scoped_ptr.h" | |
19 #include "webrtc/common_types.h" | 20 #include "webrtc/common_types.h" |
20 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h" | 21 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h" |
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 | 25 |
25 class RtpHeaderParser; | 26 class RtpHeaderParser; |
26 | 27 |
27 namespace test { | 28 namespace test { |
28 | 29 |
(...skipping 20 matching lines...) Expand all Loading... |
49 | 50 |
50 private: | 51 private: |
51 static const int kFirstLineLength = 40; | 52 static const int kFirstLineLength = 40; |
52 static const int kRtpFileHeaderSize = 4 + 4 + 4 + 2 + 2; | 53 static const int kRtpFileHeaderSize = 4 + 4 + 4 + 2 + 2; |
53 static const size_t kPacketHeaderSize = 8; | 54 static const size_t kPacketHeaderSize = 8; |
54 | 55 |
55 RtpFileSource(); | 56 RtpFileSource(); |
56 | 57 |
57 bool OpenFile(const std::string& file_name); | 58 bool OpenFile(const std::string& file_name); |
58 | 59 |
59 rtc::scoped_ptr<RtpFileReader> rtp_reader_; | 60 std::unique_ptr<RtpFileReader> rtp_reader_; |
60 rtc::scoped_ptr<RtpHeaderParser> parser_; | 61 std::unique_ptr<RtpHeaderParser> parser_; |
61 | 62 |
62 RTC_DISALLOW_COPY_AND_ASSIGN(RtpFileSource); | 63 RTC_DISALLOW_COPY_AND_ASSIGN(RtpFileSource); |
63 }; | 64 }; |
64 | 65 |
65 } // namespace test | 66 } // namespace test |
66 } // namespace webrtc | 67 } // namespace webrtc |
67 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_FILE_SOURCE_H_ | 68 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_RTP_FILE_SOURCE_H_ |
OLD | NEW |