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

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

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add back explicit Release()s in test Created 4 years, 9 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
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
19 #include "webrtc/modules/audio_device/audio_device_buffer.h" 20 #include "webrtc/modules/audio_device/audio_device_buffer.h"
20 #include "webrtc/modules/audio_device/include/audio_device.h" 21 #include "webrtc/modules/audio_device/include/audio_device.h"
21 22
22 namespace webrtc { 23 namespace webrtc {
23 24
24 class AudioDeviceGeneric; 25 class AudioDeviceGeneric;
25 class AudioManager; 26 class AudioManager;
26 class CriticalSectionWrapper; 27 class CriticalSectionWrapper;
27 28
28 class AudioDeviceModuleImpl : public AudioDeviceModule { 29 class AudioDeviceModuleImpl : public AudioDeviceModule {
(...skipping 12 matching lines...) Expand all
41 int32_t CreatePlatformSpecificObjects(); 42 int32_t CreatePlatformSpecificObjects();
42 int32_t AttachAudioBuffer(); 43 int32_t AttachAudioBuffer();
43 44
44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); 45 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer);
45 virtual ~AudioDeviceModuleImpl(); 46 virtual ~AudioDeviceModuleImpl();
46 47
47 int64_t TimeUntilNextProcess() override; 48 int64_t TimeUntilNextProcess() override;
48 void Process() override; 49 void Process() override;
49 50
50 // Factory methods (resource allocation/deallocation) 51 // Factory methods (resource allocation/deallocation)
51 static AudioDeviceModule* Create( 52 static rtc::scoped_refptr<AudioDeviceModule> Create(
52 const int32_t id, 53 const int32_t id,
53 const AudioLayer audioLayer = kPlatformDefaultAudio); 54 const AudioLayer audioLayer = kPlatformDefaultAudio);
54 55
55 // Retrieve the currently utilized audio layer 56 // Retrieve the currently utilized audio layer
56 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; 57 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override;
57 58
58 // Error handling 59 // Error handling
59 ErrorCode LastError() const override; 60 ErrorCode LastError() const override;
60 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; 61 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override;
61 62
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 PlatformType _platformType; 226 PlatformType _platformType;
226 bool _initialized; 227 bool _initialized;
227 mutable ErrorCode _lastError; 228 mutable ErrorCode _lastError;
228 }; 229 };
229 230
230 } // namespace webrtc 231 } // namespace webrtc
231 232
232 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) 233 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
233 234
234 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ 235 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_device/audio_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698