| 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 #ifndef REMOTING_HOST_LINUX_AUDIO_PIPE_READER_H_ | 5 #ifndef REMOTING_HOST_LINUX_AUDIO_PIPE_READER_H_ |
| 6 #define REMOTING_HOST_LINUX_AUDIO_PIPE_READER_H_ | 6 #define REMOTING_HOST_LINUX_AUDIO_PIPE_READER_H_ |
| 7 | 7 |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_path_watcher.h" | 10 #include "base/files/file_path_watcher.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 74 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 75 base::FilePath pipe_path_; | 75 base::FilePath pipe_path_; |
| 76 | 76 |
| 77 // Watcher for the directory that contains audio pipe we are reading from, to | 77 // Watcher for the directory that contains audio pipe we are reading from, to |
| 78 // monitor when pulseaudio creates or deletes it. | 78 // monitor when pulseaudio creates or deletes it. |
| 79 base::FilePathWatcher file_watcher_; | 79 base::FilePathWatcher file_watcher_; |
| 80 | 80 |
| 81 base::File pipe_; | 81 base::File pipe_; |
| 82 base::RepeatingTimer<AudioPipeReader> timer_; | 82 base::RepeatingTimer<AudioPipeReader> timer_; |
| 83 scoped_refptr<ObserverListThreadSafe<StreamObserver> > observers_; | 83 scoped_refptr<base::ObserverListThreadSafe<StreamObserver>> observers_; |
| 84 | 84 |
| 85 // Size of the pipe buffer. | 85 // Size of the pipe buffer. |
| 86 int pipe_buffer_size_; | 86 int pipe_buffer_size_; |
| 87 | 87 |
| 88 // Period between pipe reads. | 88 // Period between pipe reads. |
| 89 base::TimeDelta capture_period_; | 89 base::TimeDelta capture_period_; |
| 90 | 90 |
| 91 // Time when capturing was started. | 91 // Time when capturing was started. |
| 92 base::TimeTicks started_time_; | 92 base::TimeTicks started_time_; |
| 93 | 93 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 // Destroys |audio_pipe_reader| on the audio thread. | 107 // Destroys |audio_pipe_reader| on the audio thread. |
| 108 struct AudioPipeReaderTraits { | 108 struct AudioPipeReaderTraits { |
| 109 static void Destruct(const AudioPipeReader* audio_pipe_reader); | 109 static void Destruct(const AudioPipeReader* audio_pipe_reader); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace remoting | 112 } // namespace remoting |
| 113 | 113 |
| 114 #endif // REMOTING_HOST_LINUX_AUDIO_PIPE_READER_H_ | 114 #endif // REMOTING_HOST_LINUX_AUDIO_PIPE_READER_H_ |
| OLD | NEW |