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

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

Issue 1769933002: Looking up device id by session id for AudioRendererMixerInput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and bug ref to remove AudioManagerBase dependency Created 4 years, 8 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
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_BASE_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Input device ID used to capture the default system playback stream. When 42 // Input device ID used to capture the default system playback stream. When
43 // this device ID is passed to MakeAudioInputStream() the returned 43 // this device ID is passed to MakeAudioInputStream() the returned
44 // AudioInputStream will be capturing audio currently being played on the 44 // AudioInputStream will be capturing audio currently being played on the
45 // default playback device. At the moment this feature is supported only on 45 // default playback device. At the moment this feature is supported only on
46 // some platforms. AudioInputStream::Intialize() will return an error on 46 // some platforms. AudioInputStream::Intialize() will return an error on
47 // platforms that don't support it. GetInputStreamParameters() must be used 47 // platforms that don't support it. GetInputStreamParameters() must be used
48 // to get the parameters of the loopback device before creating a loopback 48 // to get the parameters of the loopback device before creating a loopback
49 // stream, otherwise stream initialization may fail. 49 // stream, otherwise stream initialization may fail.
50 static const char kLoopbackInputDeviceId[]; 50 static const char kLoopbackInputDeviceId[];
51 51
52 // Returns true if |device_id| corresponds to the default device.
53 static bool IsDefaultDeviceId(const std::string& device_id);
54
55 // If |device_id| is not empty, |session_id| should be ignored and the output
56 // device should be selected basing on |device_id|.
57 // If |device_id| is empty and |session_id| is nonzero, output device
58 // associated with the opened input device designated by |session_id| should
59 // be used.
60 static bool UseSessionIdToSelectDevice(int session_id,
61 const std::string& device_id);
62
52 ~AudioManagerBase() override; 63 ~AudioManagerBase() override;
53 64
54 // AudioManager: 65 // AudioManager:
55 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override; 66 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override;
56 scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() override; 67 scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() override;
57 base::string16 GetAudioInputDeviceModel() override; 68 base::string16 GetAudioInputDeviceModel() override;
58 void ShowAudioInputSettings() override; 69 void ShowAudioInputSettings() override;
59 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; 70 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
60 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; 71 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
61 AudioOutputStream* MakeAudioOutputStream( 72 AudioOutputStream* MakeAudioOutputStream(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 190
180 // Proxy for creating AudioLog objects. 191 // Proxy for creating AudioLog objects.
181 AudioLogFactory* const audio_log_factory_; 192 AudioLogFactory* const audio_log_factory_;
182 193
183 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 194 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
184 }; 195 };
185 196
186 } // namespace media 197 } // namespace media
187 198
188 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 199 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698