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

Side by Side Diff: chromeos/audio/cras_audio_handler.h

Issue 1186293003: Implement HasInputDevices in CrasAudioManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment in cras_audio_handler.h for GetAudioDevices Created 5 years, 5 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 | « chromeos/audio/audio_device.h ('k') | media/DEPS » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 5 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Gets volume level in 0-100% range (0 being pure silence) for a device. 121 // Gets volume level in 0-100% range (0 being pure silence) for a device.
122 virtual int GetInputGainPercentForDevice(uint64_t device_id); 122 virtual int GetInputGainPercentForDevice(uint64_t device_id);
123 123
124 // Returns node_id of the primary active output node. 124 // Returns node_id of the primary active output node.
125 virtual uint64_t GetPrimaryActiveOutputNode() const; 125 virtual uint64_t GetPrimaryActiveOutputNode() const;
126 126
127 // Returns the node_id of the primary active input node. 127 // Returns the node_id of the primary active input node.
128 virtual uint64_t GetPrimaryActiveInputNode() const; 128 virtual uint64_t GetPrimaryActiveInputNode() const;
129 129
130 // Gets the audio devices back in |device_list|. 130 // Gets the audio devices back in |device_list|.
131 // This call can be invoked from I/O thread or UI thread because
132 // it does not need to access CrasAudioClient on DBus.
131 virtual void GetAudioDevices(AudioDeviceList* device_list) const; 133 virtual void GetAudioDevices(AudioDeviceList* device_list) const;
132 134
133 virtual bool GetPrimaryActiveOutputDevice(AudioDevice* device) const; 135 virtual bool GetPrimaryActiveOutputDevice(AudioDevice* device) const;
134 136
135 // Whether there is alternative input/output audio device. 137 // Whether there is alternative input/output audio device.
136 virtual bool has_alternative_input() const; 138 virtual bool has_alternative_input() const;
137 virtual bool has_alternative_output() const; 139 virtual bool has_alternative_output() const;
138 140
139 // Sets all active output devices' volume level to |volume_percent|, whose 141 // Sets all active output devices' volume level to |volume_percent|, whose
140 // range is from 0-100%. 142 // range is from 0-100%.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 bool hdmi_rediscovering_; 356 bool hdmi_rediscovering_;
355 357
356 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; 358 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_;
357 359
358 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); 360 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler);
359 }; 361 };
360 362
361 } // namespace chromeos 363 } // namespace chromeos
362 364
363 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 365 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
OLDNEW
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | media/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698