Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_AUDIO_AUDIO_THREAD_H_ | |
| 6 #define MEDIA_AUDIO_AUDIO_THREAD_H_ | |
| 7 | |
| 8 #include "media/base/media_export.h" | |
| 9 | |
| 10 namespace base { | |
| 11 class SingleThreadTaskRunner; | |
| 12 } // namespace base | |
| 13 | |
| 14 namespace media { | |
| 15 | |
| 16 // This class encapulates the logic for the thread and task runners that the | |
| 17 // AudioManager and related classes run on. | |
| 18 class MEDIA_EXPORT AudioThread { | |
| 19 public: | |
| 20 virtual ~AudioThread() {} | |
| 21 | |
| 22 // Synchronously stops all underlying threads. | |
| 23 virtual void Stop() = 0; | |
| 24 | |
| 25 // Returns the task runner used for audio IO. | |
|
o1ka
2017/05/10 15:57:57
State that both methods should always return valid
alokp
2017/05/10 18:04:03
Done.
| |
| 26 virtual base::SingleThreadTaskRunner* GetTaskRunner() = 0; | |
| 27 | |
| 28 // Heavyweight tasks should use GetWorkerTaskRunner() instead of | |
| 29 // GetTaskRunner(). On most platforms they are the same, but some share the | |
| 30 // UI loop with the audio IO loop. | |
|
o1ka
2017/05/10 15:57:57
Move audio_manager.h l.49 comment here instead? I
alokp
2017/05/10 18:04:03
I do not see a difference in the comments. What ex
o1ka
2017/05/11 13:44:12
The other comment makes more sense, since there is
| |
| 31 virtual base::SingleThreadTaskRunner* GetWorkerTaskRunner() = 0; | |
| 32 }; | |
| 33 | |
| 34 } // namespace media | |
| 35 | |
| 36 #endif // MEDIA_AUDIO_AUDIO_THREAD_H_ | |
| OLD | NEW |