| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "media/audio/alsa/audio_manager_alsa.h" | 5 #include "media/audio/alsa/audio_manager_alsa.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 // Implementation of AudioManager. | 80 // Implementation of AudioManager. |
| 81 bool AudioManagerAlsa::HasAudioOutputDevices() { | 81 bool AudioManagerAlsa::HasAudioOutputDevices() { |
| 82 return HasAnyAlsaAudioDevice(kStreamPlayback); | 82 return HasAnyAlsaAudioDevice(kStreamPlayback); |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool AudioManagerAlsa::HasAudioInputDevices() { | 85 bool AudioManagerAlsa::HasAudioInputDevices() { |
| 86 return HasAnyAlsaAudioDevice(kStreamCapture); | 86 return HasAnyAlsaAudioDevice(kStreamCapture); |
| 87 } | 87 } |
| 88 | 88 |
| 89 AudioManagerAlsa::AudioManagerAlsa( | 89 AudioManagerAlsa::AudioManagerAlsa(AudioLogFactory* audio_log_factory) |
| 90 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 90 : AudioManagerBase(audio_log_factory), |
| 91 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, | |
| 92 AudioLogFactory* audio_log_factory) | |
| 93 : AudioManagerBase(std::move(task_runner), | |
| 94 std::move(worker_task_runner), | |
| 95 audio_log_factory), | |
| 96 wrapper_(new AlsaWrapper()) { | 91 wrapper_(new AlsaWrapper()) { |
| 97 SetMaxOutputStreamsAllowed(kMaxOutputStreams); | 92 SetMaxOutputStreamsAllowed(kMaxOutputStreams); |
| 98 } | 93 } |
| 99 | 94 |
| 100 AudioManagerAlsa::~AudioManagerAlsa() { | 95 AudioManagerAlsa::~AudioManagerAlsa() { |
| 101 Shutdown(); | 96 Shutdown(); |
| 102 } | 97 } |
| 103 | 98 |
| 104 void AudioManagerAlsa::ShowAudioInputSettings() { | 99 void AudioManagerAlsa::ShowAudioInputSettings() { |
| 105 ShowLinuxAudioInputSettings(); | 100 ShowLinuxAudioInputSettings(); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 354 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 360 switches::kAlsaInputDevice)) { | 355 switches::kAlsaInputDevice)) { |
| 361 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 356 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 362 switches::kAlsaInputDevice); | 357 switches::kAlsaInputDevice); |
| 363 } | 358 } |
| 364 | 359 |
| 365 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); | 360 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); |
| 366 } | 361 } |
| 367 | 362 |
| 368 } // namespace media | 363 } // namespace media |
| OLD | NEW |