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

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

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: made the GetPreferredOutputStreamParameters protected Created 7 years, 9 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/ios/audio_manager_ios.mm ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 8 #include <string>
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
12 #include "media/audio/audio_manager_base.h" 12 #include "media/audio/audio_manager_base.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 class AlsaWrapper; 16 class AlsaWrapper;
17 17
18 class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase { 18 class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase {
19 public: 19 public:
20 AudioManagerLinux(); 20 AudioManagerLinux();
21 21
22 static void ShowLinuxAudioInputSettings(); 22 static void ShowLinuxAudioInputSettings();
23 23
24 // Implementation of AudioManager. 24 // Implementation of AudioManager.
25 virtual bool HasAudioOutputDevices() OVERRIDE; 25 virtual bool HasAudioOutputDevices() OVERRIDE;
26 virtual bool HasAudioInputDevices() OVERRIDE; 26 virtual bool HasAudioInputDevices() OVERRIDE;
27 virtual void ShowAudioInputSettings() OVERRIDE; 27 virtual void ShowAudioInputSettings() OVERRIDE;
28 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) 28 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names)
29 OVERRIDE; 29 OVERRIDE;
30 virtual AudioParameters GetInputStreamParameters(
31 const std::string& device_id) OVERRIDE;
30 32
31 // Implementation of AudioManagerBase. 33 // Implementation of AudioManagerBase.
32 virtual AudioOutputStream* MakeLinearOutputStream( 34 virtual AudioOutputStream* MakeLinearOutputStream(
33 const AudioParameters& params) OVERRIDE; 35 const AudioParameters& params) OVERRIDE;
34 virtual AudioOutputStream* MakeLowLatencyOutputStream( 36 virtual AudioOutputStream* MakeLowLatencyOutputStream(
35 const AudioParameters& params) OVERRIDE; 37 const AudioParameters& params) OVERRIDE;
36 virtual AudioInputStream* MakeLinearInputStream( 38 virtual AudioInputStream* MakeLinearInputStream(
37 const AudioParameters& params, const std::string& device_id) OVERRIDE; 39 const AudioParameters& params, const std::string& device_id) OVERRIDE;
38 virtual AudioInputStream* MakeLowLatencyInputStream( 40 virtual AudioInputStream* MakeLowLatencyInputStream(
39 const AudioParameters& params, const std::string& device_id) OVERRIDE; 41 const AudioParameters& params, const std::string& device_id) OVERRIDE;
40 virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters(
41 const AudioParameters& input_params) OVERRIDE;
42 42
43 protected: 43 protected:
44 virtual ~AudioManagerLinux(); 44 virtual ~AudioManagerLinux();
45 45
46 virtual AudioParameters GetPreferredOutputStreamParameters(
47 const AudioParameters& input_params) OVERRIDE;
48
46 private: 49 private:
47 enum StreamType { 50 enum StreamType {
48 kStreamPlayback = 0, 51 kStreamPlayback = 0,
49 kStreamCapture, 52 kStreamCapture,
50 }; 53 };
51 54
52 // Gets a list of available ALSA input devices. 55 // Gets a list of available ALSA input devices.
53 void GetAlsaAudioInputDevices(media::AudioDeviceNames* device_names); 56 void GetAlsaAudioInputDevices(media::AudioDeviceNames* device_names);
54 57
55 // Gets the ALSA devices' names and ids. 58 // Gets the ALSA devices' names and ids.
(...skipping 13 matching lines...) Expand all
69 const std::string& device_id); 72 const std::string& device_id);
70 73
71 scoped_ptr<AlsaWrapper> wrapper_; 74 scoped_ptr<AlsaWrapper> wrapper_;
72 75
73 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux); 76 DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux);
74 }; 77 };
75 78
76 } // namespace media 79 } // namespace media
77 80
78 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_ 81 #endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_
OLDNEW
« no previous file with comments | « media/audio/ios/audio_manager_ios.mm ('k') | media/audio/linux/audio_manager_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698