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

Side by Side Diff: media/audio/alsa/audio_manager_alsa.cc

Issue 1901583005: Revert of Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « media/audio/alsa/audio_manager_alsa.h ('k') | media/audio/android/audio_android_unittest.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 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
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
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
OLDNEW
« no previous file with comments | « media/audio/alsa/audio_manager_alsa.h ('k') | media/audio/android/audio_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698