| 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_LOCAL_AUDIO_RENDERER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return total_render_time_; | 67 return total_render_time_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 protected: | 70 protected: |
| 71 virtual ~WebRtcLocalAudioRenderer(); | 71 virtual ~WebRtcLocalAudioRenderer(); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 // WebRtcAudioCapturerSink implementation. | 74 // WebRtcAudioCapturerSink implementation. |
| 75 | 75 |
| 76 // Called on the AudioInputDevice worker thread. | 76 // Called on the AudioInputDevice worker thread. |
| 77 virtual int CaptureData(const std::vector<int>& channels, | 77 virtual void CaptureData(const std::vector<int>& channels, |
| 78 const int16* audio_data, | 78 const int16* audio_data, |
| 79 int sample_rate, | 79 int sample_rate, |
| 80 int number_of_channels, | 80 int number_of_channels, |
| 81 int number_of_frames, | 81 int number_of_frames) OVERRIDE; |
| 82 int audio_delay_milliseconds, | |
| 83 int current_volume, | |
| 84 bool need_audio_processing, | |
| 85 bool key_pressed) OVERRIDE; | |
| 86 | 82 |
| 87 // Can be called on different user thread. | 83 // Can be called on different user thread. |
| 88 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; | 84 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; |
| 89 | 85 |
| 90 // media::AudioRendererSink::RenderCallback implementation. | 86 // media::AudioRendererSink::RenderCallback implementation. |
| 91 // Render() is called on the AudioOutputDevice thread and OnRenderError() | 87 // Render() is called on the AudioOutputDevice thread and OnRenderError() |
| 92 // on the IO thread. | 88 // on the IO thread. |
| 93 virtual int Render(media::AudioBus* audio_bus, | 89 virtual int Render(media::AudioBus* audio_bus, |
| 94 int audio_delay_milliseconds) OVERRIDE; | 90 int audio_delay_milliseconds) OVERRIDE; |
| 95 virtual void OnRenderError() OVERRIDE; | 91 virtual void OnRenderError() OVERRIDE; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 143 |
| 148 // Flag to start the sink only once. Used to log correctly in UMA. | 144 // Flag to start the sink only once. Used to log correctly in UMA. |
| 149 bool sink_started_; | 145 bool sink_started_; |
| 150 | 146 |
| 151 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); | 147 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); |
| 152 }; | 148 }; |
| 153 | 149 |
| 154 } // namespace content | 150 } // namespace content |
| 155 | 151 |
| 156 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 152 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
| OLD | NEW |