| 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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 virtual void MuteAll() OVERRIDE; | 36 virtual void MuteAll() OVERRIDE; |
| 37 virtual void UnMuteAll() OVERRIDE; | 37 virtual void UnMuteAll() OVERRIDE; |
| 38 | 38 |
| 39 virtual void ReleaseOutputStream(AudioOutputStream* stream); | 39 virtual void ReleaseOutputStream(AudioOutputStream* stream); |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 virtual ~AudioManagerLinux(); | 42 virtual ~AudioManagerLinux(); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // Helper method to query if there is any valid input device | 45 enum StreamType { |
| 46 bool HasAnyValidAudioInputDevice(void** hint); | 46 kStreamPlayback = 0, |
| 47 kStreamCapture, |
| 48 }; |
| 49 |
| 50 // Gets a list of available ALSA input devices. |
| 51 void GetAlsaAudioInputDevices(media::AudioDeviceNames* device_names); |
| 52 |
| 53 // Gets the ALSA devices' names and ids. |
| 54 void GetAlsaDevicesInfo(void** hint, media::AudioDeviceNames* device_names); |
| 55 |
| 56 // Checks if the specific ALSA device is available. |
| 57 bool IsAlsaDeviceAvailable(const char* device_name); |
| 58 |
| 59 // Returns true if a device is present for the given stream type. |
| 60 bool HasAnyAlsaAudioDevice(StreamType stream); |
| 47 | 61 |
| 48 scoped_ptr<AlsaWrapper> wrapper_; | 62 scoped_ptr<AlsaWrapper> wrapper_; |
| 49 | 63 |
| 50 std::set<AudioOutputStream*> active_streams_; | 64 std::set<AudioOutputStream*> active_streams_; |
| 51 | 65 |
| 52 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); | 66 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); |
| 53 }; | 67 }; |
| 54 | 68 |
| 55 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ | 69 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ |
| OLD | NEW |