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: content/renderer/media/webrtc_audio_renderer.h

Issue 1487983002: 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 fixes. Loads of files updated due to interface changes. 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 <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 // Used to DCHECK that we are called on the correct thread. 160 // Used to DCHECK that we are called on the correct thread.
161 base::ThreadChecker thread_checker_; 161 base::ThreadChecker thread_checker_;
162 base::ThreadChecker audio_renderer_thread_checker_; 162 base::ThreadChecker audio_renderer_thread_checker_;
163 163
164 // Flag to keep track the state of the renderer. 164 // Flag to keep track the state of the renderer.
165 State state_; 165 State state_;
166 166
167 // media::AudioRendererSink::RenderCallback implementation. 167 // media::AudioRendererSink::RenderCallback implementation.
168 // These two methods are called on the AudioOutputDevice worker thread. 168 // These two methods are called on the AudioOutputDevice worker thread.
169 int Render(media::AudioBus* audio_bus, int audio_delay_milliseconds) override; 169 int Render(media::AudioBus* audio_bus, int audio_delay_milliseconds,
170 uint32_t frames_skipped) override;
170 void OnRenderError() override; 171 void OnRenderError() override;
171 172
172 // Called by AudioPullFifo when more data is necessary. 173 // Called by AudioPullFifo when more data is necessary.
173 // This method is called on the AudioOutputDevice worker thread. 174 // This method is called on the AudioOutputDevice worker thread.
174 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus); 175 void SourceCallback(int fifo_frame_delay, media::AudioBus* audio_bus);
175 176
176 // Goes through all renderers for the |source| and applies the proper 177 // Goes through all renderers for the |source| and applies the proper
177 // volume scaling for the source based on the volume(s) of the renderer(s). 178 // volume scaling for the source based on the volume(s) of the renderer(s).
178 void UpdateSourceVolume(webrtc::AudioSourceInterface* source); 179 void UpdateSourceVolume(webrtc::AudioSourceInterface* source);
179 180
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Used for triggering new UMA histogram. Counts number of render 262 // Used for triggering new UMA histogram. Counts number of render
262 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|. 263 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|.
263 int render_callback_count_; 264 int render_callback_count_;
264 265
265 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 266 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
266 }; 267 };
267 268
268 } // namespace content 269 } // namespace content
269 270
270 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 271 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698