| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 void set_now_cb_for_testing(const NowCB& now_cb) { | 90 void set_now_cb_for_testing(const NowCB& now_cb) { |
| 91 now_cb_ = now_cb; | 91 now_cb_ = now_cb; |
| 92 } | 92 } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 friend class AudioRendererImplTest; | 95 friend class AudioRendererImplTest; |
| 96 | 96 |
| 97 // TODO(acolwell): Add a state machine graph. | 97 // TODO(acolwell): Add a state machine graph. |
| 98 enum State { | 98 enum State { |
| 99 kUninitialized, | 99 kUninitialized, |
| 100 kInitializing, |
| 100 kPaused, | 101 kPaused, |
| 101 kFlushing, | 102 kFlushing, |
| 102 kPrerolling, | 103 kPrerolling, |
| 103 kPlaying, | 104 kPlaying, |
| 104 kStopped, | 105 kStopped, |
| 105 kUnderflow, | 106 kUnderflow, |
| 106 kRebuffering, | 107 kRebuffering, |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 // Callback from the audio decoder delivering decoded audio samples. | 110 // Callback from the audio decoder delivering decoded audio samples. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 bool preroll_aborted_; | 273 bool preroll_aborted_; |
| 273 | 274 |
| 274 // End variables which must be accessed under |lock_|. ---------------------- | 275 // End variables which must be accessed under |lock_|. ---------------------- |
| 275 | 276 |
| 276 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 277 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
| 277 }; | 278 }; |
| 278 | 279 |
| 279 } // namespace media | 280 } // namespace media |
| 280 | 281 |
| 281 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ | 282 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ |
| OLD | NEW |