OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DEVICE_DESCRIPTION_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ |
6 #define MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ | 6 #define MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
9 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
10 | 11 |
11 namespace media { | 12 namespace media { |
12 | 13 |
13 // Provides common information on audio device names and ids. | 14 // Provides common information on audio device names and ids. |
14 class MEDIA_EXPORT AudioDeviceDescription { | 15 struct MEDIA_EXPORT AudioDeviceDescription { |
15 public: | |
16 // Unique Id of the generic "default" device. Associated with the localized | 16 // Unique Id of the generic "default" device. Associated with the localized |
17 // name returned from GetDefaultDeviceName(). | 17 // name returned from GetDefaultDeviceName(). |
18 static const char kDefaultDeviceId[]; | 18 static const char kDefaultDeviceId[]; |
19 | 19 |
20 // Unique Id of the generic default communications device. Associated with | 20 // Unique Id of the generic default communications device. Associated with |
21 // the localized name returned from GetCommunicationsDeviceName(). | 21 // the localized name returned from GetCommunicationsDeviceName(). |
22 static const char kCommunicationsDeviceId[]; | 22 static const char kCommunicationsDeviceId[]; |
23 | 23 |
24 // Input device ID used to capture the default system playback stream. When | 24 // Input device ID used to capture the default system playback stream. When |
25 // this device ID is passed to MakeAudioInputStream() the returned | 25 // this device ID is passed to MakeAudioInputStream() the returned |
(...skipping 20 matching lines...) Expand all Loading... |
46 static bool UseSessionIdToSelectDevice(int session_id, | 46 static bool UseSessionIdToSelectDevice(int session_id, |
47 const std::string& device_id); | 47 const std::string& device_id); |
48 | 48 |
49 // Returns the localized name of the generic "default" device. | 49 // Returns the localized name of the generic "default" device. |
50 static std::string GetDefaultDeviceName(); | 50 static std::string GetDefaultDeviceName(); |
51 | 51 |
52 // Returns the localized name of the generic default communications device. | 52 // Returns the localized name of the generic default communications device. |
53 // This device is not supported on all platforms. | 53 // This device is not supported on all platforms. |
54 static std::string GetCommunicationsDeviceName(); | 54 static std::string GetCommunicationsDeviceName(); |
55 | 55 |
56 private: | 56 AudioDeviceDescription(const AudioDeviceDescription& other) = default; |
57 AudioDeviceDescription() {} | 57 AudioDeviceDescription(const std::string& device_name, |
58 ~AudioDeviceDescription() {} | 58 const std::string& unique_id, |
| 59 const std::string& group_id); |
| 60 |
| 61 ~AudioDeviceDescription() = default; |
| 62 |
| 63 std::string device_name; // Friendly name of the device. |
| 64 std::string unique_id; // Unique identifier for the device. |
| 65 std::string group_id; // Group identifier. |
59 }; | 66 }; |
60 | 67 |
| 68 typedef std::vector<AudioDeviceDescription> AudioDeviceDescriptions; |
| 69 |
61 } // namespace media | 70 } // namespace media |
62 | 71 |
63 #endif // MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ | 72 #endif // MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ |
OLD | NEW |