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

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

Issue 1892433002: Moving device description utils from AudioManager[Base] into AudioDeviceDescription; to be shared b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 4 years, 7 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/audio_manager.cc ('k') | media/audio/audio_manager_base.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_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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 11 matching lines...) Expand all
22 #include "base/win/scoped_com_initializer.h" 22 #include "base/win/scoped_com_initializer.h"
23 #endif 23 #endif
24 24
25 namespace media { 25 namespace media {
26 26
27 class AudioOutputDispatcher; 27 class AudioOutputDispatcher;
28 28
29 // AudioManagerBase provides AudioManager functions common for all platforms. 29 // AudioManagerBase provides AudioManager functions common for all platforms.
30 class MEDIA_EXPORT AudioManagerBase : public AudioManager { 30 class MEDIA_EXPORT AudioManagerBase : public AudioManager {
31 public: 31 public:
32 // TODO(ajm): Move these strings to AudioManager.
33 // Unique Id of the generic "default" device. Associated with the localized
34 // name returned from GetDefaultDeviceName().
35 static const char kDefaultDeviceId[];
36
37 // Unique Id of the generic default communications device. Associated with
38 // the localized name returned from GetCommunicationsDeviceName().
39 static const char kCommunicationsDeviceId[];
40
41 // Input device ID used to capture the default system playback stream. When
42 // this device ID is passed to MakeAudioInputStream() the returned
43 // AudioInputStream will be capturing audio currently being played on the
44 // default playback device. At the moment this feature is supported only on
45 // some platforms. AudioInputStream::Intialize() will return an error on
46 // platforms that don't support it. GetInputStreamParameters() must be used
47 // to get the parameters of the loopback device before creating a loopback
48 // stream, otherwise stream initialization may fail.
49 static const char kLoopbackInputDeviceId[];
50
51 // Returns true if |device_id| corresponds to the default device.
52 static bool IsDefaultDeviceId(const std::string& device_id);
53
54 // If |device_id| is not empty, |session_id| should be ignored and the output
55 // device should be selected basing on |device_id|.
56 // If |device_id| is empty and |session_id| is nonzero, output device
57 // associated with the opened input device designated by |session_id| should
58 // be used.
59 static bool UseSessionIdToSelectDevice(int session_id,
60 const std::string& device_id);
61
62 ~AudioManagerBase() override; 32 ~AudioManagerBase() override;
63 33
64 // AudioManager: 34 // AudioManager:
65 base::string16 GetAudioInputDeviceModel() override; 35 base::string16 GetAudioInputDeviceModel() override;
66 void ShowAudioInputSettings() override; 36 void ShowAudioInputSettings() override;
67 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; 37 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
68 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; 38 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
69 AudioOutputStream* MakeAudioOutputStream( 39 AudioOutputStream* MakeAudioOutputStream(
70 const AudioParameters& params, 40 const AudioParameters& params,
71 const std::string& device_id) override; 41 const std::string& device_id) override;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 154
185 // Proxy for creating AudioLog objects. 155 // Proxy for creating AudioLog objects.
186 AudioLogFactory* const audio_log_factory_; 156 AudioLogFactory* const audio_log_factory_;
187 157
188 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 158 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
189 }; 159 };
190 160
191 } // namespace media 161 } // namespace media
192 162
193 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 163 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « media/audio/audio_manager.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698