| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 base::Lock lock_; | 247 base::Lock lock_; |
| 248 | 248 |
| 249 media::SeekableBuffer buffer_; | 249 media::SeekableBuffer buffer_; |
| 250 | 250 |
| 251 bool pending_request_; | 251 bool pending_request_; |
| 252 | 252 |
| 253 // SyncReader is used only in low latency mode for synchronous reading. | 253 // SyncReader is used only in low latency mode for synchronous reading. |
| 254 SyncReader* sync_reader_; | 254 SyncReader* sync_reader_; |
| 255 | 255 |
| 256 // The message loop of audio thread that this object runs on. | 256 // The message loop of audio thread that this object runs on. |
| 257 MessageLoop* message_loop_; | 257 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 258 | 258 |
| 259 // When starting stream we wait for data to become available. | 259 // When starting stream we wait for data to become available. |
| 260 // Number of times left. | 260 // Number of times left. |
| 261 int number_polling_attempts_left_; | 261 int number_polling_attempts_left_; |
| 262 | 262 |
| 263 // Used to post delayed tasks to ourselves that we can cancel. | 263 // Used to post delayed tasks to ourselves that we can cancel. |
| 264 // We don't want the tasks to hold onto a reference as it will slow down | 264 // We don't want the tasks to hold onto a reference as it will slow down |
| 265 // shutdown and force it to wait for the most delayed task. | 265 // shutdown and force it to wait for the most delayed task. |
| 266 // Also, if we're shutting down, we do not want to poll for more data. | 266 // Also, if we're shutting down, we do not want to poll for more data. |
| 267 base::WeakPtrFactory<AudioOutputController> weak_this_; | 267 base::WeakPtrFactory<AudioOutputController> weak_this_; |
| 268 | 268 |
| 269 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); | 269 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 } // namespace media | 272 } // namespace media |
| 273 | 273 |
| 274 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 274 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| OLD | NEW |