OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual void SetVolume(double volume); | 84 virtual void SetVolume(double volume); |
85 virtual void GetVolume(double* volume); | 85 virtual void GetVolume(double* volume); |
86 | 86 |
87 private: | 87 private: |
88 friend class base::RefCountedThreadSafe<AlsaPcmOutputStream>; | 88 friend class base::RefCountedThreadSafe<AlsaPcmOutputStream>; |
89 friend class AlsaPcmOutputStreamTest; | 89 friend class AlsaPcmOutputStreamTest; |
90 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect); | 90 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect); |
91 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices); | 91 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices); |
92 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); | 92 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); |
93 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket); | 93 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket); |
| 94 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_Negative); |
94 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_StopStream); | 95 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_StopStream); |
| 96 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_Underrun); |
95 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_UnfinishedPacket); | 97 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_UnfinishedPacket); |
96 FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState); | 98 FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState); |
97 FRIEND_TEST(AlsaPcmOutputStreamTest, LatencyFloor); | 99 FRIEND_TEST(AlsaPcmOutputStreamTest, LatencyFloor); |
98 FRIEND_TEST(AlsaPcmOutputStreamTest, OpenClose); | 100 FRIEND_TEST(AlsaPcmOutputStreamTest, OpenClose); |
99 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmOpenFailed); | 101 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmOpenFailed); |
100 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmSetParamsFailed); | 102 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmSetParamsFailed); |
101 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite); | 103 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite); |
102 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream); | 104 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream); |
103 FRIEND_TEST(AlsaPcmOutputStreamTest, StartStop); | 105 FRIEND_TEST(AlsaPcmOutputStreamTest, StartStop); |
104 FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket); | 106 FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 MessageLoop* client_thread_loop_; | 253 MessageLoop* client_thread_loop_; |
252 | 254 |
253 // The message loop responsible for querying the data source, and writing to | 255 // The message loop responsible for querying the data source, and writing to |
254 // the output device. | 256 // the output device. |
255 MessageLoop* message_loop_; | 257 MessageLoop* message_loop_; |
256 | 258 |
257 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); | 259 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); |
258 }; | 260 }; |
259 | 261 |
260 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ | 262 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ |
OLD | NEW |