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

Side by Side Diff: webrtc/modules/audio_device/mac/audio_device_mac.h

Issue 1722083002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_device/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
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_MAC_H 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_MAC_H
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_MAC_H 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_MAC_H
13 13
14 #include "webrtc/base/scoped_ptr.h" 14 #include <memory>
15
15 #include "webrtc/base/thread_annotations.h" 16 #include "webrtc/base/thread_annotations.h"
16 #include "webrtc/modules/audio_device/audio_device_generic.h" 17 #include "webrtc/modules/audio_device/audio_device_generic.h"
17 #include "webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h" 18 #include "webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h"
18 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 19 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
19 20
20 #include <AudioToolbox/AudioConverter.h> 21 #include <AudioToolbox/AudioConverter.h>
21 #include <CoreAudio/CoreAudio.h> 22 #include <CoreAudio/CoreAudio.h>
22 #include <mach/semaphore.h> 23 #include <mach/semaphore.h>
23 24
24 struct PaUtilRingBuffer; 25 struct PaUtilRingBuffer;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 AudioDeviceBuffer* _ptrAudioBuffer; 284 AudioDeviceBuffer* _ptrAudioBuffer;
284 285
285 CriticalSectionWrapper& _critSect; 286 CriticalSectionWrapper& _critSect;
286 287
287 EventWrapper& _stopEventRec; 288 EventWrapper& _stopEventRec;
288 EventWrapper& _stopEvent; 289 EventWrapper& _stopEvent;
289 290
290 // TODO(pbos): Replace with direct members, just start/stop, no need to 291 // TODO(pbos): Replace with direct members, just start/stop, no need to
291 // recreate the thread. 292 // recreate the thread.
292 // Only valid/running between calls to StartRecording and StopRecording. 293 // Only valid/running between calls to StartRecording and StopRecording.
293 rtc::scoped_ptr<rtc::PlatformThread> capture_worker_thread_; 294 std::unique_ptr<rtc::PlatformThread> capture_worker_thread_;
294 295
295 // Only valid/running between calls to StartPlayout and StopPlayout. 296 // Only valid/running between calls to StartPlayout and StopPlayout.
296 rtc::scoped_ptr<rtc::PlatformThread> render_worker_thread_; 297 std::unique_ptr<rtc::PlatformThread> render_worker_thread_;
297 298
298 int32_t _id; 299 int32_t _id;
299 300
300 AudioMixerManagerMac _mixerManager; 301 AudioMixerManagerMac _mixerManager;
301 302
302 uint16_t _inputDeviceIndex; 303 uint16_t _inputDeviceIndex;
303 uint16_t _outputDeviceIndex; 304 uint16_t _outputDeviceIndex;
304 AudioDeviceID _inputDeviceID; 305 AudioDeviceID _inputDeviceID;
305 AudioDeviceID _outputDeviceID; 306 AudioDeviceID _outputDeviceID;
306 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 307 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // Typing detection 375 // Typing detection
375 // 0x5c is key "9", after that comes function keys. 376 // 0x5c is key "9", after that comes function keys.
376 bool prev_key_state_[0x5d]; 377 bool prev_key_state_[0x5d];
377 378
378 int get_mic_volume_counter_ms_; 379 int get_mic_volume_counter_ms_;
379 }; 380 };
380 381
381 } // namespace webrtc 382 } // namespace webrtc
382 383
383 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_MAC_AUDIO_DEVICE_MAC_H_ 384 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_MAC_AUDIO_DEVICE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698