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

Side by Side Diff: media/audio/pulse/audio_manager_pulse.h

Issue 285233005: add audio-buffer-size command line flag support to the input audio for all the platforms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.cc ('k') | media/audio/pulse/audio_manager_pulse.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PULSE_AUDIO_MANAGER_PULSE_H_ 5 #ifndef MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_
6 #define MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 6 #define MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_
7 7
8 #include <pulse/pulseaudio.h> 8 #include <pulse/pulseaudio.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 static AudioManager* Create(AudioLogFactory* audio_log_factory); 22 static AudioManager* Create(AudioLogFactory* audio_log_factory);
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( 28 virtual void GetAudioInputDeviceNames(
29 AudioDeviceNames* device_names) OVERRIDE; 29 AudioDeviceNames* device_names) OVERRIDE;
30 virtual void GetAudioOutputDeviceNames( 30 virtual void GetAudioOutputDeviceNames(
31 AudioDeviceNames* device_names) OVERRIDE; 31 AudioDeviceNames* device_names) OVERRIDE;
32 virtual AudioParameters GetInputStreamParameters(
33 const std::string& device_id) OVERRIDE;
34 32
35 // Implementation of AudioManagerBase. 33 // Implementation of AudioManagerBase.
36 virtual AudioOutputStream* MakeLinearOutputStream( 34 virtual AudioOutputStream* MakeLinearOutputStream(
37 const AudioParameters& params) OVERRIDE; 35 const AudioParameters& params) OVERRIDE;
38 virtual AudioOutputStream* MakeLowLatencyOutputStream( 36 virtual AudioOutputStream* MakeLowLatencyOutputStream(
39 const AudioParameters& params, 37 const AudioParameters& params,
40 const std::string& device_id) OVERRIDE; 38 const std::string& device_id) OVERRIDE;
41 virtual AudioInputStream* MakeLinearInputStream( 39 virtual AudioInputStream* MakeLinearInputStream(
42 const AudioParameters& params, const std::string& device_id) OVERRIDE; 40 const AudioParameters& params, const std::string& device_id) OVERRIDE;
43 virtual AudioInputStream* MakeLowLatencyInputStream( 41 virtual AudioInputStream* MakeLowLatencyInputStream(
44 const AudioParameters& params, const std::string& device_id) OVERRIDE; 42 const AudioParameters& params, const std::string& device_id) OVERRIDE;
45 43
46 protected: 44 protected:
47 virtual AudioParameters GetPreferredOutputStreamParameters( 45 virtual AudioParameters GetPreferredOutputStreamParameters(
48 const std::string& output_device_id, 46 const std::string& output_device_id,
49 const AudioParameters& input_params) OVERRIDE; 47 const AudioParameters& input_params) OVERRIDE;
48 virtual AudioParameters GetPreferredInputStreamParameters(
49 const std::string& input_device_id,
50 const AudioParameters& input_params) OVERRIDE;
50 51
51 private: 52 private:
52 bool Init(); 53 bool Init();
53 void DestroyPulse(); 54 void DestroyPulse();
54 55
55 void GetAudioDeviceNames(bool input, media::AudioDeviceNames* device_names); 56 void GetAudioDeviceNames(bool input, media::AudioDeviceNames* device_names);
56 57
57 // Callback to get the devices' info like names, used by GetInputDevices(). 58 // Callback to get the devices' info like names, used by GetInputDevices().
58 static void InputDevicesInfoCallback(pa_context* context, 59 static void InputDevicesInfoCallback(pa_context* context,
59 const pa_source_info* info, 60 const pa_source_info* info,
(...skipping 23 matching lines...) Expand all
83 pa_context* input_context_; 84 pa_context* input_context_;
84 AudioDeviceNames* devices_; 85 AudioDeviceNames* devices_;
85 int native_input_sample_rate_; 86 int native_input_sample_rate_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse); 88 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse);
88 }; 89 };
89 90
90 } // namespace media 91 } // namespace media
91 92
92 #endif // MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 93 #endif // MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_
OLDNEW
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698