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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 virtual ~WebRtcAudioCapturer(); | 101 virtual ~WebRtcAudioCapturer(); |
102 | 102 |
103 private: | 103 private: |
104 class TrackOwner; | 104 class TrackOwner; |
105 typedef std::list<scoped_refptr<TrackOwner> > TrackList; | 105 typedef std::list<scoped_refptr<TrackOwner> > TrackList; |
106 | 106 |
107 // AudioCapturerSource::CaptureCallback implementation. | 107 // AudioCapturerSource::CaptureCallback implementation. |
108 // Called on the AudioInputDevice audio thread. | 108 // Called on the AudioInputDevice audio thread. |
109 virtual void Capture(media::AudioBus* audio_source, | 109 virtual void Capture(media::AudioBus* audio_source, |
110 int audio_delay_milliseconds, | 110 int audio_delay_milliseconds, |
111 double volume, | 111 double volume) OVERRIDE; |
112 bool key_pressed) OVERRIDE; | |
113 virtual void OnCaptureError() OVERRIDE; | 112 virtual void OnCaptureError() OVERRIDE; |
114 | 113 |
115 // Reconfigures the capturer with a new buffer size and capture parameters. | 114 // Reconfigures the capturer with a new buffer size and capture parameters. |
116 // Must be called without holding the lock. Returns true on success. | 115 // Must be called without holding the lock. Returns true on success. |
117 bool Reconfigure(int sample_rate, media::ChannelLayout channel_layout); | 116 bool Reconfigure(int sample_rate, media::ChannelLayout channel_layout); |
118 | 117 |
119 // Starts recording audio. | 118 // Starts recording audio. |
120 // Triggered by AddSink() on the main render thread or a Libjingle working | 119 // Triggered by AddSink() on the main render thread or a Libjingle working |
121 // thread. It should NOT be called under |lock_|. | 120 // thread. It should NOT be called under |lock_|. |
122 void Start(); | 121 void Start(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Stores latest microphone volume received in a CaptureData() callback. | 158 // Stores latest microphone volume received in a CaptureData() callback. |
160 // Range is [0, 255]. | 159 // Range is [0, 255]. |
161 int volume_; | 160 int volume_; |
162 | 161 |
163 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); | 162 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); |
164 }; | 163 }; |
165 | 164 |
166 } // namespace content | 165 } // namespace content |
167 | 166 |
168 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 167 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
OLD | NEW |