| OLD | NEW |
| 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 "webrtc/base/platform_thread.h" |
| 14 #include "webrtc/modules/audio_device/audio_device_generic.h" | 15 #include "webrtc/modules/audio_device/audio_device_generic.h" |
| 15 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h" | 16 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h" |
| 16 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 17 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| 17 #include "webrtc/system_wrappers/include/thread_wrapper.h" | |
| 18 | 18 |
| 19 #if defined(USE_X11) | 19 #if defined(USE_X11) |
| 20 #include <X11/Xlib.h> | 20 #include <X11/Xlib.h> |
| 21 #endif | 21 #endif |
| 22 #include <alsa/asoundlib.h> | 22 #include <alsa/asoundlib.h> |
| 23 #include <sys/ioctl.h> | 23 #include <sys/ioctl.h> |
| 24 #include <sys/soundcard.h> | 24 #include <sys/soundcard.h> |
| 25 | 25 |
| 26 | 26 |
| 27 namespace webrtc | 27 namespace webrtc |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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<ThreadWrapper> _ptrThreadRec; | 188 rtc::scoped_ptr<PlatformThread> _ptrThreadRec; |
| 189 rtc::scoped_ptr<ThreadWrapper> _ptrThreadPlay; | 189 rtc::scoped_ptr<PlatformThread> _ptrThreadPlay; |
| 190 | 190 |
| 191 int32_t _id; | 191 int32_t _id; |
| 192 | 192 |
| 193 AudioMixerManagerLinuxALSA _mixerManager; | 193 AudioMixerManagerLinuxALSA _mixerManager; |
| 194 | 194 |
| 195 uint16_t _inputDeviceIndex; | 195 uint16_t _inputDeviceIndex; |
| 196 uint16_t _outputDeviceIndex; | 196 uint16_t _outputDeviceIndex; |
| 197 bool _inputDeviceIsSpecified; | 197 bool _inputDeviceIsSpecified; |
| 198 bool _outputDeviceIsSpecified; | 198 bool _outputDeviceIsSpecified; |
| 199 | 199 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 char _oldKeyState[32]; | 244 char _oldKeyState[32]; |
| 245 #if defined(USE_X11) | 245 #if defined(USE_X11) |
| 246 Display* _XDisplay; | 246 Display* _XDisplay; |
| 247 #endif | 247 #endif |
| 248 }; | 248 }; |
| 249 | 249 |
| 250 } | 250 } |
| 251 | 251 |
| 252 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_ | 252 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_ALSA_LINUX_H_ |
| OLD | NEW |