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

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

Issue 495983002: Improve logging related to start/stop and failure of audio input streams in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback from xians@ Created 6 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 | Annotate | Revision Log
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_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // callback is to recreate the stream. 138 // callback is to recreate the stream.
139 class AudioDeviceListener { 139 class AudioDeviceListener {
140 public: 140 public:
141 virtual void OnDeviceChange() = 0; 141 virtual void OnDeviceChange() = 0;
142 }; 142 };
143 143
144 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; 144 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0;
145 virtual void RemoveOutputDeviceChangeListener( 145 virtual void RemoveOutputDeviceChangeListener(
146 AudioDeviceListener* listener) = 0; 146 AudioDeviceListener* listener) = 0;
147 147
148 // It is possible to register listeners for logging of important state
149 // changes. These are mainly intended for input streams and is used to track
150 // down issues related to failing captured audio (http://crbug.com/404884).
151 // The typical repsonse to receiving this callback is to add the information
152 // to some sort of log file.
153 // TODO(henrika): remove these when we have understood why audio is sometimes
154 // not captured as it should. See http://crbug.com/405449.
155 class StateChangeListener {
156 public:
157 virtual void OnStateChange(const std::string& state) = 0;
tommi (sloooow) - chröme 2014/08/26 11:42:31 Having |state| be a string is not what I'd expect.
henrika (OOO until Aug 14) 2014/08/27 13:44:05 Removed!
158 };
159
160 virtual void AddStateChangeListener(StateChangeListener* listener) = 0;
161 virtual void RemoveStateChangeListener(StateChangeListener* listener) = 0;
162
148 // Returns the default output hardware audio parameters for opening output 163 // Returns the default output hardware audio parameters for opening output
149 // streams. It is a convenience interface to 164 // streams. It is a convenience interface to
150 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager 165 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager
151 // does not need their own implementation to this interface. 166 // does not need their own implementation to this interface.
152 // TODO(tommi): Remove this method and use GetOutputStreamParameteres instead. 167 // TODO(tommi): Remove this method and use GetOutputStreamParameteres instead.
153 virtual AudioParameters GetDefaultOutputStreamParameters() = 0; 168 virtual AudioParameters GetDefaultOutputStreamParameters() = 0;
154 169
155 // Returns the output hardware audio parameters for a specific output device. 170 // Returns the output hardware audio parameters for a specific output device.
156 virtual AudioParameters GetOutputStreamParameters( 171 virtual AudioParameters GetOutputStreamParameters(
157 const std::string& device_id) = 0; 172 const std::string& device_id) = 0;
(...skipping 22 matching lines...) Expand all
180 protected: 195 protected:
181 AudioManager(); 196 AudioManager();
182 197
183 private: 198 private:
184 DISALLOW_COPY_AND_ASSIGN(AudioManager); 199 DISALLOW_COPY_AND_ASSIGN(AudioManager);
185 }; 200 };
186 201
187 } // namespace media 202 } // namespace media
188 203
189 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 204 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698