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

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

Issue 2101303004: Pass delay and timestamp to AudioSourceCallback::OnMoreData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix Mac CQ errors. Created 4 years, 2 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
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 12 matching lines...) Expand all
23 // periodically call Render() on a callback object. 23 // periodically call Render() on a callback object.
24 24
25 class AudioRendererSink 25 class AudioRendererSink
26 : public base::RefCountedThreadSafe<media::AudioRendererSink> { 26 : public base::RefCountedThreadSafe<media::AudioRendererSink> {
27 public: 27 public:
28 class RenderCallback { 28 class RenderCallback {
29 public: 29 public:
30 // Attempts to completely fill all channels of |dest|, returns actual 30 // Attempts to completely fill all channels of |dest|, returns actual
31 // number of frames filled. |frames_skipped| contains the number of frames 31 // number of frames filled. |frames_skipped| contains the number of frames
32 // the consumer has skipped, if any. 32 // the consumer has skipped, if any.
33 // TODO(jameswest): Change to use the same signature as
34 // AudioOutputStream::AudioSourceCallback::OnMoreData.
33 virtual int Render(AudioBus* dest, 35 virtual int Render(AudioBus* dest,
34 uint32_t frames_delayed, 36 uint32_t frames_delayed,
35 uint32_t frames_skipped) = 0; 37 uint32_t frames_skipped) = 0;
36 38
37 // Signals an error has occurred. 39 // Signals an error has occurred.
38 virtual void OnRenderError() = 0; 40 virtual void OnRenderError() = 0;
39 41
40 protected: 42 protected:
41 virtual ~RenderCallback() {} 43 virtual ~RenderCallback() {}
42 }; 44 };
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const url::Origin& security_origin, 103 const url::Origin& security_origin,
102 const OutputDeviceStatusCB& callback) = 0; 104 const OutputDeviceStatusCB& callback) = 0;
103 105
104 protected: 106 protected:
105 ~SwitchableAudioRendererSink() override {} 107 ~SwitchableAudioRendererSink() override {}
106 }; 108 };
107 109
108 } // namespace media 110 } // namespace media
109 111
110 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ 112 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698