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

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

Issue 9718013: Merge FilterStatusCB into PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/audio_renderer_base.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 // 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 21 matching lines...) Expand all
32 class MEDIA_EXPORT AudioRendererBase : public AudioRenderer { 32 class MEDIA_EXPORT AudioRendererBase : public AudioRenderer {
33 public: 33 public:
34 AudioRendererBase(); 34 AudioRendererBase();
35 virtual ~AudioRendererBase(); 35 virtual ~AudioRendererBase();
36 36
37 // Filter implementation. 37 // Filter implementation.
38 virtual void Play(const base::Closure& callback) OVERRIDE; 38 virtual void Play(const base::Closure& callback) OVERRIDE;
39 virtual void Pause(const base::Closure& callback) OVERRIDE; 39 virtual void Pause(const base::Closure& callback) OVERRIDE;
40 virtual void Flush(const base::Closure& callback) OVERRIDE; 40 virtual void Flush(const base::Closure& callback) OVERRIDE;
41 virtual void Stop(const base::Closure& callback) OVERRIDE; 41 virtual void Stop(const base::Closure& callback) OVERRIDE;
42 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; 42 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE;
43 43
44 // AudioRenderer implementation. 44 // AudioRenderer implementation.
45 virtual void Initialize(const scoped_refptr<AudioDecoder>& decoder, 45 virtual void Initialize(const scoped_refptr<AudioDecoder>& decoder,
46 const PipelineStatusCB& init_cb, 46 const PipelineStatusCB& init_cb,
47 const base::Closure& underflow_cb, 47 const base::Closure& underflow_cb,
48 const TimeCB& time_cb) OVERRIDE; 48 const TimeCB& time_cb) OVERRIDE;
49 virtual bool HasEnded() OVERRIDE; 49 virtual bool HasEnded() OVERRIDE;
50 virtual void ResumeAfterUnderflow(bool buffer_more_audio) OVERRIDE; 50 virtual void ResumeAfterUnderflow(bool buffer_more_audio) OVERRIDE;
51 51
52 protected: 52 protected:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Keeps track of whether we received and rendered the end of stream buffer. 147 // Keeps track of whether we received and rendered the end of stream buffer.
148 bool received_end_of_stream_; 148 bool received_end_of_stream_;
149 bool rendered_end_of_stream_; 149 bool rendered_end_of_stream_;
150 150
151 // Audio time at end of last call to FillBuffer(). 151 // Audio time at end of last call to FillBuffer().
152 // TODO(ralphl): Update this value after seeking. 152 // TODO(ralphl): Update this value after seeking.
153 base::TimeDelta last_fill_buffer_time_; 153 base::TimeDelta last_fill_buffer_time_;
154 154
155 // Filter callbacks. 155 // Filter callbacks.
156 base::Closure pause_cb_; 156 base::Closure pause_cb_;
157 FilterStatusCB seek_cb_; 157 PipelineStatusCB seek_cb_;
158 158
159 base::Closure underflow_cb_; 159 base::Closure underflow_cb_;
160 160
161 TimeCB time_cb_; 161 TimeCB time_cb_;
162 162
163 base::TimeDelta seek_timestamp_; 163 base::TimeDelta seek_timestamp_;
164 164
165 uint32 bytes_per_frame_; 165 uint32 bytes_per_frame_;
166 166
167 AudioDecoder::ReadCB read_cb_; 167 AudioDecoder::ReadCB read_cb_;
168 168
169 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase); 169 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase);
170 }; 170 };
171 171
172 } // namespace media 172 } // namespace media
173 173
174 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ 174 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/audio_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698