Disable PasswordManagerWebUITest.testOpenPasswordManager
[chromium-blink-merge.git] / remoting / host / audio_capturer.h
blob97ea46b151441c398e0ce964a889dbbdfe29158e
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_AUDIO_CAPTURER_H_
6 #define REMOTING_HOST_AUDIO_CAPTURER_H_
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace remoting {
13 class AudioPacket;
15 class AudioCapturer {
16 public:
17 typedef base::Callback<void(scoped_ptr<AudioPacket> packet)>
18 PacketCapturedCallback;
20 virtual ~AudioCapturer() {}
22 // Returns true if audio capturing is supported on this platform. If this
23 // returns true, then Create() must not return nullptr.
24 static bool IsSupported();
25 static scoped_ptr<AudioCapturer> Create();
27 // Capturers should sample at a 44.1 or 48 kHz sampling rate, in uncompressed
28 // PCM stereo format. Capturers may choose the number of frames per packet.
29 // Returns true on success.
30 virtual bool Start(const PacketCapturedCallback& callback) = 0;
32 static bool IsValidSampleRate(int sample_rate);
35 } // namespace remoting
37 #endif // REMOTING_HOST_AUDIO_CAPTURER_H_