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

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

Issue 1538463002: Revert of 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: 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, uint32_t audio_delay_milliseconds, 171 int Render(media::AudioBus* audio_bus, int audio_delay_milliseconds) override;
172 uint32_t frames_skipped) override;
173 void OnRenderError() override; 172 void OnRenderError() override;
174 173
175 // Called by AudioPullFifo when more data is necessary. 174 // Called by AudioPullFifo when more data is necessary.
176 // This method is called on the AudioOutputDevice worker thread. 175 // This method is called on the AudioOutputDevice worker thread.
177 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus); 176 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus);
178 177
179 // Goes through all renderers for the |source| and applies the proper 178 // Goes through all renderers for the |source| and applies the proper
180 // volume scaling for the source based on the volume(s) of the renderer(s). 179 // volume scaling for the source based on the volume(s) of the renderer(s).
181 void UpdateSourceVolume(webrtc::AudioSourceInterface* source); 180 void UpdateSourceVolume(webrtc::AudioSourceInterface* source);
182 181
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Used for triggering new UMA histogram. Counts number of render 262 // Used for triggering new UMA histogram. Counts number of render
264 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|. 263 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|.
265 int render_callback_count_; 264 int render_callback_count_;
266 265
267 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 266 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
268 }; 267 };
269 268
270 } // namespace content 269 } // namespace content
271 270
272 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 271 #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