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

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

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 years 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 // Used to DCHECK that we are called on the correct thread. 162 // Used to DCHECK that we are called on the correct thread.
163 base::ThreadChecker thread_checker_; 163 base::ThreadChecker thread_checker_;
164 base::ThreadChecker audio_renderer_thread_checker_; 164 base::ThreadChecker audio_renderer_thread_checker_;
165 165
166 // Flag to keep track the state of the renderer. 166 // Flag to keep track the state of the renderer.
167 State state_; 167 State state_;
168 168
169 // media::AudioRendererSink::RenderCallback implementation. 169 // media::AudioRendererSink::RenderCallback implementation.
170 // These two methods are called on the AudioOutputDevice worker thread. 170 // These two methods are called on the AudioOutputDevice worker thread.
171 int Render(media::AudioBus* audio_bus, int audio_delay_milliseconds) override; 171 int Render(media::AudioBus* audio_bus,
172 uint32_t audio_delay_milliseconds,
173 uint32_t frames_skipped) override;
172 void OnRenderError() override; 174 void OnRenderError() override;
173 175
174 // Called by AudioPullFifo when more data is necessary. 176 // Called by AudioPullFifo when more data is necessary.
175 // This method is called on the AudioOutputDevice worker thread. 177 // This method is called on the AudioOutputDevice worker thread.
176 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus); 178 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus);
177 179
178 // Goes through all renderers for the |source| and applies the proper 180 // Goes through all renderers for the |source| and applies the proper
179 // volume scaling for the source based on the volume(s) of the renderer(s). 181 // volume scaling for the source based on the volume(s) of the renderer(s).
180 void UpdateSourceVolume(webrtc::AudioSourceInterface* source); 182 void UpdateSourceVolume(webrtc::AudioSourceInterface* source);
181 183
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Used for triggering new UMA histogram. Counts number of render 264 // Used for triggering new UMA histogram. Counts number of render
263 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|. 265 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|.
264 int render_callback_count_; 266 int render_callback_count_;
265 267
266 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 268 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
267 }; 269 };
268 270
269 } // namespace content 271 } // namespace content
270 272
271 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 273 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_webaudiodevice_impl.cc ('k') | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698