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

Side by Side Diff: media/audio/win/device_enumeration_win.h

Issue 1097553003: Switch to STA mode for audio thread and WASAPI I/O streams. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 5 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
« no previous file with comments | « media/audio/win/core_audio_util_win_unittest.cc ('k') | no next file » | 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_WIN_DEVICE_ENUMERATION_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
6 #define MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_ 6 #define MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "media/audio/audio_device_name.h" 10 #include "media/audio/audio_device_name.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 // Returns a list of audio input or output device structures (name and 14 // Returns a list of audio input or output device structures (name and
15 // unique device ID) using the MMDevice API which is supported on 15 // unique device ID) using the MMDevice API which is supported on
16 // Windows Vista and higher. 16 // Windows Vista and higher.
17 // Example record in the output list: 17 // Example record in the output list:
18 // - device_name: "Microphone (Realtek High Definition Audio)". 18 // - device_name: "Microphone (Realtek High Definition Audio)".
19 // - unique_id: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}" 19 // - unique_id: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}"
20 // This method must be called from a COM thread using MTA. 20 // This method must be called from a COM thread using STA.
21 bool GetInputDeviceNamesWin(media::AudioDeviceNames* device_names); 21 bool GetInputDeviceNamesWin(media::AudioDeviceNames* device_names);
22 bool GetOutputDeviceNamesWin(media::AudioDeviceNames* device_names); 22 bool GetOutputDeviceNamesWin(media::AudioDeviceNames* device_names);
23 23
24 // Returns a list of audio input or output device structures (name and 24 // Returns a list of audio input or output device structures (name and
25 // unique device ID) using the WaveIn API which is supported on 25 // unique device ID) using the WaveIn API which is supported on
26 // Windows XP and higher. 26 // Windows XP and higher.
27 // Example record in the output list: 27 // Example record in the output list:
28 // - device_name: "Microphone (Realtek High Defini". 28 // - device_name: "Microphone (Realtek High Defini".
29 // - unique_id: "Microphone (Realtek High Defini" (same as friendly name). 29 // - unique_id: "Microphone (Realtek High Defini" (same as friendly name).
30 bool GetInputDeviceNamesWinXP(media::AudioDeviceNames* device_names); 30 bool GetInputDeviceNamesWinXP(media::AudioDeviceNames* device_names);
31 bool GetOutputDeviceNamesWinXP(media::AudioDeviceNames* device_names); 31 bool GetOutputDeviceNamesWinXP(media::AudioDeviceNames* device_names);
32 32
33 // Converts an input device ID generated by |GetInputDeviceNamesWin()| to the 33 // Converts an input device ID generated by |GetInputDeviceNamesWin()| to the
34 // corresponding ID by |GetInputDeviceNamesWinXP()|. Returns an empty string on 34 // corresponding ID by |GetInputDeviceNamesWinXP()|. Returns an empty string on
35 // failure. 35 // failure.
36 // Example input and output: 36 // Example input and output:
37 // - input ID: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}" 37 // - input ID: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}"
38 // - output ID: "Microphone (Realtek High Defini" 38 // - output ID: "Microphone (Realtek High Defini"
39 std::string ConvertToWinXPInputDeviceId(const std::string& device_id); 39 std::string ConvertToWinXPInputDeviceId(const std::string& device_id);
40 40
41 } // namespace media 41 } // namespace media
42 42
43 #endif // MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_ 43 #endif // MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
44 44
OLDNEW
« no previous file with comments | « media/audio/win/core_audio_util_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698