| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 WebRtcAudioCapturer(); | 104 WebRtcAudioCapturer(); |
| 105 virtual ~WebRtcAudioCapturer(); | 105 virtual ~WebRtcAudioCapturer(); |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 typedef std::list<scoped_refptr<WebRtcAudioCapturerSinkOwner> > TrackList; | 108 typedef std::list<scoped_refptr<WebRtcAudioCapturerSinkOwner> > TrackList; |
| 109 | 109 |
| 110 // AudioCapturerSource::CaptureCallback implementation. | 110 // AudioCapturerSource::CaptureCallback implementation. |
| 111 // Called on the AudioInputDevice audio thread. | 111 // Called on the AudioInputDevice audio thread. |
| 112 virtual void Capture(media::AudioBus* audio_source, | 112 virtual void Capture(media::AudioBus* audio_source, |
| 113 int audio_delay_milliseconds, | 113 int audio_delay_milliseconds, |
| 114 double volume) OVERRIDE; | 114 double volume, |
| 115 bool key_pressed) OVERRIDE; |
| 115 virtual void OnCaptureError() OVERRIDE; | 116 virtual void OnCaptureError() OVERRIDE; |
| 116 | 117 |
| 117 // Reconfigures the capturer with a new buffer size and capture parameters. | 118 // Reconfigures the capturer with a new buffer size and capture parameters. |
| 118 // Must be called without holding the lock. Returns true on success. | 119 // Must be called without holding the lock. Returns true on success. |
| 119 bool Reconfigure(int sample_rate, media::ChannelLayout channel_layout); | 120 bool Reconfigure(int sample_rate, media::ChannelLayout channel_layout); |
| 120 | 121 |
| 121 // Starts recording audio. | 122 // Starts recording audio. |
| 122 // Triggered by AddSink() on the main render thread or a Libjingle working | 123 // Triggered by AddSink() on the main render thread or a Libjingle working |
| 123 // thread. It should NOT be called under |lock_|. | 124 // thread. It should NOT be called under |lock_|. |
| 124 void Start(); | 125 void Start(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 158 |
| 158 // The media session ID used to identify which input device to be started. | 159 // The media session ID used to identify which input device to be started. |
| 159 int session_id_; | 160 int session_id_; |
| 160 | 161 |
| 161 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); | 162 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); |
| 162 }; | 163 }; |
| 163 | 164 |
| 164 } // namespace content | 165 } // namespace content |
| 165 | 166 |
| 166 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 167 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
| OLD | NEW |