OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TRACK_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 // The source of the audio track which is used by WebAudio, which provides | 102 // The source of the audio track which is used by WebAudio, which provides |
103 // data to the audio track when hooking up with WebAudio. | 103 // data to the audio track when hooking up with WebAudio. |
104 scoped_refptr<WebAudioCapturerSource> webaudio_source_; | 104 scoped_refptr<WebAudioCapturerSource> webaudio_source_; |
105 | 105 |
106 // A tagged list of sinks that the audio data is fed to. Tags | 106 // A tagged list of sinks that the audio data is fed to. Tags |
107 // indicate tracks that need to be notified that the audio format | 107 // indicate tracks that need to be notified that the audio format |
108 // has changed. | 108 // has changed. |
109 SinkList sinks_; | 109 SinkList sinks_; |
110 | 110 |
111 // Used to DCHECK that some methods are called on the main render thread. | |
112 base::ThreadChecker main_render_thread_checker_; | |
113 // Tests that methods are called on libjingle's signaling thread. | 111 // Tests that methods are called on libjingle's signaling thread. |
114 base::ThreadChecker signal_thread_checker_; | 112 base::ThreadChecker signal_thread_checker_; |
115 | 113 |
116 // Used to DCHECK that some methods are called on the capture audio thread. | 114 // Used to DCHECK that some methods are called on the capture audio thread. |
117 base::ThreadChecker capture_thread_checker_; | 115 base::ThreadChecker capture_thread_checker_; |
118 | 116 |
119 // Protects |params_| and |sinks_|. | 117 // Protects |params_| and |sinks_|. |
120 mutable base::Lock lock_; | 118 mutable base::Lock lock_; |
121 | 119 |
122 // Audio parameters of the audio capture stream. | 120 // Audio parameters of the audio capture stream. |
123 // Accessed on only the audio capture thread. | 121 // Accessed on only the audio capture thread. |
124 media::AudioParameters audio_parameters_; | 122 media::AudioParameters audio_parameters_; |
125 | 123 |
126 // Used to calculate the signal level that shows in the UI. | 124 // Used to calculate the signal level that shows in the UI. |
127 // Accessed on only the audio thread. | 125 // Accessed on only the audio thread. |
128 scoped_ptr<MediaStreamAudioLevelCalculator> level_calculator_; | 126 scoped_ptr<MediaStreamAudioLevelCalculator> level_calculator_; |
129 | 127 |
130 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); | 128 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); |
131 }; | 129 }; |
132 | 130 |
133 } // namespace content | 131 } // namespace content |
134 | 132 |
135 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ | 133 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ |
OLD | NEW |