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 MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 AudioOutputController(EventHandler* handler, | 178 AudioOutputController(EventHandler* handler, |
179 SyncReader* sync_reader); | 179 SyncReader* sync_reader); |
180 | 180 |
181 // The following methods are executed on the audio manager thread. | 181 // The following methods are executed on the audio manager thread. |
182 void DoCreate(AudioManager* audio_manager, const AudioParameters& params); | 182 void DoCreate(AudioManager* audio_manager, const AudioParameters& params); |
183 void DoPlay(); | 183 void DoPlay(); |
184 void PollAndStartIfDataReady(); | 184 void PollAndStartIfDataReady(); |
185 void DoPause(); | 185 void DoPause(); |
186 void DoFlush(); | 186 void DoFlush(); |
187 void DoClose(const base::Closure& closed_task); | 187 void DoClose(); |
188 void DoSetVolume(double volume); | 188 void DoSetVolume(double volume); |
189 void DoReportError(int code); | 189 void DoReportError(int code); |
190 | 190 |
191 // Helper method that starts physical stream. | 191 // Helper method that starts physical stream. |
192 void StartStream(); | 192 void StartStream(); |
193 | 193 |
194 // Helper method that stops, closes, and NULLs |*stream_|. | 194 // Helper method that stops, closes, and NULLs |*stream_|. |
195 // Signals event when done if it is not NULL. | 195 // Signals event when done if it is not NULL. |
196 void DoStopCloseAndClearStream(base::WaitableEvent *done); | 196 void DoStopCloseAndClearStream(base::WaitableEvent *done); |
197 | 197 |
(...skipping 28 matching lines...) Expand all Loading... |
226 // shutdown and force it to wait for the most delayed task. | 226 // shutdown and force it to wait for the most delayed task. |
227 // Also, if we're shutting down, we do not want to poll for more data. | 227 // Also, if we're shutting down, we do not want to poll for more data. |
228 base::WeakPtrFactory<AudioOutputController> weak_this_; | 228 base::WeakPtrFactory<AudioOutputController> weak_this_; |
229 | 229 |
230 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); | 230 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); |
231 }; | 231 }; |
232 | 232 |
233 } // namespace media | 233 } // namespace media |
234 | 234 |
235 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 235 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
OLD | NEW |