OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_MEDIA_STREAM_AUDIO_DELIVERER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_DELIVERER_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_DELIVERER_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_DELIVERER_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Protects concurrent access to |pending_consumers_| and |consumers_|. | 130 // Protects concurrent access to |pending_consumers_| and |consumers_|. |
131 mutable base::Lock consumers_lock_; | 131 mutable base::Lock consumers_lock_; |
132 | 132 |
133 // Any consumers needing a call to OnSetFormat(), to be notified of the | 133 // Any consumers needing a call to OnSetFormat(), to be notified of the |
134 // changed audio format, are placed in this list. This includes consumers | 134 // changed audio format, are placed in this list. This includes consumers |
135 // added via AddConsumer() that need to have an initial OnSetFormat() call | 135 // added via AddConsumer() that need to have an initial OnSetFormat() call |
136 // before audio data is first delivered. Consumers are moved from this list to | 136 // before audio data is first delivered. Consumers are moved from this list to |
137 // |consumers_| on the audio thread. | 137 // |consumers_| on the audio thread. |
138 std::vector<Consumer*> pending_consumers_; | 138 std::vector<Consumer*> pending_consumers_; |
139 | 139 |
140 // Consumers that are up-to-date on the current audio format and are receiving | 140 // Consumers that are up to date on the current audio format and are receiving |
141 // audio data are placed in this list. | 141 // audio data are placed in this list. |
142 std::vector<Consumer*> consumers_; | 142 std::vector<Consumer*> consumers_; |
143 | 143 |
144 // Protects concurrent access to |params_|. | 144 // Protects concurrent access to |params_|. |
145 mutable base::Lock params_lock_; | 145 mutable base::Lock params_lock_; |
146 | 146 |
147 // Specifies the current format of the audio passing through this | 147 // Specifies the current format of the audio passing through this |
148 // MediaStreamAudioDeliverer. | 148 // MediaStreamAudioDeliverer. |
149 media::AudioParameters params_; | 149 media::AudioParameters params_; |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioDeliverer); | 151 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioDeliverer); |
152 }; | 152 }; |
153 | 153 |
154 } // namespace content | 154 } // namespace content |
155 | 155 |
156 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_DELIVERER_H_ | 156 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_DELIVERER_H_ |
OLD | NEW |