OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef VOICE_ENGINE_VOE_FILE_IMPL_H_ | |
12 #define VOICE_ENGINE_VOE_FILE_IMPL_H_ | |
13 | |
14 #include "voice_engine/include/voe_file.h" | |
15 #include "voice_engine/shared_data.h" | |
16 | |
17 namespace webrtc { | |
18 | |
19 class VoEFileImpl : public VoEFile { | |
20 public: | |
21 // Playout file locally | |
22 | |
23 int StartPlayingFileLocally(int channel, | |
24 const char fileNameUTF8[1024], | |
25 bool loop = false, | |
26 FileFormats format = kFileFormatPcm16kHzFile, | |
27 float volumeScaling = 1.0, | |
28 int startPointMs = 0, | |
29 int stopPointMs = 0) override; | |
30 | |
31 int StartPlayingFileLocally(int channel, | |
32 InStream* stream, | |
33 FileFormats format = kFileFormatPcm16kHzFile, | |
34 float volumeScaling = 1.0, | |
35 int startPointMs = 0, | |
36 int stopPointMs = 0) override; | |
37 | |
38 int StopPlayingFileLocally(int channel) override; | |
39 | |
40 int IsPlayingFileLocally(int channel) override; | |
41 | |
42 // Use file as microphone input | |
43 | |
44 int StartPlayingFileAsMicrophone(int channel, | |
45 const char fileNameUTF8[1024], | |
46 bool loop = false, | |
47 bool mixWithMicrophone = false, | |
48 FileFormats format = kFileFormatPcm16kHzFile, | |
49 float volumeScaling = 1.0) override; | |
50 | |
51 int StartPlayingFileAsMicrophone(int channel, | |
52 InStream* stream, | |
53 bool mixWithMicrophone = false, | |
54 FileFormats format = kFileFormatPcm16kHzFile, | |
55 float volumeScaling = 1.0) override; | |
56 | |
57 int StopPlayingFileAsMicrophone(int channel) override; | |
58 | |
59 int IsPlayingFileAsMicrophone(int channel) override; | |
60 | |
61 // Record speaker signal to file | |
62 | |
63 int StartRecordingPlayout(int channel, | |
64 const char* fileNameUTF8, | |
65 CodecInst* compression = NULL, | |
66 int maxSizeBytes = -1) override; | |
67 | |
68 int StartRecordingPlayout(int channel, | |
69 OutStream* stream, | |
70 CodecInst* compression = NULL) override; | |
71 | |
72 int StopRecordingPlayout(int channel) override; | |
73 | |
74 // Record microphone signal to file | |
75 | |
76 int StartRecordingMicrophone(const char* fileNameUTF8, | |
77 CodecInst* compression = NULL, | |
78 int maxSizeBytes = -1) override; | |
79 | |
80 int StartRecordingMicrophone(OutStream* stream, | |
81 CodecInst* compression = NULL) override; | |
82 | |
83 int StopRecordingMicrophone() override; | |
84 | |
85 protected: | |
86 VoEFileImpl(voe::SharedData* shared); | |
87 ~VoEFileImpl() override; | |
88 | |
89 private: | |
90 voe::SharedData* _shared; | |
91 }; | |
92 | |
93 } // namespace webrtc | |
94 | |
95 #endif // VOICE_ENGINE_VOE_FILE_IMPL_H_ | |
OLD | NEW |