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

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

Issue 1469013002: Move ThreadWrapper to ProcessThread in base. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed comment Created 5 years, 1 month 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_PULSE_LINUX_H 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_PULSE_LINUX_H
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_PULSE_LINUX_H 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_PULSE_LINUX_H
13 13
14 #include "webrtc/base/platform_thread.h"
15 #include "webrtc/base/thread_checker.h"
14 #include "webrtc/modules/audio_device/audio_device_generic.h" 16 #include "webrtc/modules/audio_device/audio_device_generic.h"
15 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h" 17 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h"
16 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 18 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
17 #include "webrtc/system_wrappers/include/thread_wrapper.h"
18 #include "webrtc/base/thread_checker.h"
19 19
20 #include <X11/Xlib.h> 20 #include <X11/Xlib.h>
21 #include <pulse/pulseaudio.h> 21 #include <pulse/pulseaudio.h>
22 22
23 // We define this flag if it's missing from our headers, because we want to be 23 // We define this flag if it's missing from our headers, because we want to be
24 // able to compile against old headers but still use PA_STREAM_ADJUST_LATENCY 24 // able to compile against old headers but still use PA_STREAM_ADJUST_LATENCY
25 // if run against a recent version of the library. 25 // if run against a recent version of the library.
26 #ifndef PA_STREAM_ADJUST_LATENCY 26 #ifndef PA_STREAM_ADJUST_LATENCY
27 #define PA_STREAM_ADJUST_LATENCY 0x2000U 27 #define PA_STREAM_ADJUST_LATENCY 0x2000U
28 #endif 28 #endif
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 bool PlayThreadProcess(); 277 bool PlayThreadProcess();
278 278
279 AudioDeviceBuffer* _ptrAudioBuffer; 279 AudioDeviceBuffer* _ptrAudioBuffer;
280 280
281 CriticalSectionWrapper& _critSect; 281 CriticalSectionWrapper& _critSect;
282 EventWrapper& _timeEventRec; 282 EventWrapper& _timeEventRec;
283 EventWrapper& _timeEventPlay; 283 EventWrapper& _timeEventPlay;
284 EventWrapper& _recStartEvent; 284 EventWrapper& _recStartEvent;
285 EventWrapper& _playStartEvent; 285 EventWrapper& _playStartEvent;
286 286
287 rtc::scoped_ptr<ThreadWrapper> _ptrThreadPlay; 287 rtc::scoped_ptr<PlatformThread> _ptrThreadPlay;
288 rtc::scoped_ptr<ThreadWrapper> _ptrThreadRec; 288 rtc::scoped_ptr<PlatformThread> _ptrThreadRec;
289 int32_t _id; 289 int32_t _id;
290 290
291 AudioMixerManagerLinuxPulse _mixerManager; 291 AudioMixerManagerLinuxPulse _mixerManager;
292 292
293 uint16_t _inputDeviceIndex; 293 uint16_t _inputDeviceIndex;
294 uint16_t _outputDeviceIndex; 294 uint16_t _outputDeviceIndex;
295 bool _inputDeviceIsSpecified; 295 bool _inputDeviceIsSpecified;
296 bool _outputDeviceIsSpecified; 296 bool _outputDeviceIsSpecified;
297 297
298 int sample_rate_hz_; 298 int sample_rate_hz_;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 pa_buffer_attr _playBufferAttr; 366 pa_buffer_attr _playBufferAttr;
367 pa_buffer_attr _recBufferAttr; 367 pa_buffer_attr _recBufferAttr;
368 368
369 char _oldKeyState[32]; 369 char _oldKeyState[32];
370 Display* _XDisplay; 370 Display* _XDisplay;
371 }; 371 };
372 372
373 } 373 }
374 374
375 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_ 375 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698