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

Side by Side Diff: media/audio/audio_manager_base.h

Issue 1317033006: Linux: Do not use a hard coded app name for PulseAudio output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromeos Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Input device ID used to capture the default system playback stream. When 43 // Input device ID used to capture the default system playback stream. When
44 // this device ID is passed to MakeAudioInputStream() the returned 44 // this device ID is passed to MakeAudioInputStream() the returned
45 // AudioInputStream will be capturing audio currently being played on the 45 // AudioInputStream will be capturing audio currently being played on the
46 // default playback device. At the moment this feature is supported only on 46 // default playback device. At the moment this feature is supported only on
47 // some platforms. AudioInputStream::Intialize() will return an error on 47 // some platforms. AudioInputStream::Intialize() will return an error on
48 // platforms that don't support it. GetInputStreamParameters() must be used 48 // platforms that don't support it. GetInputStreamParameters() must be used
49 // to get the parameters of the loopback device before creating a loopback 49 // to get the parameters of the loopback device before creating a loopback
50 // stream, otherwise stream initialization may fail. 50 // stream, otherwise stream initialization may fail.
51 static const char kLoopbackInputDeviceId[]; 51 static const char kLoopbackInputDeviceId[];
52 52
53 #if defined(OS_LINUX)
54 // Sets the name of the audio source as seen by external apps. Only actually
55 // used with PulseAudio as of this writing.
56 static void SetGlobalAppName(const std::string& app_name);
57
58 // Returns the app name or an empty string if it is not set.
59 static const std::string& GetGlobalAppName();
60 #endif
61
53 ~AudioManagerBase() override; 62 ~AudioManagerBase() override;
54 63
55 // AudioManager: 64 // AudioManager:
56 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override; 65 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override;
57 scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() override; 66 scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() override;
58 base::string16 GetAudioInputDeviceModel() override; 67 base::string16 GetAudioInputDeviceModel() override;
59 void ShowAudioInputSettings() override; 68 void ShowAudioInputSettings() override;
60 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; 69 void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
61 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; 70 void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
62 AudioOutputStream* MakeAudioOutputStream( 71 AudioOutputStream* MakeAudioOutputStream(
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 195
187 // Proxy for creating AudioLog objects. 196 // Proxy for creating AudioLog objects.
188 AudioLogFactory* const audio_log_factory_; 197 AudioLogFactory* const audio_log_factory_;
189 198
190 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 199 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
191 }; 200 };
192 201
193 } // namespace media 202 } // namespace media
194 203
195 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 204 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698