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

Side by Side Diff: media/base/audio_renderer_sink.h

Issue 1687213002: Express audio delay more precisely in frames rather than milliseconds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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/base/audio_renderer_mixer_input.cc ('k') | media/renderers/audio_renderer_impl.h » ('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 #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
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
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_
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer_input.cc ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698