Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: media/filters/audio_renderer_impl.h

Issue 140823012: Reland: Add Stop() to AudioDecoder. (https://codereview.chromium.org/126793002/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add kInitializing state to ARI Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698