| 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 "media/base/media_export.h" | 9 #include "media/base/media_export.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 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 |
| 26 // AudioInputStream will be capturing audio currently being played on the | 26 // AudioInputStream will be capturing audio currently being played on the |
| 27 // default playback device. At the moment this feature is supported only on | 27 // default playback device. At the moment this feature is supported only on |
| 28 // some platforms. AudioInputStream::Intialize() will return an error on | 28 // some platforms. AudioInputStream::Intialize() will return an error on |
| 29 // platforms that don't support it. GetInputStreamParameters() must be used | 29 // platforms that don't support it. GetInputStreamParameters() must be used |
| 30 // to get the parameters of the loopback device before creating a loopback | 30 // to get the parameters of the loopback device before creating a loopback |
| 31 // stream, otherwise stream initialization may fail. | 31 // stream, otherwise stream initialization may fail. |
| 32 static const char kLoopbackInputDeviceId[]; | 32 static const char kLoopbackInputDeviceId[]; |
| 33 | 33 |
| 34 // Similar to |kLoopbackInputDeviceId|, with only difference that this ID |
| 35 // will mute system audio during capturing. |
| 36 static const char kLoopbackWithMuteDeviceId[]; |
| 37 |
| 34 // Returns true if |device_id| represents the default device. | 38 // Returns true if |device_id| represents the default device. |
| 35 static bool IsDefaultDevice(const std::string& device_id); | 39 static bool IsDefaultDevice(const std::string& device_id); |
| 36 | 40 |
| 37 // If |device_id| is not empty, |session_id| should be ignored and the output | 41 // If |device_id| is not empty, |session_id| should be ignored and the output |
| 38 // device should be selected basing on |device_id|. | 42 // device should be selected basing on |device_id|. |
| 39 // If |device_id| is empty and |session_id| is nonzero, output device | 43 // If |device_id| is empty and |session_id| is nonzero, output device |
| 40 // associated with the opened input device designated by |session_id| should | 44 // associated with the opened input device designated by |session_id| should |
| 41 // be used. | 45 // be used. |
| 42 static bool UseSessionIdToSelectDevice(int session_id, | 46 static bool UseSessionIdToSelectDevice(int session_id, |
| 43 const std::string& device_id); | 47 const std::string& device_id); |
| 44 | 48 |
| 45 // Returns the localized name of the generic "default" device. | 49 // Returns the localized name of the generic "default" device. |
| 46 static std::string GetDefaultDeviceName(); | 50 static std::string GetDefaultDeviceName(); |
| 47 | 51 |
| 48 // Returns the localized name of the generic default communications device. | 52 // Returns the localized name of the generic default communications device. |
| 49 // This device is not supported on all platforms. | 53 // This device is not supported on all platforms. |
| 50 static std::string GetCommunicationsDeviceName(); | 54 static std::string GetCommunicationsDeviceName(); |
| 51 | 55 |
| 52 private: | 56 private: |
| 53 AudioDeviceDescription() {} | 57 AudioDeviceDescription() {} |
| 54 ~AudioDeviceDescription() {} | 58 ~AudioDeviceDescription() {} |
| 55 }; | 59 }; |
| 56 | 60 |
| 57 } // namespace media | 61 } // namespace media |
| 58 | 62 |
| 59 #endif // MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ | 63 #endif // MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ |
| OLD | NEW |