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 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H | 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H |
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H | 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H |
13 | 13 |
14 #include "webrtc/modules/audio_device/audio_device_buffer.h" | 14 #include "webrtc/modules/audio_device/audio_device_buffer.h" |
15 #include "webrtc/modules/audio_device/include/audio_device.h" | 15 #include "webrtc/modules/audio_device/include/audio_device.h" |
16 | 16 |
17 namespace webrtc { | 17 namespace webrtc { |
18 | 18 |
19 class AudioDeviceGeneric { | 19 class AudioDeviceGeneric { |
20 public: | 20 public: |
21 // For use with UMA logging. Must be kept in sync with chromiums | |
henrika_webrtc
2016/06/30 08:44:20
..."with histograms.xml in Chrome"
Max Morin WebRTC
2016/06/30 10:56:04
Done.
| |
22 // histograms.xml. | |
23 enum class InitStatus { | |
24 kOk = 0, | |
henrika_webrtc
2016/06/30 08:44:20
don't we use the Google C++ code style?
Like: OK,
Max Morin WebRTC
2016/06/30 10:56:04
Done.
| |
25 kPlayoutError = 1, | |
26 kRecordingError = 2, | |
27 kOtherError = 3, | |
28 kNumStatuses = 4 | |
29 }; | |
21 // Retrieve the currently utilized audio layer | 30 // Retrieve the currently utilized audio layer |
22 virtual int32_t ActiveAudioLayer( | 31 virtual int32_t ActiveAudioLayer( |
23 AudioDeviceModule::AudioLayer& audioLayer) const = 0; | 32 AudioDeviceModule::AudioLayer& audioLayer) const = 0; |
24 | 33 |
25 // Main initializaton and termination | 34 // Main initializaton and termination |
26 virtual int32_t Init() = 0; | 35 virtual InitStatus Init() = 0; |
27 virtual int32_t Terminate() = 0; | 36 virtual int32_t Terminate() = 0; |
28 virtual bool Initialized() const = 0; | 37 virtual bool Initialized() const = 0; |
29 | 38 |
30 // Device enumeration | 39 // Device enumeration |
31 virtual int16_t PlayoutDevices() = 0; | 40 virtual int16_t PlayoutDevices() = 0; |
32 virtual int16_t RecordingDevices() = 0; | 41 virtual int16_t RecordingDevices() = 0; |
33 virtual int32_t PlayoutDeviceName(uint16_t index, | 42 virtual int32_t PlayoutDeviceName(uint16_t index, |
34 char name[kAdmMaxDeviceNameSize], | 43 char name[kAdmMaxDeviceNameSize], |
35 char guid[kAdmMaxGuidSize]) = 0; | 44 char guid[kAdmMaxGuidSize]) = 0; |
36 virtual int32_t RecordingDeviceName(uint16_t index, | 45 virtual int32_t RecordingDeviceName(uint16_t index, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 virtual void ClearRecordingError() = 0; | 181 virtual void ClearRecordingError() = 0; |
173 | 182 |
174 virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) = 0; | 183 virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) = 0; |
175 | 184 |
176 virtual ~AudioDeviceGeneric() {} | 185 virtual ~AudioDeviceGeneric() {} |
177 }; | 186 }; |
178 | 187 |
179 } // namespace webrtc | 188 } // namespace webrtc |
180 | 189 |
181 #endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H | 190 #endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H |
OLD | NEW |