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 #ifndef MEDIA_BASE_AUDIO_RENDERER_H_ | 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_H_ |
6 #define MEDIA_BASE_AUDIO_RENDERER_H_ | 6 #define MEDIA_BASE_AUDIO_RENDERER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // | 36 // |
37 // |time_cb| is executed whenever time has advanced by way of audio rendering. | 37 // |time_cb| is executed whenever time has advanced by way of audio rendering. |
38 // | 38 // |
39 // |ended_cb| is executed when audio rendering has reached the end of stream. | 39 // |ended_cb| is executed when audio rendering has reached the end of stream. |
40 // | 40 // |
41 // |disabled_cb| is executed when audio rendering has been disabled due to | 41 // |disabled_cb| is executed when audio rendering has been disabled due to |
42 // external factors (i.e., device was removed). |time_cb| will no longer be | 42 // external factors (i.e., device was removed). |time_cb| will no longer be |
43 // executed. | 43 // executed. |
44 // | 44 // |
45 // |error_cb| is executed if an error was encountered. | 45 // |error_cb| is executed if an error was encountered. |
46 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, | 46 virtual void Initialize(DemuxerStream* stream, |
47 const PipelineStatusCB& init_cb, | 47 const PipelineStatusCB& init_cb, |
48 const StatisticsCB& statistics_cb, | 48 const StatisticsCB& statistics_cb, |
49 const base::Closure& underflow_cb, | 49 const base::Closure& underflow_cb, |
50 const TimeCB& time_cb, | 50 const TimeCB& time_cb, |
51 const base::Closure& ended_cb, | 51 const base::Closure& ended_cb, |
52 const base::Closure& disabled_cb, | 52 const base::Closure& disabled_cb, |
53 const PipelineStatusCB& error_cb) = 0; | 53 const PipelineStatusCB& error_cb) = 0; |
54 | 54 |
55 // Start audio decoding and rendering at the current playback rate, executing | 55 // Start audio decoding and rendering at the current playback rate, executing |
56 // |callback| when playback is underway. | 56 // |callback| when playback is underway. |
(...skipping 29 matching lines...) Expand all Loading... |
86 // decoded audio buffer. | 86 // decoded audio buffer. |
87 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; | 87 virtual void ResumeAfterUnderflow(bool buffer_more_audio) = 0; |
88 | 88 |
89 private: | 89 private: |
90 DISALLOW_COPY_AND_ASSIGN(AudioRenderer); | 90 DISALLOW_COPY_AND_ASSIGN(AudioRenderer); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace media | 93 } // namespace media |
94 | 94 |
95 #endif // MEDIA_BASE_AUDIO_RENDERER_H_ | 95 #endif // MEDIA_BASE_AUDIO_RENDERER_H_ |
OLD | NEW |