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

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

Issue 2785673002: Remove more CriticalSectionWrappers. (Closed)
Patch Set: Created 3 years, 8 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_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 <memory> 14 #include <memory>
15 15
16 #include "webrtc/base/criticalsection.h"
16 #include "webrtc/base/platform_thread.h" 17 #include "webrtc/base/platform_thread.h"
17 #include "webrtc/base/thread_checker.h" 18 #include "webrtc/base/thread_checker.h"
18 #include "webrtc/modules/audio_device/audio_device_generic.h" 19 #include "webrtc/modules/audio_device/audio_device_generic.h"
19 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h" 20 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h"
20 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
21 21
22 #include <X11/Xlib.h> 22 #include <X11/Xlib.h>
23 #include <pulse/pulseaudio.h> 23 #include <pulse/pulseaudio.h>
24 24
25 // We define this flag if it's missing from our headers, because we want to be 25 // We define this flag if it's missing from our headers, because we want to be
26 // able to compile against old headers but still use PA_STREAM_ADJUST_LATENCY 26 // able to compile against old headers but still use PA_STREAM_ADJUST_LATENCY
27 // if run against a recent version of the library. 27 // if run against a recent version of the library.
28 #ifndef PA_STREAM_ADJUST_LATENCY 28 #ifndef PA_STREAM_ADJUST_LATENCY
29 #define PA_STREAM_ADJUST_LATENCY 0x2000U 29 #define PA_STREAM_ADJUST_LATENCY 0x2000U
30 #endif 30 #endif
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 void PaLock(); 273 void PaLock();
274 void PaUnLock(); 274 void PaUnLock();
275 275
276 static bool RecThreadFunc(void*); 276 static bool RecThreadFunc(void*);
277 static bool PlayThreadFunc(void*); 277 static bool PlayThreadFunc(void*);
278 bool RecThreadProcess(); 278 bool RecThreadProcess();
279 bool PlayThreadProcess(); 279 bool PlayThreadProcess();
280 280
281 AudioDeviceBuffer* _ptrAudioBuffer; 281 AudioDeviceBuffer* _ptrAudioBuffer;
282 282
283 CriticalSectionWrapper& _critSect; 283 rtc::CriticalSection _critSect;
284 EventWrapper& _timeEventRec; 284 EventWrapper& _timeEventRec;
285 EventWrapper& _timeEventPlay; 285 EventWrapper& _timeEventPlay;
286 EventWrapper& _recStartEvent; 286 EventWrapper& _recStartEvent;
287 EventWrapper& _playStartEvent; 287 EventWrapper& _playStartEvent;
288 288
289 // TODO(pbos): Remove unique_ptr and use directly without resetting. 289 // TODO(pbos): Remove unique_ptr and use directly without resetting.
290 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay; 290 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay;
291 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec; 291 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec;
292 int32_t _id; 292 int32_t _id;
293 293
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 pa_buffer_attr _playBufferAttr; 369 pa_buffer_attr _playBufferAttr;
370 pa_buffer_attr _recBufferAttr; 370 pa_buffer_attr _recBufferAttr;
371 371
372 char _oldKeyState[32]; 372 char _oldKeyState[32];
373 Display* _XDisplay; 373 Display* _XDisplay;
374 }; 374 };
375 375
376 } 376 }
377 377
378 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_ 378 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698