| 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 // This file contains a class that can write audio to file in | 11 // This file contains a class that can write audio to file in |
| 12 // multiple file formats. The unencoded input data is written to file in the | 12 // multiple file formats. The unencoded input data is written to file in the |
| 13 // encoded format specified. | 13 // encoded format specified. |
| 14 | 14 |
| 15 #ifndef WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ | 15 #ifndef WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_ |
| 16 #define WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ | 16 #define WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_ |
| 17 | 17 |
| 18 #include <list> | 18 #include <list> |
| 19 | 19 |
| 20 #include "webrtc/base/platform_thread.h" | 20 #include "webrtc/base/platform_thread.h" |
| 21 #include "webrtc/common_audio/resampler/include/resampler.h" | 21 #include "webrtc/common_audio/resampler/include/resampler.h" |
| 22 #include "webrtc/common_types.h" | 22 #include "webrtc/common_types.h" |
| 23 #include "webrtc/engine_configurations.h" | 23 #include "webrtc/engine_configurations.h" |
| 24 #include "webrtc/modules/include/module_common_types.h" | 24 #include "webrtc/modules/include/module_common_types.h" |
| 25 #include "webrtc/modules/media_file/media_file.h" | 25 #include "webrtc/modules/media_file/media_file.h" |
| 26 #include "webrtc/modules/media_file/media_file_defines.h" | 26 #include "webrtc/modules/media_file/media_file_defines.h" |
| 27 #include "webrtc/modules/utility/include/file_recorder.h" | |
| 28 #include "webrtc/modules/utility/source/coder.h" | |
| 29 #include "webrtc/system_wrappers/include/event_wrapper.h" | 27 #include "webrtc/system_wrappers/include/event_wrapper.h" |
| 30 #include "webrtc/typedefs.h" | 28 #include "webrtc/typedefs.h" |
| 29 #include "webrtc/voice_engine/coder.h" |
| 30 #include "webrtc/voice_engine/file_recorder.h" |
| 31 | 31 |
| 32 namespace webrtc { | 32 namespace webrtc { |
| 33 // The largest decoded frame size in samples (60ms with 32kHz sample rate). | 33 // The largest decoded frame size in samples (60ms with 32kHz sample rate). |
| 34 enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60*32}; | 34 enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60*32}; |
| 35 enum { MAX_AUDIO_BUFFER_IN_BYTES = MAX_AUDIO_BUFFER_IN_SAMPLES*2}; | 35 enum { MAX_AUDIO_BUFFER_IN_BYTES = MAX_AUDIO_BUFFER_IN_SAMPLES*2}; |
| 36 enum { kMaxAudioBufferQueueLength = 100 }; | 36 enum { kMaxAudioBufferQueueLength = 100 }; |
| 37 | 37 |
| 38 class CriticalSectionWrapper; | 38 class CriticalSectionWrapper; |
| 39 | 39 |
| 40 class FileRecorderImpl : public FileRecorder | 40 class FileRecorderImpl : public FileRecorder |
| (...skipping 28 matching lines...) Expand all Loading... |
| 69 FileFormats _fileFormat; | 69 FileFormats _fileFormat; |
| 70 MediaFile* _moduleFile; | 70 MediaFile* _moduleFile; |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 CodecInst codec_info_; | 73 CodecInst codec_info_; |
| 74 int8_t _audioBuffer[MAX_AUDIO_BUFFER_IN_BYTES]; | 74 int8_t _audioBuffer[MAX_AUDIO_BUFFER_IN_BYTES]; |
| 75 AudioCoder _audioEncoder; | 75 AudioCoder _audioEncoder; |
| 76 Resampler _audioResampler; | 76 Resampler _audioResampler; |
| 77 }; | 77 }; |
| 78 } // namespace webrtc | 78 } // namespace webrtc |
| 79 #endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ | 79 |
| 80 #endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_ |
| OLD | NEW |