Implement audio capturer for chromoting host on Linux.
This change adds AudioCapturerLinux which works by reading audio stream from
a named pipe. The name of the pipe is passed via command line.
me2me_virtual_host.py will need to configure pulseaudio to stream audio to the
the same pipe , that's coming in a separate CL.
BUG=145891
Review URL: https://chromiumcodereview.appspot.com/10907041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156060 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/remoting/host/audio_capturer_win.cc b/remoting/host/audio_capturer_win.cc
index 6479afa..90714ac 100644
--- a/remoting/host/audio_capturer_win.cc
+++ b/remoting/host/audio_capturer_win.cc
@@ -199,7 +199,7 @@
void AudioCapturerWin::Stop() {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(IsRunning());
+ DCHECK(IsStarted());
capture_timer_.reset();
mm_device_.Release();
@@ -211,7 +211,7 @@
thread_checker_.DetachFromThread();
}
-bool AudioCapturerWin::IsRunning() {
+bool AudioCapturerWin::IsStarted() {
DCHECK(thread_checker_.CalledOnValidThread());
return capture_timer_.get() != NULL;
}
@@ -219,7 +219,7 @@
void AudioCapturerWin::DoCapture() {
DCHECK(AudioCapturer::IsValidSampleRate(sampling_rate_));
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(IsRunning());
+ DCHECK(IsStarted());
// Fetch all packets from the audio capture endpoint buffer.
while (true) {
@@ -279,6 +279,10 @@
return true;
}
+bool AudioCapturer::IsSupported() {
+ return true;
+}
+
scoped_ptr<AudioCapturer> AudioCapturer::Create() {
return scoped_ptr<AudioCapturer>(new AudioCapturerWin());
}