| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/linux/audio_pipe_reader.h" | 5 #include "remoting/host/linux/audio_pipe_reader.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| 11 | 11 |
| 12 #include "base/eintr_wrapper.h" | |
| 13 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 14 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/posix/eintr_wrapper.h" |
| 15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 16 | 16 |
| 17 namespace remoting { | 17 namespace remoting { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // PulseAudio's module-pipe-sink must be configured to use the following | 21 // PulseAudio's module-pipe-sink must be configured to use the following |
| 22 // parameters for the sink we read from. | 22 // parameters for the sink we read from. |
| 23 const int kSamplingRate = 48000; | 23 const int kSamplingRate = 48000; |
| 24 const int kChannels = 2; | 24 const int kChannels = 2; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 162 } |
| 163 | 163 |
| 164 void AudioPipeReader::WaitForPipeReadable() { | 164 void AudioPipeReader::WaitForPipeReadable() { |
| 165 timer_.Stop(); | 165 timer_.Stop(); |
| 166 MessageLoopForIO::current()->WatchFileDescriptor( | 166 MessageLoopForIO::current()->WatchFileDescriptor( |
| 167 pipe_fd_, false, MessageLoopForIO::WATCH_READ, | 167 pipe_fd_, false, MessageLoopForIO::WATCH_READ, |
| 168 &file_descriptor_watcher_, this); | 168 &file_descriptor_watcher_, this); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace remoting | 171 } // namespace remoting |
| OLD | NEW |