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

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

Issue 1528473003: Feed the WebRTC APM with empty far-end frames for the number of frames skipped by OS. (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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // the client buffer size is not the same as the output device buffer size. 233 // the client buffer size is not the same as the output device buffer size.
234 scoped_ptr<media::AudioPullFifo> audio_fifo_; 234 scoped_ptr<media::AudioPullFifo> audio_fifo_;
235 235
236 // Contains the accumulated delay estimate which is provided to the WebRTC 236 // Contains the accumulated delay estimate which is provided to the WebRTC
237 // AEC. 237 // AEC.
238 int audio_delay_milliseconds_; 238 int audio_delay_milliseconds_;
239 239
240 // Delay due to the FIFO in milliseconds. 240 // Delay due to the FIFO in milliseconds.
241 int fifo_delay_milliseconds_; 241 int fifo_delay_milliseconds_;
242 242
243 // Contains the accumulated number of skipped frames which is provided to the
244 // WebRTC AEC. Accessed on audio render thread.
245 uint32_t skipped_frames_;
246
243 base::TimeDelta current_time_; 247 base::TimeDelta current_time_;
244 248
245 // Saved volume and playing state of the root renderer. 249 // Saved volume and playing state of the root renderer.
246 PlayingState playing_state_; 250 PlayingState playing_state_;
247 251
248 // Audio params used by the sink of the renderer. 252 // Audio params used by the sink of the renderer.
249 media::AudioParameters sink_params_; 253 media::AudioParameters sink_params_;
250 254
251 // The preferred device id of the output device or empty for the default 255 // The preferred device id of the output device or empty for the default
252 // output device. Can change as a result of a SetSinkId() call. 256 // output device. Can change as a result of a SetSinkId() call.
(...skipping 10 matching lines...) Expand all
263 // Used for triggering new UMA histogram. Counts number of render 267 // Used for triggering new UMA histogram. Counts number of render
264 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|. 268 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|.
265 int render_callback_count_; 269 int render_callback_count_;
266 270
267 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 271 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
268 }; 272 };
269 273
270 } // namespace content 274 } // namespace content
271 275
272 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 276 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698