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

Side by Side Diff: webrtc/modules/audio_device/linux/audio_device_alsa_linux.h

Issue 1476453002: Clean up PlatformThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IsRunning DCHECK Created 5 years 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
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 static bool RecThreadFunc(void*); 178 static bool RecThreadFunc(void*);
179 static bool PlayThreadFunc(void*); 179 static bool PlayThreadFunc(void*);
180 bool RecThreadProcess(); 180 bool RecThreadProcess();
181 bool PlayThreadProcess(); 181 bool PlayThreadProcess();
182 182
183 private: 183 private:
184 AudioDeviceBuffer* _ptrAudioBuffer; 184 AudioDeviceBuffer* _ptrAudioBuffer;
185 185
186 CriticalSectionWrapper& _critSect; 186 CriticalSectionWrapper& _critSect;
187 187
188 rtc::scoped_ptr<PlatformThread> _ptrThreadRec; 188 // TODO(pbos): Make plain members and start/stop instead of resetting these
189 rtc::scoped_ptr<PlatformThread> _ptrThreadPlay; 189 // pointers. A thread can be reused.
190 rtc::scoped_ptr<rtc::PlatformThread> _ptrThreadRec;
191 rtc::scoped_ptr<rtc::PlatformThread> _ptrThreadPlay;
190 192
191 int32_t _id; 193 int32_t _id;
192 194
193 AudioMixerManagerLinuxALSA _mixerManager; 195 AudioMixerManagerLinuxALSA _mixerManager;
194 196
195 uint16_t _inputDeviceIndex; 197 uint16_t _inputDeviceIndex;
196 uint16_t _outputDeviceIndex; 198 uint16_t _outputDeviceIndex;
197 bool _inputDeviceIsSpecified; 199 bool _inputDeviceIsSpecified;
198 bool _outputDeviceIsSpecified; 200 bool _outputDeviceIsSpecified;
199 201
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 245
244 char _oldKeyState[32]; 246 char _oldKeyState[32];
245 #if defined(USE_X11) 247 #if defined(USE_X11)
246 Display* _XDisplay; 248 Display* _XDisplay;
247 #endif 249 #endif
248 }; 250 };
249 251
250 } 252 }
251 253
252 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_ 254 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/dummy/file_audio_device.cc ('k') | webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698