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

Unified Diff: media/audio/linux/audio_manager_linux.h

Issue 23480030: Output device enumeration for Alsa, plus unit test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mediaPulseaudio
Patch Set: Merge parent, and add default device. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/linux/audio_manager_linux.h
diff --git a/media/audio/linux/audio_manager_linux.h b/media/audio/linux/audio_manager_linux.h
index 28abaa116e79dbd0323ed8bb2393ee7da1a36545..7d0305e287ce49b6c9ae010d3c5e7f92aa8957d1 100644
--- a/media/audio/linux/audio_manager_linux.h
+++ b/media/audio/linux/audio_manager_linux.h
@@ -27,6 +27,8 @@ class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase {
virtual void ShowAudioInputSettings() OVERRIDE;
virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names)
OVERRIDE;
+ virtual void GetAudioOutputDeviceNames(media::AudioDeviceNames* device_names)
+ OVERRIDE;
virtual AudioParameters GetInputStreamParameters(
const std::string& device_id) OVERRIDE;
@@ -53,14 +55,21 @@ class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase {
kStreamCapture,
};
- // Gets a list of available ALSA input devices.
- void GetAlsaAudioInputDevices(media::AudioDeviceNames* device_names);
+ // Gets a list of available ALSA devices.
+ void GetAlsaAudioDevices(StreamType type,
+ media::AudioDeviceNames* device_names);
- // Gets the ALSA devices' names and ids.
- void GetAlsaDevicesInfo(void** hint, media::AudioDeviceNames* device_names);
+ // Gets the ALSA devices' names and ids that support streams of the
+ // given type.
+ void GetAlsaDevicesInfo(StreamType type,
+ void** hint,
+ media::AudioDeviceNames* device_names);
// Checks if the specific ALSA device is available.
- bool IsAlsaDeviceAvailable(const char* device_name);
+ bool IsAlsaDeviceAvailable(StreamType type,
+ const char* device_name);
+
+ const char* UnwantedDeviceTypeWhenEnumerating(StreamType wanted_type);
tommi (sloooow) - chröme 2013/09/04 14:32:51 Can this be just a static method in the cc file? (
Jói 2013/09/04 15:32:22 In order to let it use the StreamType enum, we hav
// Returns true if a device is present for the given stream type.
bool HasAnyAlsaAudioDevice(StreamType stream);

Powered by Google App Engine
This is Rietveld 408576698