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

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

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from patch 48 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(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
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
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