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

Side by Side Diff: webrtc/modules/audio_device/audio_device_impl.h

Issue 1944883002: Move ADM Create() method to public interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H
13 13
14 #if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) 14 #if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
15 15
16 #include <memory> 16 #include <memory>
17 17
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/scoped_ref_ptr.h"
20 #include "webrtc/modules/audio_device/audio_device_buffer.h" 19 #include "webrtc/modules/audio_device/audio_device_buffer.h"
21 #include "webrtc/modules/audio_device/include/audio_device.h" 20 #include "webrtc/modules/audio_device/include/audio_device.h"
22 21
23 namespace webrtc { 22 namespace webrtc {
24 23
25 class AudioDeviceGeneric; 24 class AudioDeviceGeneric;
26 class AudioManager; 25 class AudioManager;
27 class CriticalSectionWrapper; 26 class CriticalSectionWrapper;
28 27
29 class AudioDeviceModuleImpl : public AudioDeviceModule { 28 class AudioDeviceModuleImpl : public AudioDeviceModule {
(...skipping 11 matching lines...) Expand all
41 int32_t CheckPlatform(); 40 int32_t CheckPlatform();
42 int32_t CreatePlatformSpecificObjects(); 41 int32_t CreatePlatformSpecificObjects();
43 int32_t AttachAudioBuffer(); 42 int32_t AttachAudioBuffer();
44 43
45 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); 44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer);
46 virtual ~AudioDeviceModuleImpl(); 45 virtual ~AudioDeviceModuleImpl();
47 46
48 int64_t TimeUntilNextProcess() override; 47 int64_t TimeUntilNextProcess() override;
49 void Process() override; 48 void Process() override;
50 49
51 // Factory methods (resource allocation/deallocation)
52 static rtc::scoped_refptr<AudioDeviceModule> Create(
53 const int32_t id,
54 const AudioLayer audioLayer = kPlatformDefaultAudio);
55
56 // Retrieve the currently utilized audio layer 50 // Retrieve the currently utilized audio layer
57 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; 51 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override;
58 52
59 // Error handling 53 // Error handling
60 ErrorCode LastError() const override; 54 ErrorCode LastError() const override;
61 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; 55 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override;
62 56
63 // Full-duplex transportation of PCM audio 57 // Full-duplex transportation of PCM audio
64 int32_t RegisterAudioCallback(AudioTransport* audioCallback) override; 58 int32_t RegisterAudioCallback(AudioTransport* audioCallback) override;
65 59
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 PlatformType _platformType; 220 PlatformType _platformType;
227 bool _initialized; 221 bool _initialized;
228 mutable ErrorCode _lastError; 222 mutable ErrorCode _lastError;
229 }; 223 };
230 224
231 } // namespace webrtc 225 } // namespace webrtc
232 226
233 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) 227 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
234 228
235 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ 229 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/android/opensles_player.h ('k') | webrtc/modules/audio_device/audio_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698