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

Side by Side Diff: media/audio/audio_manager.h

Issue 23523023: Add GetOutputStreamParameters, GetAssociatedOutputDeviceID to AudioManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 7 years, 3 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 | « no previous file | media/audio/audio_manager_base.h » ('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_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 }; 136 };
137 137
138 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; 138 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0;
139 virtual void RemoveOutputDeviceChangeListener( 139 virtual void RemoveOutputDeviceChangeListener(
140 AudioDeviceListener* listener) = 0; 140 AudioDeviceListener* listener) = 0;
141 141
142 // Returns the default output hardware audio parameters for opening output 142 // Returns the default output hardware audio parameters for opening output
143 // streams. It is a convenience interface to 143 // streams. It is a convenience interface to
144 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager 144 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager
145 // does not need their own implementation to this interface. 145 // does not need their own implementation to this interface.
146 // TODO(tommi): Remove this method and use GetOutputStreamParameteres instead.
146 virtual AudioParameters GetDefaultOutputStreamParameters() = 0; 147 virtual AudioParameters GetDefaultOutputStreamParameters() = 0;
147 148
149 // Returns the output hardware audio parameters for a specific output device.
150 virtual AudioParameters GetOutputStreamParameters(
151 const std::string& device_id) = 0;
152
148 // Returns the input hardware audio parameters of the specific device 153 // Returns the input hardware audio parameters of the specific device
149 // for opening input streams. Each AudioManager needs to implement their own 154 // for opening input streams. Each AudioManager needs to implement their own
150 // version of this interface. 155 // version of this interface.
151 virtual AudioParameters GetInputStreamParameters( 156 virtual AudioParameters GetInputStreamParameters(
152 const std::string& device_id) = 0; 157 const std::string& device_id) = 0;
153 158
159 // Returns the device id of an output device that belongs to the same hardware
160 // as the specified input device.
161 // If the hardware has only an input device (e.g. a webcam), the return value
162 // will be empty (which the caller can then interpret to be the default output
163 // device). Implementations that don't yet support this feature, must return
164 // an empty string.
165 virtual std::string GetAssociatedOutputDeviceID(
166 const std::string& input_device_id) = 0;
167
154 protected: 168 protected:
155 AudioManager(); 169 AudioManager();
156 170
157 private: 171 private:
158 DISALLOW_COPY_AND_ASSIGN(AudioManager); 172 DISALLOW_COPY_AND_ASSIGN(AudioManager);
159 }; 173 };
160 174
161 } // namespace media 175 } // namespace media
162 176
163 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 177 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698