Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 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 |
| 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 static const char kLoopbackWithMuteDeviceId[]; | |
|
henrika (OOO until Aug 14)
2016/07/25 08:38:19
Please add a comment for the new constant.
qiangchen
2016/07/25 22:42:22
Done.
| |
| 33 | 34 |
| 34 // Returns true if |device_id| represents the default device. | 35 // Returns true if |device_id| represents the default device. |
| 35 static bool IsDefaultDevice(const std::string& device_id); | 36 static bool IsDefaultDevice(const std::string& device_id); |
| 36 | 37 |
| 37 // If |device_id| is not empty, |session_id| should be ignored and the output | 38 // If |device_id| is not empty, |session_id| should be ignored and the output |
| 38 // device should be selected basing on |device_id|. | 39 // device should be selected basing on |device_id|. |
| 39 // If |device_id| is empty and |session_id| is nonzero, output device | 40 // If |device_id| is empty and |session_id| is nonzero, output device |
| 40 // associated with the opened input device designated by |session_id| should | 41 // associated with the opened input device designated by |session_id| should |
| 41 // be used. | 42 // be used. |
| 42 static bool UseSessionIdToSelectDevice(int session_id, | 43 static bool UseSessionIdToSelectDevice(int session_id, |
| 43 const std::string& device_id); | 44 const std::string& device_id); |
| 44 | 45 |
| 45 // Returns the localized name of the generic "default" device. | 46 // Returns the localized name of the generic "default" device. |
| 46 static std::string GetDefaultDeviceName(); | 47 static std::string GetDefaultDeviceName(); |
| 47 | 48 |
| 48 // Returns the localized name of the generic default communications device. | 49 // Returns the localized name of the generic default communications device. |
| 49 // This device is not supported on all platforms. | 50 // This device is not supported on all platforms. |
| 50 static std::string GetCommunicationsDeviceName(); | 51 static std::string GetCommunicationsDeviceName(); |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 AudioDeviceDescription() {} | 54 AudioDeviceDescription() {} |
| 54 ~AudioDeviceDescription() {} | 55 ~AudioDeviceDescription() {} |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace media | 58 } // namespace media |
| 58 | 59 |
| 59 #endif // MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ | 60 #endif // MEDIA_AUDIO_AUDIO_DEVICE_DESCRIPTION_H_ |
| OLD | NEW |