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