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

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

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 years, 10 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 19 matching lines...) Expand all
30 virtual void GetAudioOutputDeviceNames( 30 virtual void GetAudioOutputDeviceNames(
31 AudioDeviceNames* device_names) OVERRIDE; 31 AudioDeviceNames* device_names) OVERRIDE;
32 virtual AudioParameters GetInputStreamParameters( 32 virtual AudioParameters GetInputStreamParameters(
33 const std::string& device_id) OVERRIDE; 33 const std::string& device_id) OVERRIDE;
34 34
35 // Implementation of AudioManagerBase. 35 // Implementation of AudioManagerBase.
36 virtual AudioOutputStream* MakeLinearOutputStream( 36 virtual AudioOutputStream* MakeLinearOutputStream(
37 const AudioParameters& params) OVERRIDE; 37 const AudioParameters& params) OVERRIDE;
38 virtual AudioOutputStream* MakeLowLatencyOutputStream( 38 virtual AudioOutputStream* MakeLowLatencyOutputStream(
39 const AudioParameters& params, 39 const AudioParameters& params,
40 const std::string& device_id, 40 const std::string& device_id) OVERRIDE;
41 const std::string& input_device_id) OVERRIDE;
42 virtual AudioInputStream* MakeLinearInputStream( 41 virtual AudioInputStream* MakeLinearInputStream(
43 const AudioParameters& params, const std::string& device_id) OVERRIDE; 42 const AudioParameters& params, const std::string& device_id) OVERRIDE;
44 virtual AudioInputStream* MakeLowLatencyInputStream( 43 virtual AudioInputStream* MakeLowLatencyInputStream(
45 const AudioParameters& params, const std::string& device_id) OVERRIDE; 44 const AudioParameters& params, const std::string& device_id) OVERRIDE;
46 45
47 protected: 46 protected:
48 virtual AudioParameters GetPreferredOutputStreamParameters( 47 virtual AudioParameters GetPreferredOutputStreamParameters(
49 const std::string& output_device_id, 48 const std::string& output_device_id,
50 const AudioParameters& input_params) OVERRIDE; 49 const AudioParameters& input_params) OVERRIDE;
51 50
(...skipping 11 matching lines...) Expand all
63 const pa_sink_info* info, 62 const pa_sink_info* info,
64 int error, void* user_data); 63 int error, void* user_data);
65 64
66 // Callback to get the native sample rate of PulseAudio, used by 65 // Callback to get the native sample rate of PulseAudio, used by
67 // GetNativeSampleRate(). 66 // GetNativeSampleRate().
68 static void SampleRateInfoCallback(pa_context* context, 67 static void SampleRateInfoCallback(pa_context* context,
69 const pa_server_info* info, 68 const pa_server_info* info,
70 void* user_data); 69 void* user_data);
71 70
72 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 71 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
73 AudioOutputStream* MakeOutputStream(const AudioParameters& params, 72 AudioOutputStream* MakeOutputStream(const AudioParameters& params);
74 const std::string& input_device_id);
75 73
76 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 74 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
77 AudioInputStream* MakeInputStream(const AudioParameters& params, 75 AudioInputStream* MakeInputStream(const AudioParameters& params,
78 const std::string& device_id); 76 const std::string& device_id);
79 77
80 // Gets the native sample rate of Pulse. 78 // Gets the native sample rate of Pulse.
81 int GetNativeSampleRate(); 79 int GetNativeSampleRate();
82 80
83 pa_threaded_mainloop* input_mainloop_; 81 pa_threaded_mainloop* input_mainloop_;
84 pa_context* input_context_; 82 pa_context* input_context_;
85 AudioDeviceNames* devices_; 83 AudioDeviceNames* devices_;
86 int native_input_sample_rate_; 84 int native_input_sample_rate_;
87 85
88 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse); 86 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse);
89 }; 87 };
90 88
91 } // namespace media 89 } // namespace media
92 90
93 #endif // MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 91 #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