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

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

Issue 1864483002: Forward output glitch information from stream WebRTC log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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 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 #ifndef MEDIA_AUDIO_AUDIO_LOGGING_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_LOGGING_H_
6 #define MEDIA_AUDIO_AUDIO_LOGGING_H_ 6 #define MEDIA_AUDIO_AUDIO_LOGGING_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 11
12 namespace media { 12 namespace media {
13
13 class AudioParameters; 14 class AudioParameters;
14 15
15 // AudioLog logs state information about an active audio component. Each method 16 // AudioLog logs state information about an active audio component. Each method
16 // takes a |component_id| along with method specific information. Its methods 17 // takes a |component_id| along with method specific information. Its methods
17 // are safe to call from any thread. 18 // are safe to call from any thread.
18 class AudioLog { 19 class AudioLog {
19 public: 20 public:
20 virtual ~AudioLog() {} 21 virtual ~AudioLog() {}
21 22
22 // Called when an audio component is created. |params| are the parameters of 23 // Called when an audio component is created. |params| are the parameters of
(...skipping 18 matching lines...) Expand all
41 // Called when an audio component encounters an error. 42 // Called when an audio component encounters an error.
42 virtual void OnError(int component_id) = 0; 43 virtual void OnError(int component_id) = 0;
43 44
44 // Called when an audio component changes volume. |volume| is the new volume. 45 // Called when an audio component changes volume. |volume| is the new volume.
45 virtual void OnSetVolume(int component_id, double volume) = 0; 46 virtual void OnSetVolume(int component_id, double volume) = 0;
46 47
47 // Called when an audio component switches output device. |device_id| is the 48 // Called when an audio component switches output device. |device_id| is the
48 // new audio output device. 49 // new audio output device.
49 virtual void OnSwitchOutputDevice(int component_id, 50 virtual void OnSwitchOutputDevice(int component_id,
50 const std::string& device_id) = 0; 51 const std::string& device_id) = 0;
52
53 // Called when an audio component wants to forward a log message.
54 virtual void OnLogMessage(int component_id, const std::string& message) = 0;
51 }; 55 };
52 56
53 // AudioLogFactory dispenses AudioLog instances to owning classes for tracking 57 // AudioLogFactory dispenses AudioLog instances to owning classes for tracking
54 // AudioComponent behavior. All AudioComponents have the concept of an owning 58 // AudioComponent behavior. All AudioComponents have the concept of an owning
55 // class: 59 // class:
56 // 60 //
57 // - AudioInputRendererHost for AudioInputController 61 // - AudioInputRendererHost for AudioInputController
58 // - AudioRendererHost for AudioOutputController 62 // - AudioRendererHost for AudioOutputController
59 // - AudioOutputDispatcherImpl for AudioOutputStream 63 // - AudioOutputDispatcherImpl for AudioOutputStream
60 // 64 //
(...skipping 18 matching lines...) Expand all
79 virtual std::unique_ptr<AudioLog> CreateAudioLog( 83 virtual std::unique_ptr<AudioLog> CreateAudioLog(
80 AudioComponent component) = 0; 84 AudioComponent component) = 0;
81 85
82 protected: 86 protected:
83 virtual ~AudioLogFactory() {} 87 virtual ~AudioLogFactory() {}
84 }; 88 };
85 89
86 } // namespace media 90 } // namespace media
87 91
88 #endif // MEDIA_AUDIO_AUDIO_LOGGING_H_ 92 #endif // MEDIA_AUDIO_AUDIO_LOGGING_H_
OLDNEW
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698