Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: remoting/host/audio_capturer.h

Issue 10907041: Implement Linux audio capturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/audio_capturer_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_H_ 5 #ifndef REMOTING_HOST_AUDIO_CAPTURER_H_
6 #define REMOTING_HOST_AUDIO_CAPTURER_H_ 6 #define REMOTING_HOST_AUDIO_CAPTURER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 class AudioPacket; 13 class AudioPacket;
14 14
15 class AudioCapturer { 15 class AudioCapturer {
16 public: 16 public:
17 typedef base::Callback<void(scoped_ptr<AudioPacket> packet)> 17 typedef base::Callback<void(scoped_ptr<AudioPacket> packet)>
18 PacketCapturedCallback; 18 PacketCapturedCallback;
19 19
20 virtual ~AudioCapturer() {} 20 virtual ~AudioCapturer() {}
21 21
22 // Returns true if audio capturing is supported on this platform. If this
23 // returns true, then Create() must not return NULL.
24 static bool IsSupported();
22 static scoped_ptr<AudioCapturer> Create(); 25 static scoped_ptr<AudioCapturer> Create();
23 26
24 // Capturers should sample at a 44.1 or 48 kHz sampling rate, in uncompressed 27 // Capturers should sample at a 44.1 or 48 kHz sampling rate, in uncompressed
25 // PCM stereo format. Capturers may choose the number of frames per packet. 28 // PCM stereo format. Capturers may choose the number of frames per packet.
26 // Returns true on success. 29 // Returns true on success.
27 virtual bool Start(const PacketCapturedCallback& callback) = 0; 30 virtual bool Start(const PacketCapturedCallback& callback) = 0;
28 // Stops the audio capturer, and frees the OS-specific audio capture 31 // Stops the audio capturer, and frees the OS-specific audio capture
29 // resources. 32 // resources.
30 virtual void Stop() = 0; 33 virtual void Stop() = 0;
31 // Returns true if the audio capturer is running. 34 // Returns true if the audio capturer is running.
32 virtual bool IsRunning() = 0; 35 virtual bool IsStarted() = 0;
33 36
34 static bool IsValidSampleRate(int sample_rate); 37 static bool IsValidSampleRate(int sample_rate);
35 }; 38 };
36 39
37 } // namespace remoting 40 } // namespace remoting
38 41
39 #endif // REMOTING_HOST_AUDIO_CAPTURER_H_ 42 #endif // REMOTING_HOST_AUDIO_CAPTURER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/audio_capturer_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698