OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LINUX_AUDIO_MANAGER_LINUX_H_ | 5 #ifndef MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ |
6 #define MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ | 6 #define MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 | 32 |
33 virtual void MuteAll(); | 33 virtual void MuteAll(); |
34 virtual void UnMuteAll(); | 34 virtual void UnMuteAll(); |
35 | 35 |
36 virtual void ReleaseOutputStream(AudioOutputStream* stream); | 36 virtual void ReleaseOutputStream(AudioOutputStream* stream); |
37 | 37 |
38 protected: | 38 protected: |
39 virtual ~AudioManagerLinux(); | 39 virtual ~AudioManagerLinux(); |
40 | 40 |
41 private: | 41 private: |
42 // Helper method to query if there is any valid input device | 42 enum StreamType { |
43 bool HasAnyValidAudioInputDevice(void** hint); | 43 kStreamPlayback = 0, |
44 kStreamCapture, | |
45 }; | |
46 | |
47 // Get a list of available ALSA input devices. | |
48 void GetAlsaAudioInputDevices(media::AudioDeviceNames* device_names); | |
49 | |
50 // Get the ALSA devices' information like names and ids. | |
henrika (OOO until Aug 14)
2011/10/13 09:41:17
Nit. We only get name and ID here. Not clear.
no longer working on chromium
2011/10/19 16:06:03
Done.
| |
51 void GetAlsaDevicesInfo(void** hint, media::AudioDeviceNames* device_names); | |
52 | |
53 // Check if the specific ALSA device is available. | |
54 bool IsAlsaDeviceAvailable(const char* device_name); | |
55 | |
56 // Query if there is any valid ALSA input device? | |
henrika (OOO until Aug 14)
2011/10/13 09:41:17
??
scherkus (not reviewing)
2011/10/18 23:22:51
this comment would be clearer if stated as "Return
no longer working on chromium
2011/10/19 16:06:03
Done.
no longer working on chromium
2011/10/19 16:06:03
Done.
| |
57 bool HasAnyAlsaAudioDevice(StreamType stream); | |
44 | 58 |
45 scoped_ptr<AlsaWrapper> wrapper_; | 59 scoped_ptr<AlsaWrapper> wrapper_; |
46 | 60 |
47 std::set<AudioOutputStream*> active_streams_; | 61 std::set<AudioOutputStream*> active_streams_; |
48 | 62 |
49 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); | 63 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); |
50 }; | 64 }; |
51 | 65 |
52 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ | 66 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ |
OLD | NEW |