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 MEDIA_AUDIO_VIRTUAL_AUDIO_SINK_H_ | 5 #ifndef MEDIA_AUDIO_VIRTUAL_AUDIO_SINK_H_ |
6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_SINK_H_ | 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_SINK_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "media/audio/audio_io.h" | 12 #include "media/audio/audio_io.h" |
13 #include "media/audio/audio_source_diverter.h" | 13 #include "media/audio/audio_source_diverter.h" |
14 #include "media/base/audio_converter.h" | 14 #include "media/base/audio_converter.h" |
15 #include "media/base/audio_shifter.h" | 15 #include "media/base/audio_shifter.h" |
16 | 16 |
17 namespace base { | |
18 class SingleThreadTaskRunner; | |
19 } | |
20 | |
21 namespace media { | 17 namespace media { |
22 | 18 |
23 class VirtualAudioInputStream; | 19 class VirtualAudioInputStream; |
24 | 20 |
25 // This class is an adapter between push model and pull model for audio stream. | 21 // This class is an adapter between push model and pull model for audio stream. |
26 // This class is thread safe. | 22 // This class is thread safe. |
27 // Audio provider calls OnData() to push audio data into this class. | 23 // Audio provider calls OnData() to push audio data into this class. |
28 // Audio consumer calls ProvideInput() to pull audio data. | 24 // Audio consumer calls ProvideInput() to pull audio data. |
29 class MEDIA_EXPORT VirtualAudioSink : public AudioPushSink, | 25 class MEDIA_EXPORT VirtualAudioSink : public AudioPushSink, |
30 public AudioConverter::InputCallback { | 26 public AudioConverter::InputCallback { |
(...skipping 23 matching lines...) Expand all Loading... |
54 AudioShifter shifter_; | 50 AudioShifter shifter_; |
55 base::Lock shifter_lock_; | 51 base::Lock shifter_lock_; |
56 AfterCloseCallback after_close_callback_; | 52 AfterCloseCallback after_close_callback_; |
57 | 53 |
58 DISALLOW_COPY_AND_ASSIGN(VirtualAudioSink); | 54 DISALLOW_COPY_AND_ASSIGN(VirtualAudioSink); |
59 }; | 55 }; |
60 | 56 |
61 } // namespace media | 57 } // namespace media |
62 | 58 |
63 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_SINK_H_ | 59 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_SINK_H_ |
OLD | NEW |