OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_SYSTEM_IMPL_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ |
6 #define MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ | 6 #define MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ |
7 | 7 |
8 #include "media/audio/audio_system.h" | 8 #include "media/audio/audio_system.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class SingleThreadTaskRunner; | 11 class SingleThreadTaskRunner; |
12 } | 12 } |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 class AudioManager; | 15 class AudioManager; |
16 | 16 |
17 class MEDIA_EXPORT AudioSystemImpl : public AudioSystem { | 17 class MEDIA_EXPORT AudioSystemImpl : public AudioSystem { |
18 public: | 18 public: |
19 static std::unique_ptr<AudioSystem> Create(AudioManager* audio_manager); | 19 static std::unique_ptr<AudioSystem> Create(AudioManager* audio_manager); |
20 | 20 |
21 ~AudioSystemImpl() override; | 21 ~AudioSystemImpl() override; |
22 | 22 |
23 // AudioSystem implementation. | 23 // AudioSystem implementation. |
24 void GetInputStreamParameters( | 24 void GetInputStreamParameters( |
25 const std::string& device_id, | 25 const std::string& device_id, |
26 OnAudioParamsCallback on_params_cb) const override; | 26 OnAudioParamsCallback on_params_cb) const override; |
27 | |
28 void GetOutputStreamParameters( | |
29 const std::string& device_id, | |
30 OnAudioParamsCallback on_params_cb) const override; | |
31 | |
32 void HasInputDevices(OnBoolCallback on_has_devices_cb) const override; | 27 void HasInputDevices(OnBoolCallback on_has_devices_cb) const override; |
33 | |
34 AudioManager* GetAudioManager() const override; | 28 AudioManager* GetAudioManager() const override; |
35 | 29 |
36 protected: | 30 protected: |
37 AudioSystemImpl(AudioManager* audio_manager); | 31 AudioSystemImpl(AudioManager* audio_manager); |
38 | 32 |
39 private: | 33 private: |
40 base::SingleThreadTaskRunner* GetTaskRunner() const; | 34 base::SingleThreadTaskRunner* GetTaskRunner() const; |
41 | 35 |
42 AudioManager* const audio_manager_; | 36 AudioManager* const audio_manager_; |
43 | 37 |
44 DISALLOW_COPY_AND_ASSIGN(AudioSystemImpl); | 38 DISALLOW_COPY_AND_ASSIGN(AudioSystemImpl); |
45 }; | 39 }; |
46 | 40 |
47 } // namespace media | 41 } // namespace media |
48 | 42 |
49 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ | 43 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_IMPL_H_ |
OLD | NEW |