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 // 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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Filter implementation. | 36 // Filter implementation. |
37 virtual void Play(const base::Closure& callback) OVERRIDE; | 37 virtual void Play(const base::Closure& callback) OVERRIDE; |
38 virtual void Pause(const base::Closure& callback) OVERRIDE; | 38 virtual void Pause(const base::Closure& callback) OVERRIDE; |
39 virtual void Stop(const base::Closure& callback) OVERRIDE; | 39 virtual void Stop(const base::Closure& callback) OVERRIDE; |
40 | 40 |
41 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; | 41 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb) OVERRIDE; |
42 | 42 |
43 // AudioRenderer implementation. | 43 // AudioRenderer implementation. |
44 virtual void Initialize(AudioDecoder* decoder, | 44 virtual void Initialize(AudioDecoder* decoder, |
45 const base::Closure& init_callback, | 45 const PipelineStatusCB& init_callback, |
46 const base::Closure& underflow_callback) OVERRIDE; | 46 const base::Closure& underflow_callback) OVERRIDE; |
47 virtual bool HasEnded() OVERRIDE; | 47 virtual bool HasEnded() OVERRIDE; |
48 virtual void ResumeAfterUnderflow(bool buffer_more_audio) OVERRIDE; | 48 virtual void ResumeAfterUnderflow(bool buffer_more_audio) OVERRIDE; |
49 | 49 |
50 protected: | 50 protected: |
51 FRIEND_TEST_ALL_PREFIXES(AudioRendererBaseTest, EndOfStream); | 51 FRIEND_TEST_ALL_PREFIXES(AudioRendererBaseTest, EndOfStream); |
52 FRIEND_TEST_ALL_PREFIXES(AudioRendererBaseTest, Underflow_EndOfStream); | 52 FRIEND_TEST_ALL_PREFIXES(AudioRendererBaseTest, Underflow_EndOfStream); |
53 | 53 |
54 // Subclasses should return true if they were able to initialize, false | 54 // Subclasses should return true if they were able to initialize, false |
55 // otherwise. | 55 // otherwise. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 base::TimeDelta seek_timestamp_; | 158 base::TimeDelta seek_timestamp_; |
159 | 159 |
160 AudioDecoder::ReadCB read_cb_; | 160 AudioDecoder::ReadCB read_cb_; |
161 | 161 |
162 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase); | 162 DISALLOW_COPY_AND_ASSIGN(AudioRendererBase); |
163 }; | 163 }; |
164 | 164 |
165 } // namespace media | 165 } // namespace media |
166 | 166 |
167 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ | 167 #endif // MEDIA_FILTERS_AUDIO_RENDERER_BASE_H_ |
OLD | NEW |