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 CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 // Called by the client on the sink side. Return false if the capturer has | 33 // Called by the client on the sink side. Return false if the capturer has |
34 // not been initialized successfully. | 34 // not been initialized successfully. |
35 void AddCapturerSink(WebRtcAudioCapturerSink* sink); | 35 void AddCapturerSink(WebRtcAudioCapturerSink* sink); |
36 | 36 |
37 // Called by the client on the sink side to remove | 37 // Called by the client on the sink side to remove |
38 void RemoveCapturerSink(WebRtcAudioCapturerSink* sink); | 38 void RemoveCapturerSink(WebRtcAudioCapturerSink* sink); |
39 | 39 |
40 // SetCapturerSource() is called if client on the source side desires to | 40 // SetCapturerSource() is called if client on the source side desires to |
41 // provide their own captured audio data. Client is responsible for calling | 41 // provide their own captured audio data. Client is responsible for calling |
42 // Start() on its own source to have the ball rolling. | 42 // Start() on its own source to have the ball rolling. |
43 void SetCapturerSource(media::AudioCapturerSource* source); | 43 void SetCapturerSource( |
| 44 const scoped_refptr<media::AudioCapturerSource>& source); |
44 | 45 |
45 // Starts recording audio. | 46 // Starts recording audio. |
46 void Start(); | 47 void Start(); |
47 | 48 |
48 // Stops recording audio. | 49 // Stops recording audio. |
49 void Stop(); | 50 void Stop(); |
50 | 51 |
51 // Sets the microphone volume. | 52 // Sets the microphone volume. |
52 void SetVolume(double volume); | 53 void SetVolume(double volume); |
53 | 54 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 100 |
100 // Protect access to |source_|, |sinks_|, |running_|. | 101 // Protect access to |source_|, |sinks_|, |running_|. |
101 base::Lock lock_; | 102 base::Lock lock_; |
102 | 103 |
103 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); | 104 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); |
104 }; | 105 }; |
105 | 106 |
106 } // namespace content | 107 } // namespace content |
107 | 108 |
108 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 109 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
OLD | NEW |