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

Side by Side Diff: webrtc/modules/audio_device/linux/audio_device_alsa_linux.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, 10 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_ALSA_LINUX_H 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_ALSA_LINUX_H
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_ALSA_LINUX_H 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_ALSA_LINUX_H
13 13
14 #include <memory>
15
14 #include "webrtc/base/platform_thread.h" 16 #include "webrtc/base/platform_thread.h"
15 #include "webrtc/modules/audio_device/audio_device_generic.h" 17 #include "webrtc/modules/audio_device/audio_device_generic.h"
16 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h" 18 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h"
17 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 19 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
18 20
19 #if defined(USE_X11) 21 #if defined(USE_X11)
20 #include <X11/Xlib.h> 22 #include <X11/Xlib.h>
21 #endif 23 #endif
22 #include <alsa/asoundlib.h> 24 #include <alsa/asoundlib.h>
23 #include <sys/ioctl.h> 25 #include <sys/ioctl.h>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 bool RecThreadProcess(); 182 bool RecThreadProcess();
181 bool PlayThreadProcess(); 183 bool PlayThreadProcess();
182 184
183 private: 185 private:
184 AudioDeviceBuffer* _ptrAudioBuffer; 186 AudioDeviceBuffer* _ptrAudioBuffer;
185 187
186 CriticalSectionWrapper& _critSect; 188 CriticalSectionWrapper& _critSect;
187 189
188 // TODO(pbos): Make plain members and start/stop instead of resetting these 190 // TODO(pbos): Make plain members and start/stop instead of resetting these
189 // pointers. A thread can be reused. 191 // pointers. A thread can be reused.
190 rtc::scoped_ptr<rtc::PlatformThread> _ptrThreadRec; 192 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec;
191 rtc::scoped_ptr<rtc::PlatformThread> _ptrThreadPlay; 193 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay;
192 194
193 int32_t _id; 195 int32_t _id;
194 196
195 AudioMixerManagerLinuxALSA _mixerManager; 197 AudioMixerManagerLinuxALSA _mixerManager;
196 198
197 uint16_t _inputDeviceIndex; 199 uint16_t _inputDeviceIndex;
198 uint16_t _outputDeviceIndex; 200 uint16_t _outputDeviceIndex;
199 bool _inputDeviceIsSpecified; 201 bool _inputDeviceIsSpecified;
200 bool _outputDeviceIsSpecified; 202 bool _outputDeviceIsSpecified;
201 203
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 247
246 char _oldKeyState[32]; 248 char _oldKeyState[32];
247 #if defined(USE_X11) 249 #if defined(USE_X11)
248 Display* _XDisplay; 250 Display* _XDisplay;
249 #endif 251 #endif
250 }; 252 };
251 253
252 } 254 }
253 255
254 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_ 256 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698