summaryrefslogtreecommitdiffstats
path: root/remoting/host/audio_capturer.h
diff options
context:
space:
mode:
authorkxing@chromium.org <kxing@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 19:38:07 +0000
committerkxing@chromium.org <kxing@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 19:38:07 +0000
commit677bb0a47d38068702e7a7c7da33f741aaab4bef (patch)
tree68000557c2b033b7472d2a1d95fa267fdf183bae /remoting/host/audio_capturer.h
parentfe71d3e65e1c2d884e394606441ff161b2a0c036 (diff)
downloadchromium_src-677bb0a47d38068702e7a7c7da33f741aaab4bef.zip
chromium_src-677bb0a47d38068702e7a7c7da33f741aaab4bef.tar.gz
chromium_src-677bb0a47d38068702e7a7c7da33f741aaab4bef.tar.bz2
Piping for host-side audio capture
Review URL: https://chromiumcodereview.appspot.com/10692082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/audio_capturer.h')
-rw-r--r--remoting/host/audio_capturer.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/remoting/host/audio_capturer.h b/remoting/host/audio_capturer.h
new file mode 100644
index 0000000..90aa2e1
--- /dev/null
+++ b/remoting/host/audio_capturer.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_AUDIO_CAPTURER_H_
+#define REMOTING_HOST_AUDIO_CAPTURER_H_
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "remoting/proto/audio.pb.h"
+
+namespace remoting {
+
+class AudioCapturer {
+ public:
+ typedef base::Callback<void(scoped_ptr<AudioPacket> packet)>
+ PacketCapturedCallback;
+
+ virtual ~AudioCapturer() {}
+
+ static scoped_ptr<AudioCapturer> Create();
+
+ // Capturers should sample at a 44.1 kHz sampling rate, in uncompressed PCM
+ // stereo format. Capturers may choose the number of frames per packet.
+ virtual void Start(const PacketCapturedCallback& callback) = 0;
+ virtual void Stop() = 0;
+ virtual bool IsRunning() = 0;
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_AUDIO_CAPTURER_H_