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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool AudioManagerAlsa::HasAudioInputDevices() { | 86 bool AudioManagerAlsa::HasAudioInputDevices() { |
87 return HasAnyAlsaAudioDevice(kStreamCapture); | 87 return HasAnyAlsaAudioDevice(kStreamCapture); |
88 } | 88 } |
89 | 89 |
90 AudioManagerAlsa::AudioManagerAlsa( | 90 AudioManagerAlsa::AudioManagerAlsa( |
91 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 91 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
92 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, | 92 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, |
93 AudioLogFactory* audio_log_factory) | 93 AudioLogFactory* audio_log_factory) |
94 : AudioManagerBase(std::move(task_runner), | 94 : AudioManagerBase(std::move(task_runner), |
95 std::move(worker_task_runner), | 95 std::move(worker_task_runner), |
96 audio_log_factory), | 96 audio_log_factory, |
| 97 // TODO BEFORE COMMIT: Proper callback. |
| 98 CreateAudioFileWriterCallback()), |
97 wrapper_(new AlsaWrapper()) { | 99 wrapper_(new AlsaWrapper()) { |
98 SetMaxOutputStreamsAllowed(kMaxOutputStreams); | 100 SetMaxOutputStreamsAllowed(kMaxOutputStreams); |
99 } | 101 } |
100 | 102 |
101 AudioManagerAlsa::~AudioManagerAlsa() { | 103 AudioManagerAlsa::~AudioManagerAlsa() { |
102 Shutdown(); | 104 Shutdown(); |
103 } | 105 } |
104 | 106 |
105 void AudioManagerAlsa::ShowAudioInputSettings() { | 107 void AudioManagerAlsa::ShowAudioInputSettings() { |
106 ShowLinuxAudioInputSettings(); | 108 ShowLinuxAudioInputSettings(); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 369 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
368 switches::kAlsaInputDevice)) { | 370 switches::kAlsaInputDevice)) { |
369 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 371 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
370 switches::kAlsaInputDevice); | 372 switches::kAlsaInputDevice); |
371 } | 373 } |
372 | 374 |
373 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); | 375 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); |
374 } | 376 } |
375 | 377 |
376 } // namespace media | 378 } // namespace media |
OLD | NEW |