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_SINK_H_ | 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 class AudioRendererSink | 33 class AudioRendererSink |
34 : public base::RefCountedThreadSafe<media::AudioRendererSink> { | 34 : public base::RefCountedThreadSafe<media::AudioRendererSink> { |
35 public: | 35 public: |
36 class RenderCallback { | 36 class RenderCallback { |
37 public: | 37 public: |
38 // Attempts to completely fill all channels of |dest|, returns actual | 38 // Attempts to completely fill all channels of |dest|, returns actual |
39 // number of frames filled. |frames_skipped| contains the number of frames | 39 // number of frames filled. |frames_skipped| contains the number of frames |
40 // the consumer has skipped, if any. | 40 // the consumer has skipped, if any. |
41 virtual int Render(AudioBus* dest, | 41 virtual int Render(AudioBus* dest, |
42 uint32_t audio_delay_milliseconds, | 42 uint32_t frames_delayed, |
43 uint32_t frames_skipped) = 0; | 43 uint32_t frames_skipped) = 0; |
44 | 44 |
45 // Signals an error has occurred. | 45 // Signals an error has occurred. |
46 virtual void OnRenderError() = 0; | 46 virtual void OnRenderError() = 0; |
47 | 47 |
48 protected: | 48 protected: |
49 virtual ~RenderCallback() {} | 49 virtual ~RenderCallback() {} |
50 }; | 50 }; |
51 | 51 |
52 // Sets important information about the audio stream format. | 52 // Sets important information about the audio stream format. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // this. | 89 // this. |
90 | 90 |
91 class RestartableAudioRendererSink : public AudioRendererSink { | 91 class RestartableAudioRendererSink : public AudioRendererSink { |
92 protected: | 92 protected: |
93 ~RestartableAudioRendererSink() override {} | 93 ~RestartableAudioRendererSink() override {} |
94 }; | 94 }; |
95 | 95 |
96 } // namespace media | 96 } // namespace media |
97 | 97 |
98 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 98 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
OLD | NEW |