Chromium Code Reviews| 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_AUDIO_CAPTURER_LINUX_H_ | 5 #ifndef REMOTING_HOST_AUDIO_CAPTURER_LINUX_H_ |
| 6 #define REMOTING_HOST_AUDIO_CAPTURER_LINUX_H_ | 6 #define REMOTING_HOST_AUDIO_CAPTURER_LINUX_H_ |
| 7 | 7 |
| 8 #include "remoting/host/audio_capturer.h" | 8 #include "remoting/host/audio_capturer.h" |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "base/timer.h" | 12 #include "base/timer.h" |
| 13 | 13 |
| 14 class FilePath; | 14 class FilePath; |
| 15 | 15 |
| 16 namespace remoting { | 16 namespace remoting { |
| 17 | 17 |
| 18 class AudioCapturerLinux : public AudioCapturer, | 18 class AudioCapturerLinux : public AudioCapturer, |
| 19 public MessageLoopForIO::Watcher { | 19 public MessageLoopForIO::Watcher { |
| 20 public: | 20 public: |
| 21 // Must be called to initialize the capturer before the first instance is | |
|
Wez
2012/09/14 01:20:54
nit: initialize -> configure
Sergey Ulanov
2012/09/14 01:25:32
Done.
| |
| 22 // created. | |
| 23 static void SetPipeName(const FilePath& pipe_name); | |
| 24 | |
| 21 explicit AudioCapturerLinux(const FilePath& pipe_name); | 25 explicit AudioCapturerLinux(const FilePath& pipe_name); |
| 22 virtual ~AudioCapturerLinux(); | 26 virtual ~AudioCapturerLinux(); |
| 23 | 27 |
| 24 // AudioCapturer interface. | 28 // AudioCapturer interface. |
| 25 virtual bool Start(const PacketCapturedCallback& callback) OVERRIDE; | 29 virtual bool Start(const PacketCapturedCallback& callback) OVERRIDE; |
| 26 virtual void Stop() OVERRIDE; | 30 virtual void Stop() OVERRIDE; |
| 27 virtual bool IsStarted() OVERRIDE; | 31 virtual bool IsStarted() OVERRIDE; |
| 28 | 32 |
| 29 // MessageLoopForIO::Watcher interface. | 33 // MessageLoopForIO::Watcher interface. |
| 30 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; | 34 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 49 std::string left_over_bytes_; | 53 std::string left_over_bytes_; |
| 50 | 54 |
| 51 MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_; | 55 MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_; |
| 52 | 56 |
| 53 DISALLOW_COPY_AND_ASSIGN(AudioCapturerLinux); | 57 DISALLOW_COPY_AND_ASSIGN(AudioCapturerLinux); |
| 54 }; | 58 }; |
| 55 | 59 |
| 56 } // namespace remoting | 60 } // namespace remoting |
| 57 | 61 |
| 58 #endif // REMOTING_HOST_AUDIO_CAPTURER_LINUX_H_ | 62 #endif // REMOTING_HOST_AUDIO_CAPTURER_LINUX_H_ |
| OLD | NEW |