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

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

Issue 131213003: Fixed the racing in the resampler of webrtc when two streams are calling OnData() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed the comments. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/media/webrtc_audio_device_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_DEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // Cached value of the current audio delay on the input/capture side. 378 // Cached value of the current audio delay on the input/capture side.
379 int input_delay_ms_; 379 int input_delay_ms_;
380 380
381 // Cached value of the current audio delay on the output/renderer side. 381 // Cached value of the current audio delay on the output/renderer side.
382 int output_delay_ms_; 382 int output_delay_ms_;
383 383
384 // Protects |recording_|, |output_delay_ms_|, |input_delay_ms_|, |renderer_| 384 // Protects |recording_|, |output_delay_ms_|, |input_delay_ms_|, |renderer_|
385 // |recording_| and |microphone_volume_|. 385 // |recording_| and |microphone_volume_|.
386 mutable base::Lock lock_; 386 mutable base::Lock lock_;
387 387
388 // Used to protect the racing of calling OnData() since there can be more
389 // than one input stream calling OnData().
390 mutable base::Lock capture_callback_lock_;
391
388 bool initialized_; 392 bool initialized_;
389 bool playing_; 393 bool playing_;
390 bool recording_; 394 bool recording_;
391 395
392 // Used for histograms of total recording and playout times. 396 // Used for histograms of total recording and playout times.
393 base::Time start_capture_time_; 397 base::Time start_capture_time_;
394 base::Time start_render_time_; 398 base::Time start_render_time_;
395 399
396 // Stores latest microphone volume received in a CaptureData() callback. 400 // Stores latest microphone volume received in a CaptureData() callback.
397 // Range is [0, 255]. 401 // Range is [0, 255].
398 uint32_t microphone_volume_; 402 uint32_t microphone_volume_;
399 403
400 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); 404 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl);
401 }; 405 };
402 406
403 } // namespace content 407 } // namespace content
404 408
405 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 409 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc_audio_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698