OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include <string> | 26 #include <string> |
27 | 27 |
28 #include "base/compiler_specific.h" | 28 #include "base/compiler_specific.h" |
29 #include "base/gtest_prod_util.h" | 29 #include "base/gtest_prod_util.h" |
30 #include "base/memory/scoped_ptr.h" | 30 #include "base/memory/scoped_ptr.h" |
31 #include "base/memory/weak_ptr.h" | 31 #include "base/memory/weak_ptr.h" |
32 #include "media/audio/audio_io.h" | 32 #include "media/audio/audio_io.h" |
33 #include "media/audio/audio_parameters.h" | 33 #include "media/audio/audio_parameters.h" |
34 | 34 |
| 35 class MessageLoop; |
| 36 |
35 namespace media { | 37 namespace media { |
36 class SeekableBuffer; | |
37 }; // namespace media | |
38 | 38 |
39 class AlsaWrapper; | 39 class AlsaWrapper; |
40 class AudioManagerLinux; | 40 class AudioManagerLinux; |
41 class MessageLoop; | 41 class SeekableBuffer; |
42 | 42 |
43 class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream { | 43 class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream { |
44 public: | 44 public: |
45 // String for the generic "default" ALSA device that has the highest | 45 // String for the generic "default" ALSA device that has the highest |
46 // compatibility and chance of working. | 46 // compatibility and chance of working. |
47 static const char kDefaultDevice[]; | 47 static const char kDefaultDevice[]; |
48 | 48 |
49 // Pass this to the AlsaPcmOutputStream if you want to attempt auto-selection | 49 // Pass this to the AlsaPcmOutputStream if you want to attempt auto-selection |
50 // of the audio device. | 50 // of the audio device. |
51 static const char kAutoSelectDevice[]; | 51 static const char kAutoSelectDevice[]; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 float volume_; // Volume level from 0.0 to 1.0. | 203 float volume_; // Volume level from 0.0 to 1.0. |
204 | 204 |
205 AudioSourceCallback* source_callback_; | 205 AudioSourceCallback* source_callback_; |
206 | 206 |
207 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); | 207 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); |
208 }; | 208 }; |
209 | 209 |
210 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, | 210 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, |
211 AlsaPcmOutputStream::InternalState); | 211 AlsaPcmOutputStream::InternalState); |
212 | 212 |
| 213 }; // namespace media |
| 214 |
213 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ | 215 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ |
OLD | NEW |