OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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/voice_engine/file_recorder.h" | 11 #include "webrtc/voice_engine/file_recorder.h" |
12 | 12 |
13 #include <list> | 13 #include <list> |
14 | 14 |
| 15 #include "webrtc/base/logging.h" |
15 #include "webrtc/base/platform_thread.h" | 16 #include "webrtc/base/platform_thread.h" |
16 #include "webrtc/common_audio/resampler/include/resampler.h" | 17 #include "webrtc/common_audio/resampler/include/resampler.h" |
17 #include "webrtc/common_types.h" | 18 #include "webrtc/common_types.h" |
18 #include "webrtc/modules/include/module_common_types.h" | 19 #include "webrtc/modules/include/module_common_types.h" |
19 #include "webrtc/modules/media_file/media_file.h" | 20 #include "webrtc/modules/media_file/media_file.h" |
20 #include "webrtc/modules/media_file/media_file_defines.h" | 21 #include "webrtc/modules/media_file/media_file_defines.h" |
21 #include "webrtc/system_wrappers/include/event_wrapper.h" | 22 #include "webrtc/system_wrappers/include/event_wrapper.h" |
22 #include "webrtc/system_wrappers/include/logging.h" | |
23 #include "webrtc/typedefs.h" | 23 #include "webrtc/typedefs.h" |
24 #include "webrtc/voice_engine/coder.h" | 24 #include "webrtc/voice_engine/coder.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // The largest decoded frame size in samples (60ms with 32kHz sample rate). | 30 // The largest decoded frame size in samples (60ms with 32kHz sample rate). |
31 enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60 * 32 }; | 31 enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60 * 32 }; |
32 enum { MAX_AUDIO_BUFFER_IN_BYTES = MAX_AUDIO_BUFFER_IN_SAMPLES * 2 }; | 32 enum { MAX_AUDIO_BUFFER_IN_BYTES = MAX_AUDIO_BUFFER_IN_SAMPLES * 2 }; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } // namespace | 251 } // namespace |
252 | 252 |
253 std::unique_ptr<FileRecorder> FileRecorder::CreateFileRecorder( | 253 std::unique_ptr<FileRecorder> FileRecorder::CreateFileRecorder( |
254 uint32_t instanceID, | 254 uint32_t instanceID, |
255 FileFormats fileFormat) { | 255 FileFormats fileFormat) { |
256 return std::unique_ptr<FileRecorder>( | 256 return std::unique_ptr<FileRecorder>( |
257 new FileRecorderImpl(instanceID, fileFormat)); | 257 new FileRecorderImpl(instanceID, fileFormat)); |
258 } | 258 } |
259 | 259 |
260 } // namespace webrtc | 260 } // namespace webrtc |
OLD | NEW |