Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: media/audio/linux/audio_manager_linux.h

Issue 7117001: Simplify AlsaPcmOutputStream and AudioManagerLinux. Code was thread-safe, but now (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/linux/alsa_output_unittest.cc ('k') | media/audio/linux/audio_manager_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « media/audio/linux/alsa_output_unittest.cc ('k') | media/audio/linux/audio_manager_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698