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

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

Issue 2300723003: Fix data race in WebRtcAudioRenderer. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | content/renderer/media/webrtc_audio_renderer.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 (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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 scoped_refptr<media::AudioRendererSink> sink_; 206 scoped_refptr<media::AudioRendererSink> sink_;
207 207
208 // The media stream that holds the audio tracks that this renderer renders. 208 // The media stream that holds the audio tracks that this renderer renders.
209 const blink::WebMediaStream media_stream_; 209 const blink::WebMediaStream media_stream_;
210 210
211 // Audio data source from the browser process. 211 // Audio data source from the browser process.
212 WebRtcAudioRendererSource* source_; 212 WebRtcAudioRendererSource* source_;
213 213
214 // Protects access to |state_|, |source_|, |audio_fifo_|, 214 // Protects access to |state_|, |source_|, |audio_fifo_|,
215 // |audio_delay_milliseconds_|, |fifo_delay_milliseconds_|, |current_time_|, 215 // |audio_delay_milliseconds_|, |fifo_delay_milliseconds_|, |current_time_|,
216 // |sink_params_| and |render_callback_count_| 216 // |sink_params_|, |render_callback_count_| and |max_render_time_|.
217 mutable base::Lock lock_; 217 mutable base::Lock lock_;
218 218
219 // Ref count for the MediaPlayers which are playing audio. 219 // Ref count for the MediaPlayers which are playing audio.
220 int play_ref_count_; 220 int play_ref_count_;
221 221
222 // Ref count for the MediaPlayers which have called Start() but not Stop(). 222 // Ref count for the MediaPlayers which have called Start() but not Stop().
223 int start_ref_count_; 223 int start_ref_count_;
224 224
225 // Used to buffer data between the client and the output device in cases where 225 // Used to buffer data between the client and the output device in cases where
226 // the client buffer size is not the same as the output device buffer size. 226 // the client buffer size is not the same as the output device buffer size.
(...skipping 26 matching lines...) Expand all
253 // Stores the maximum time spent waiting for render data from the source. Used 253 // Stores the maximum time spent waiting for render data from the source. Used
254 // for logging UMA data. Logged and reset when Stop() is called. 254 // for logging UMA data. Logged and reset when Stop() is called.
255 base::TimeDelta max_render_time_; 255 base::TimeDelta max_render_time_;
256 256
257 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 257 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
258 }; 258 };
259 259
260 } // namespace content 260 } // namespace content
261 261
262 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 262 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698