| 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 <map> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/synchronization/lock.h" | |
| 13 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
| 14 #include "media/audio/audio_manager_base.h" | 12 #include "media/audio/audio_manager_base.h" |
| 15 | 13 |
| 16 class AlsaPcmOutputStream; | 14 class AlsaPcmOutputStream; |
| 17 class AlsaWrapper; | 15 class AlsaWrapper; |
| 18 | 16 |
| 19 class AudioManagerLinux : public AudioManagerBase { | 17 class AudioManagerLinux : public AudioManagerBase { |
| 20 public: | 18 public: |
| 21 AudioManagerLinux(); | 19 AudioManagerLinux(); |
| 22 | 20 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 | 37 |
| 40 protected: | 38 protected: |
| 41 virtual ~AudioManagerLinux(); | 39 virtual ~AudioManagerLinux(); |
| 42 | 40 |
| 43 private: | 41 private: |
| 44 // Helper method to query if there is any valid input device | 42 // Helper method to query if there is any valid input device |
| 45 bool HasAnyValidAudioInputDevice(void** hint); | 43 bool HasAnyValidAudioInputDevice(void** hint); |
| 46 | 44 |
| 47 scoped_ptr<AlsaWrapper> wrapper_; | 45 scoped_ptr<AlsaWrapper> wrapper_; |
| 48 | 46 |
| 49 base::Lock lock_; | 47 std::set<AlsaPcmOutputStream*> active_streams_; |
| 50 std::map<AlsaPcmOutputStream*, scoped_refptr<AlsaPcmOutputStream> > | |
| 51 active_streams_; | |
| 52 | 48 |
| 53 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); | 49 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); |
| 54 }; | 50 }; |
| 55 | 51 |
| 56 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ | 52 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ |
| OLD | NEW |