OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 MEDIA_AUDIO_FAKE_AUDIO_WORKER_H_ | 5 #ifndef MEDIA_AUDIO_FAKE_AUDIO_WORKER_H_ |
6 #define MEDIA_AUDIO_FAKE_AUDIO_WORKER_H_ | 6 #define MEDIA_AUDIO_FAKE_AUDIO_WORKER_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
15 } | 15 } |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 class AudioBus; | |
19 class AudioParameters; | 18 class AudioParameters; |
20 | 19 |
21 // A fake audio worker. Using a provided message loop, FakeAudioWorker will | 20 // A fake audio worker. Using a provided message loop, FakeAudioWorker will |
22 // call back the provided callback like a real audio consumer or producer would. | 21 // call back the provided callback like a real audio consumer or producer would. |
23 class MEDIA_EXPORT FakeAudioWorker { | 22 class MEDIA_EXPORT FakeAudioWorker { |
24 public: | 23 public: |
25 // |worker_task_runner| is the task runner on which the closure provided to | 24 // |worker_task_runner| is the task runner on which the closure provided to |
26 // Start() will be executed on. This may or may not be the be for the same | 25 // Start() will be executed on. This may or may not be the be for the same |
27 // thread that invokes the Start/Stop methods. | 26 // thread that invokes the Start/Stop methods. |
28 // |params| is used to determine the frequency of callbacks. | 27 // |params| is used to determine the frequency of callbacks. |
(...skipping 17 matching lines...) Expand all Loading... |
46 // after the call to Stop() (on the main thread) returns. | 45 // after the call to Stop() (on the main thread) returns. |
47 class Worker; | 46 class Worker; |
48 const scoped_refptr<Worker> worker_; | 47 const scoped_refptr<Worker> worker_; |
49 | 48 |
50 DISALLOW_COPY_AND_ASSIGN(FakeAudioWorker); | 49 DISALLOW_COPY_AND_ASSIGN(FakeAudioWorker); |
51 }; | 50 }; |
52 | 51 |
53 } // namespace media | 52 } // namespace media |
54 | 53 |
55 #endif // MEDIA_AUDIO_FAKE_AUDIO_WORKER_H_ | 54 #endif // MEDIA_AUDIO_FAKE_AUDIO_WORKER_H_ |
OLD | NEW |