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_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H | 11 #ifndef WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H |
12 #define WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H | 12 #define WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H |
13 | 13 |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 | 15 |
16 #include <memory> | 16 #include <memory> |
17 #include <string> | 17 #include <string> |
18 | 18 |
| 19 #include "webrtc/base/timeutils.h" |
19 #include "webrtc/modules/audio_device/audio_device_generic.h" | 20 #include "webrtc/modules/audio_device/audio_device_generic.h" |
20 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 21 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
21 #include "webrtc/system_wrappers/include/file_wrapper.h" | 22 #include "webrtc/system_wrappers/include/file_wrapper.h" |
22 #include "webrtc/system_wrappers/include/clock.h" | |
23 | 23 |
24 namespace rtc { | 24 namespace rtc { |
25 class PlatformThread; | 25 class PlatformThread; |
26 } // namespace rtc | 26 } // namespace rtc |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 class EventWrapper; | 29 class EventWrapper; |
30 | 30 |
31 // This is a fake audio device which plays audio from a file as its microphone | 31 // This is a fake audio device which plays audio from a file as its microphone |
32 // and plays out into a file. | 32 // and plays out into a file. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 size_t _recordingBufferSizeIn10MS; | 181 size_t _recordingBufferSizeIn10MS; |
182 size_t _recordingFramesIn10MS; | 182 size_t _recordingFramesIn10MS; |
183 size_t _playoutFramesIn10MS; | 183 size_t _playoutFramesIn10MS; |
184 | 184 |
185 // TODO(pbos): Make plain members instead of pointers and stop resetting them. | 185 // TODO(pbos): Make plain members instead of pointers and stop resetting them. |
186 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec; | 186 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec; |
187 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay; | 187 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay; |
188 | 188 |
189 bool _playing; | 189 bool _playing; |
190 bool _recording; | 190 bool _recording; |
191 uint64_t _lastCallPlayoutMillis; | 191 int64_t _lastCallPlayoutMillis; |
192 uint64_t _lastCallRecordMillis; | 192 int64_t _lastCallRecordMillis; |
193 | 193 |
194 FileWrapper& _outputFile; | 194 FileWrapper& _outputFile; |
195 FileWrapper& _inputFile; | 195 FileWrapper& _inputFile; |
196 std::string _outputFilename; | 196 std::string _outputFilename; |
197 std::string _inputFilename; | 197 std::string _inputFilename; |
198 | |
199 Clock* _clock; | |
200 }; | 198 }; |
201 | 199 |
202 } // namespace webrtc | 200 } // namespace webrtc |
203 | 201 |
204 #endif // WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H | 202 #endif // WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H |
OLD | NEW |