| 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(AudioLogFactory* audio_log_factory) | 89 AudioManagerAlsa::AudioManagerAlsa( |
| 90 : AudioManagerBase(audio_log_factory), | 90 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 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), |
| 91 wrapper_(new AlsaWrapper()) { | 96 wrapper_(new AlsaWrapper()) { |
| 92 SetMaxOutputStreamsAllowed(kMaxOutputStreams); | 97 SetMaxOutputStreamsAllowed(kMaxOutputStreams); |
| 93 } | 98 } |
| 94 | 99 |
| 95 AudioManagerAlsa::~AudioManagerAlsa() { | 100 AudioManagerAlsa::~AudioManagerAlsa() { |
| 96 Shutdown(); | 101 Shutdown(); |
| 97 } | 102 } |
| 98 | 103 |
| 99 void AudioManagerAlsa::ShowAudioInputSettings() { | 104 void AudioManagerAlsa::ShowAudioInputSettings() { |
| 100 ShowLinuxAudioInputSettings(); | 105 ShowLinuxAudioInputSettings(); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 359 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 355 switches::kAlsaInputDevice)) { | 360 switches::kAlsaInputDevice)) { |
| 356 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 361 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 357 switches::kAlsaInputDevice); | 362 switches::kAlsaInputDevice); |
| 358 } | 363 } |
| 359 | 364 |
| 360 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); | 365 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); |
| 361 } | 366 } |
| 362 | 367 |
| 363 } // namespace media | 368 } // namespace media |
| OLD | NEW |