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

Side by Side Diff: media/audio/alsa/alsa_output.h

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review (dalecurtis@ and maxmorin@). Created 3 years, 11 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 // Creates an output stream based on the ALSA PCM interface. 5 // Creates an output stream based on the ALSA PCM interface.
6 // 6 //
7 // On device write failure, the stream will move itself to an invalid state. 7 // On device write failure, the stream will move itself to an invalid state.
8 // No more data will be pulled from the data source, or written to the device. 8 // No more data will be pulled from the data source, or written to the device.
9 // All calls to public API functions will either no-op themselves, or return an 9 // All calls to public API functions will either no-op themselves, or return an
10 // error if possible. Specifically, If the stream is in an error state, Open() 10 // error if possible. Specifically, If the stream is in an error state, Open()
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 ~AlsaPcmOutputStream() override; 78 ~AlsaPcmOutputStream() override;
79 79
80 // Implementation of AudioOutputStream. 80 // Implementation of AudioOutputStream.
81 bool Open() override; 81 bool Open() override;
82 void Close() override; 82 void Close() override;
83 void Start(AudioSourceCallback* callback) override; 83 void Start(AudioSourceCallback* callback) override;
84 void Stop() override; 84 void Stop() override;
85 void SetVolume(double volume) override; 85 void SetVolume(double volume) override;
86 void GetVolume(double* volume) override; 86 void GetVolume(double* volume) override;
87 void EnableDebugRecording(const base::FilePath& file_name) override;
88 void DisableDebugRecording() override;
87 89
88 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); 90 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
89 91
90 private: 92 private:
91 friend class AlsaPcmOutputStreamTest; 93 friend class AlsaPcmOutputStreamTest;
92 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, 94 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest,
93 AutoSelectDevice_DeviceSelect); 95 AutoSelectDevice_DeviceSelect);
94 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, 96 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest,
95 AutoSelectDevice_FallbackDevices); 97 AutoSelectDevice_FallbackDevices);
96 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); 98 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 223
222 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); 224 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream);
223 }; 225 };
224 226
225 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, 227 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os,
226 AlsaPcmOutputStream::InternalState); 228 AlsaPcmOutputStream::InternalState);
227 229
228 }; // namespace media 230 }; // namespace media
229 231
230 #endif // MEDIA_AUDIO_ALSA_ALSA_OUTPUT_H_ 232 #endif // MEDIA_AUDIO_ALSA_ALSA_OUTPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698