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_WEBAUDIO_CAPTURER_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "media/audio/audio_parameters.h" | 10 #include "media/audio/audio_parameters.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // setFormat() is called early on, so that we can configure the capturer. | 37 // setFormat() is called early on, so that we can configure the capturer. |
38 virtual void setFormat(size_t number_of_channels, float sample_rate) OVERRIDE; | 38 virtual void setFormat(size_t number_of_channels, float sample_rate) OVERRIDE; |
39 // MediaStreamAudioDestinationNode periodically calls consumeAudio(). | 39 // MediaStreamAudioDestinationNode periodically calls consumeAudio(). |
40 virtual void consumeAudio(const WebKit::WebVector<const float*>& audio_data, | 40 virtual void consumeAudio(const WebKit::WebVector<const float*>& audio_data, |
41 size_t number_of_frames) OVERRIDE; | 41 size_t number_of_frames) OVERRIDE; |
42 | 42 |
43 // AudioCapturerSource implementation. | 43 // AudioCapturerSource implementation. |
44 virtual void Initialize( | 44 virtual void Initialize( |
45 const media::AudioParameters& params, | 45 const media::AudioParameters& params, |
46 media::AudioCapturerSource::CaptureCallback* callback, | 46 media::AudioCapturerSource::CaptureCallback* callback, |
47 media::AudioCapturerSource::CaptureEventHandler* event_handler) OVERRIDE; | 47 int session_id) OVERRIDE; |
48 | 48 |
49 virtual void Start() OVERRIDE; | 49 virtual void Start() OVERRIDE; |
50 virtual void Stop() OVERRIDE; | 50 virtual void Stop() OVERRIDE; |
51 virtual void SetVolume(double volume) OVERRIDE { } | 51 virtual void SetVolume(double volume) OVERRIDE { } |
52 virtual void SetDevice(int session_id) OVERRIDE { } | |
53 virtual void SetAutomaticGainControl(bool enable) OVERRIDE { } | 52 virtual void SetAutomaticGainControl(bool enable) OVERRIDE { } |
54 | 53 |
55 private: | 54 private: |
56 virtual ~WebAudioCapturerSource(); | 55 virtual ~WebAudioCapturerSource(); |
57 | 56 |
58 WebRtcAudioCapturer* capturer_; | 57 WebRtcAudioCapturer* capturer_; |
59 | 58 |
60 int set_format_channels_; | 59 int set_format_channels_; |
61 media::AudioParameters params_; | 60 media::AudioParameters params_; |
62 media::AudioCapturerSource::CaptureCallback* callback_; | 61 media::AudioCapturerSource::CaptureCallback* callback_; |
(...skipping 10 matching lines...) Expand all Loading... |
73 // Synchronizes HandleCapture() with AudioCapturerSource calls. | 72 // Synchronizes HandleCapture() with AudioCapturerSource calls. |
74 base::Lock lock_; | 73 base::Lock lock_; |
75 bool started_; | 74 bool started_; |
76 | 75 |
77 DISALLOW_COPY_AND_ASSIGN(WebAudioCapturerSource); | 76 DISALLOW_COPY_AND_ASSIGN(WebAudioCapturerSource); |
78 }; | 77 }; |
79 | 78 |
80 } // namespace content | 79 } // namespace content |
81 | 80 |
82 #endif // CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ | 81 #endif // CONTENT_RENDERER_MEDIA_WEBAUDIO_CAPTURER_SOURCE_H_ |
OLD | NEW |