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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Called on the AudioInputDevice worker thread. | 68 // Called on the AudioInputDevice worker thread. |
69 virtual void CaptureData(const int16* audio_data, | 69 virtual void CaptureData(const int16* audio_data, |
70 int number_of_channels, | 70 int number_of_channels, |
71 int number_of_frames, | 71 int number_of_frames, |
72 int audio_delay_milliseconds, | 72 int audio_delay_milliseconds, |
73 double volume) OVERRIDE; | 73 double volume) OVERRIDE; |
74 | 74 |
75 // Can be called on different user thread. | 75 // Can be called on different user thread. |
76 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; | 76 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; |
77 | 77 |
78 // Called on the main render thread. | |
79 virtual void OnCaptureDeviceStopped() OVERRIDE; | |
80 | |
81 // media::AudioRendererSink::RenderCallback implementation. | 78 // media::AudioRendererSink::RenderCallback implementation. |
82 // Render() is called on the AudioOutputDevice thread and OnRenderError() | 79 // Render() is called on the AudioOutputDevice thread and OnRenderError() |
83 // on the IO thread. | 80 // on the IO thread. |
84 virtual int Render(media::AudioBus* audio_bus, | 81 virtual int Render(media::AudioBus* audio_bus, |
85 int audio_delay_milliseconds) OVERRIDE; | 82 int audio_delay_milliseconds) OVERRIDE; |
86 virtual void OnRenderError() OVERRIDE; | 83 virtual void OnRenderError() OVERRIDE; |
87 | 84 |
88 // webrtc::ObserverInterface implementation. | 85 // webrtc::ObserverInterface implementation. |
89 // Called on the main render thread. | 86 // Called on the main render thread. |
90 virtual void OnChanged() OVERRIDE; | 87 virtual void OnChanged() OVERRIDE; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 129 |
133 // Protects |loopback_fifo_|, |playing_| and |sink_|. | 130 // Protects |loopback_fifo_|, |playing_| and |sink_|. |
134 mutable base::Lock thread_lock_; | 131 mutable base::Lock thread_lock_; |
135 | 132 |
136 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); | 133 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); |
137 }; | 134 }; |
138 | 135 |
139 } // namespace content | 136 } // namespace content |
140 | 137 |
141 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 138 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
OLD | NEW |