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

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

Issue 9566002: On windows, create PCMWaveInAudioInputStream instance with correct device ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test. Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/win/audio_manager_win.cc ('k') | media/audio/win/device_enumeration_win.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) 2011 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>
9
8 #include "media/audio/audio_device_name.h" 10 #include "media/audio/audio_device_name.h"
9 11
12 namespace media {
13
10 // Returns a list of audio input device structures (name and unique device ID) 14 // Returns a list of audio input device structures (name and unique device ID)
11 // using the MMDevice API which is supported on Windows Vista and higher. 15 // using the MMDevice API which is supported on Windows Vista and higher.
12 // Example record in the output list: 16 // Example record in the output list:
13 // - device_name: "Microphone (Realtek High Definition Audio)". 17 // - device_name: "Microphone (Realtek High Definition Audio)".
14 // - unique_id: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}" 18 // - unique_id: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}"
15 // This method must be called from a COM thread using MTA. 19 // This method must be called from a COM thread using MTA.
16 bool GetInputDeviceNamesWin(media::AudioDeviceNames* device_names); 20 bool GetInputDeviceNamesWin(media::AudioDeviceNames* device_names);
17 21
18 // Returns a list of audio input device structures (name and unique device ID) 22 // Returns a list of audio input device structures (name and unique device ID)
19 // using the WaveIn API which is supported on Windows XP and higher. 23 // using the WaveIn API which is supported on Windows XP and higher.
20 // Example record in the output list: 24 // Example record in the output list:
21 // - device_name: "Microphone (Realtek High Defini". 25 // - device_name: "Microphone (Realtek High Defini".
22 // - unique_id: "Microphone (Realtek High Defini" (same as friendly name). 26 // - unique_id: "Microphone (Realtek High Defini" (same as friendly name).
23 bool GetInputDeviceNamesWinXP(media::AudioDeviceNames* device_names); 27 bool GetInputDeviceNamesWinXP(media::AudioDeviceNames* device_names);
24 28
29 // Converts a device ID generated by |GetInputDeviceNamesWin()| to the
30 // corresponding ID by |GetInputDeviceNamesWinXP()|. Returns an empty string on
31 // failure.
32 // Example input and output:
33 // - input ID: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}"
34 // - output ID: "Microphone (Realtek High Defini"
35 std::string ConvertToWinXPDeviceId(const std::string& device_id);
36
37 } // namespace media
38
25 #endif // MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_ 39 #endif // MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
26 40
OLDNEW
« no previous file with comments | « media/audio/win/audio_manager_win.cc ('k') | media/audio/win/device_enumeration_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698