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 // AudioRendererBase takes care of the tricky queuing work and provides simple | 5 // AudioRendererBase takes care of the tricky queuing work and provides simple |
6 // methods for subclasses to peek and poke at audio data. In addition to | 6 // methods for subclasses to peek and poke at audio data. In addition to |
7 // AudioRenderer interface methods this classes doesn't implement, subclasses | 7 // AudioRenderer interface methods this classes doesn't implement, subclasses |
8 // must also implement the following methods: | 8 // must also implement the following methods: |
9 // OnInitialized | 9 // OnInitialized |
10 // OnStop | 10 // OnStop |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // This is an indication that all the data written to the device has been | 81 // This is an indication that all the data written to the device has been |
82 // played. | 82 // played. |
83 // | 83 // |
84 // Safe to call on any thread. | 84 // Safe to call on any thread. |
85 uint32 FillBuffer(uint8* dest, | 85 uint32 FillBuffer(uint8* dest, |
86 uint32 len, | 86 uint32 len, |
87 const base::TimeDelta& playback_delay, | 87 const base::TimeDelta& playback_delay, |
88 bool buffers_empty); | 88 bool buffers_empty); |
89 | 89 |
90 // Get/Set the playback rate of |algorithm_|. | 90 // Get/Set the playback rate of |algorithm_|. |
91 virtual void SetPlaybackRate(float playback_rate); | 91 virtual void SetPlaybackRate(float playback_rate) OVERRIDE; |
92 virtual float GetPlaybackRate(); | 92 virtual float GetPlaybackRate(); |
93 | 93 |
94 private: | 94 private: |
95 // Helper method that schedules an asynchronous read from the decoder and | 95 // Helper method that schedules an asynchronous read from the decoder and |
96 // increments |pending_reads_|. | 96 // increments |pending_reads_|. |
97 // | 97 // |
98 // Safe to call from any thread. | 98 // Safe to call from any thread. |
99 void ScheduleRead_Locked(); | 99 void ScheduleRead_Locked(); |
100 | 100 |
101 // Audio decoder. | 101 // Audio decoder. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 base::Closure underflow_callback_; | 141 base::Closure underflow_callback_; |
142 | 142 |
143 base::TimeDelta seek_timestamp_; | 143 base::TimeDelta seek_timestamp_; |
144 | 144 |
145 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase); | 145 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase); |
146 }; | 146 }; |
147 | 147 |
148 } // namespace media | 148 } // namespace media |
149 | 149 |
150 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ | 150 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ |
OLD | NEW |