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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual ~WebRtcLocalAudioRenderer(); | 66 virtual ~WebRtcLocalAudioRenderer(); |
67 | 67 |
68 private: | 68 private: |
69 // WebRtcAudioCapturerSink implementation. | 69 // WebRtcAudioCapturerSink implementation. |
70 | 70 |
71 // Called on the AudioInputDevice worker thread. | 71 // Called on the AudioInputDevice worker thread. |
72 virtual void CaptureData(const int16* audio_data, | 72 virtual void CaptureData(const int16* audio_data, |
73 int number_of_channels, | 73 int number_of_channels, |
74 int number_of_frames, | 74 int number_of_frames, |
75 int audio_delay_milliseconds, | 75 int audio_delay_milliseconds, |
76 double volume) OVERRIDE; | 76 double volume, |
| 77 bool key_pressed) OVERRIDE; |
77 | 78 |
78 // Can be called on different user thread. | 79 // Can be called on different user thread. |
79 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; | 80 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; |
80 | 81 |
81 // media::AudioRendererSink::RenderCallback implementation. | 82 // media::AudioRendererSink::RenderCallback implementation. |
82 // Render() is called on the AudioOutputDevice thread and OnRenderError() | 83 // Render() is called on the AudioOutputDevice thread and OnRenderError() |
83 // on the IO thread. | 84 // on the IO thread. |
84 virtual int Render(media::AudioBus* audio_bus, | 85 virtual int Render(media::AudioBus* audio_bus, |
85 int audio_delay_milliseconds) OVERRIDE; | 86 int audio_delay_milliseconds) OVERRIDE; |
86 virtual void OnRenderError() OVERRIDE; | 87 virtual void OnRenderError() OVERRIDE; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 122 |
122 // Protects |loopback_fifo_|, |playing_| and |sink_|. | 123 // Protects |loopback_fifo_|, |playing_| and |sink_|. |
123 mutable base::Lock thread_lock_; | 124 mutable base::Lock thread_lock_; |
124 | 125 |
125 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); | 126 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); |
126 }; | 127 }; |
127 | 128 |
128 } // namespace content | 129 } // namespace content |
129 | 130 |
130 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 131 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
OLD | NEW |