| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Audio rendering unit utilizing an AudioRendererSink to output data. | 5 // Audio rendering unit utilizing an AudioRendererSink to output data. |
| 6 // | 6 // |
| 7 // This class lives inside three threads during it's lifetime, namely: | 7 // This class lives inside three threads during it's lifetime, namely: |
| 8 // 1. Render thread | 8 // 1. Render thread |
| 9 // Where the object is created. | 9 // Where the object is created. |
| 10 // 2. Media thread (provided via constructor) | 10 // 2. Media thread (provided via constructor) |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 bool IsBeforeStartTime(const scoped_refptr<AudioBuffer>& buffer); | 166 bool IsBeforeStartTime(const scoped_refptr<AudioBuffer>& buffer); |
| 167 | 167 |
| 168 // Called upon AudioBufferStream initialization, or failure thereof (indicated | 168 // Called upon AudioBufferStream initialization, or failure thereof (indicated |
| 169 // by the value of |success|). | 169 // by the value of |success|). |
| 170 void OnAudioBufferStreamInitialized(bool succes); | 170 void OnAudioBufferStreamInitialized(bool succes); |
| 171 | 171 |
| 172 // Used to initiate the flush operation once all pending reads have | 172 // Used to initiate the flush operation once all pending reads have |
| 173 // completed. | 173 // completed. |
| 174 void DoFlush_Locked(); | 174 void DoFlush_Locked(); |
| 175 | 175 |
| 176 // Calls |decoder_|.Reset() and arranges for ResetDecoderDone() to get | |
| 177 // called when the reset completes. | |
| 178 void ResetDecoder(); | |
| 179 | |
| 180 // Called when the |decoder_|.Reset() has completed. | 176 // Called when the |decoder_|.Reset() has completed. |
| 181 void ResetDecoderDone(); | 177 void ResetDecoderDone(); |
| 182 | 178 |
| 183 // Called by the AudioBufferStream when a splice buffer is demuxed. | 179 // Called by the AudioBufferStream when a splice buffer is demuxed. |
| 184 void OnNewSpliceBuffer(base::TimeDelta); | 180 void OnNewSpliceBuffer(base::TimeDelta); |
| 185 | 181 |
| 186 // Called by the AudioBufferStream when a config change occurs. | 182 // Called by the AudioBufferStream when a config change occurs. |
| 187 void OnConfigChange(); | 183 void OnConfigChange(); |
| 188 | 184 |
| 189 // Updates |buffering_state_| and fires |buffering_state_cb_|. | 185 // Updates |buffering_state_| and fires |buffering_state_cb_|. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 262 |
| 267 // NOTE: Weak pointers must be invalidated before all other member variables. | 263 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 268 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; | 264 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; |
| 269 | 265 |
| 270 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 266 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 271 }; | 267 }; |
| 272 | 268 |
| 273 } // namespace media | 269 } // namespace media |
| 274 | 270 |
| 275 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ | 271 #endif // MEDIA_RENDERERS_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |