Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: webrtc/modules/utility/source/file_recorder_impl.h

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 and/or video to file in 11 // This file contains a class that can write audio and/or video 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_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_
16 #define WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ 16 #define WEBRTC_MODULES_UTILITY_SOURCE_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" 27 #include "webrtc/modules/utility/include/file_recorder.h"
28 #include "webrtc/modules/utility/source/coder.h" 28 #include "webrtc/modules/utility/source/coder.h"
29 #include "webrtc/system_wrappers/include/event_wrapper.h" 29 #include "webrtc/system_wrappers/include/event_wrapper.h"
30 #include "webrtc/system_wrappers/include/tick_util.h"
31 #include "webrtc/typedefs.h" 30 #include "webrtc/typedefs.h"
32 31
33 namespace webrtc { 32 namespace webrtc {
34 // 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).
35 enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60*32}; 34 enum { MAX_AUDIO_BUFFER_IN_SAMPLES = 60*32};
36 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};
37 enum { kMaxAudioBufferQueueLength = 100 }; 36 enum { kMaxAudioBufferQueueLength = 100 };
38 37
39 class CriticalSectionWrapper; 38 class CriticalSectionWrapper;
40 39
(...skipping 10 matching lines...) Expand all
51 const char* fileName, 50 const char* fileName,
52 const CodecInst& codecInst, 51 const CodecInst& codecInst,
53 uint32_t notificationTimeMs) override; 52 uint32_t notificationTimeMs) override;
54 int32_t StartRecordingAudioFile( 53 int32_t StartRecordingAudioFile(
55 OutStream& destStream, 54 OutStream& destStream,
56 const CodecInst& codecInst, 55 const CodecInst& codecInst,
57 uint32_t notificationTimeMs) override; 56 uint32_t notificationTimeMs) override;
58 int32_t StopRecording() override; 57 int32_t StopRecording() override;
59 bool IsRecording() const override; 58 bool IsRecording() const override;
60 int32_t codec_info(CodecInst& codecInst) const override; 59 int32_t codec_info(CodecInst& codecInst) const override;
61 int32_t RecordAudioToFile( 60 int32_t RecordAudioToFile(const AudioFrame& frame) override;
62 const AudioFrame& frame,
63 const TickTime* playoutTS = NULL) override;
64 int32_t StartRecordingVideoFile( 61 int32_t StartRecordingVideoFile(
65 const char* fileName, 62 const char* fileName,
66 const CodecInst& audioCodecInst, 63 const CodecInst& audioCodecInst,
67 const VideoCodec& videoCodecInst, 64 const VideoCodec& videoCodecInst,
68 bool videoOnly = false) override 65 bool videoOnly = false) override
69 { 66 {
70 return -1; 67 return -1;
71 } 68 }
72 int32_t RecordVideoToFile(const VideoFrame& videoFrame) override { 69 int32_t RecordVideoToFile(const VideoFrame& videoFrame) override {
73 return -1; 70 return -1;
(...skipping 10 matching lines...) Expand all
84 MediaFile* _moduleFile; 81 MediaFile* _moduleFile;
85 82
86 private: 83 private:
87 CodecInst codec_info_; 84 CodecInst codec_info_;
88 int8_t _audioBuffer[MAX_AUDIO_BUFFER_IN_BYTES]; 85 int8_t _audioBuffer[MAX_AUDIO_BUFFER_IN_BYTES];
89 AudioCoder _audioEncoder; 86 AudioCoder _audioEncoder;
90 Resampler _audioResampler; 87 Resampler _audioResampler;
91 }; 88 };
92 } // namespace webrtc 89 } // namespace webrtc
93 #endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ 90 #endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/utility/source/file_player_impl.h ('k') | webrtc/modules/utility/source/file_recorder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698