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

Side by Side Diff: content/renderer/media/webrtc_audio_renderer.h

Issue 2437863004: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: 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 CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // Used to DCHECK that we are called on the correct thread. 155 // Used to DCHECK that we are called on the correct thread.
156 base::ThreadChecker thread_checker_; 156 base::ThreadChecker thread_checker_;
157 157
158 // Flag to keep track the state of the renderer. 158 // Flag to keep track the state of the renderer.
159 State state_; 159 State state_;
160 160
161 // media::AudioRendererSink::RenderCallback implementation. 161 // media::AudioRendererSink::RenderCallback implementation.
162 // These two methods are called on the AudioOutputDevice worker thread. 162 // These two methods are called on the AudioOutputDevice worker thread.
163 int Render(media::AudioBus* audio_bus, 163 int Render(media::AudioBus* audio_bus,
164 uint32_t frames_delayed, 164 base::TimeDelta delay,
165 base::TimeTicks delay_timestamp,
165 uint32_t frames_skipped) override; 166 uint32_t frames_skipped) override;
166 void OnRenderError() override; 167 void OnRenderError() override;
167 168
168 // Called by AudioPullFifo when more data is necessary. 169 // Called by AudioPullFifo when more data is necessary.
169 // This method is called on the AudioOutputDevice worker thread. 170 // This method is called on the AudioOutputDevice worker thread.
170 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus); 171 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus);
171 172
172 // Goes through all renderers for the |source| and applies the proper 173 // Goes through all renderers for the |source| and applies the proper
173 // volume scaling for the source based on the volume(s) of the renderer(s). 174 // volume scaling for the source based on the volume(s) of the renderer(s).
174 void UpdateSourceVolume(webrtc::AudioSourceInterface* source); 175 void UpdateSourceVolume(webrtc::AudioSourceInterface* source);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // Stores the maximum time spent waiting for render data from the source. Used 254 // Stores the maximum time spent waiting for render data from the source. Used
254 // for logging UMA data. Logged and reset when Stop() is called. 255 // for logging UMA data. Logged and reset when Stop() is called.
255 base::TimeDelta max_render_time_; 256 base::TimeDelta max_render_time_;
256 257
257 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 258 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
258 }; 259 };
259 260
260 } // namespace content 261 } // namespace content
261 262
262 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 263 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698