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

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

Issue 8361031: Reland the CL 8162015. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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/audio_device_name.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 <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 24 matching lines...) Expand all
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_
OLDNEW
« no previous file with comments | « media/audio/audio_device_name.cc ('k') | media/audio/linux/audio_manager_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698