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

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: remove extra scope 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
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 StatisticsCB statistics_cb_; 209 StatisticsCB statistics_cb_;
209 base::Closure underflow_cb_; 210 base::Closure underflow_cb_;
210 TimeCB time_cb_; 211 TimeCB time_cb_;
211 base::Closure ended_cb_; 212 base::Closure ended_cb_;
212 base::Closure disabled_cb_; 213 base::Closure disabled_cb_;
213 PipelineStatusCB error_cb_; 214 PipelineStatusCB error_cb_;
214 215
215 // Callback provided to Flush(). 216 // Callback provided to Flush().
216 base::Closure flush_cb_; 217 base::Closure flush_cb_;
217 218
219 // Callback provided to Stop().
220 base::Closure stop_cb_;
221
218 // Callback provided to Preroll(). 222 // Callback provided to Preroll().
219 PipelineStatusCB preroll_cb_; 223 PipelineStatusCB preroll_cb_;
220 224
221 // Typically calls base::TimeTicks::Now() but can be overridden by a test. 225 // Typically calls base::TimeTicks::Now() but can be overridden by a test.
222 NowCB now_cb_; 226 NowCB now_cb_;
223 227
224 // After Initialize() has completed, all variables below must be accessed 228 // After Initialize() has completed, all variables below must be accessed
225 // under |lock_|. ------------------------------------------------------------ 229 // under |lock_|. ------------------------------------------------------------
226 base::Lock lock_; 230 base::Lock lock_;
227 231
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 bool preroll_aborted_; 276 bool preroll_aborted_;
273 277
274 // End variables which must be accessed under |lock_|. ---------------------- 278 // End variables which must be accessed under |lock_|. ----------------------
275 279
276 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 280 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
277 }; 281 };
278 282
279 } // namespace media 283 } // namespace media
280 284
281 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 285 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698