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

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

Issue 675013005: Split libjingle's signaling thread from the UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase after landing data channel change Created 6 years, 1 month 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 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_LOCAL_AUDIO_TRACK_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // data to the audio track when hooking up with WebAudio. 98 // data to the audio track when hooking up with WebAudio.
99 scoped_refptr<WebAudioCapturerSource> webaudio_source_; 99 scoped_refptr<WebAudioCapturerSource> webaudio_source_;
100 100
101 // A tagged list of sinks that the audio data is fed to. Tags 101 // A tagged list of sinks that the audio data is fed to. Tags
102 // indicate tracks that need to be notified that the audio format 102 // indicate tracks that need to be notified that the audio format
103 // has changed. 103 // has changed.
104 SinkList sinks_; 104 SinkList sinks_;
105 105
106 // Used to DCHECK that some methods are called on the main render thread. 106 // Used to DCHECK that some methods are called on the main render thread.
107 base::ThreadChecker main_render_thread_checker_; 107 base::ThreadChecker main_render_thread_checker_;
108 // Tests that methods are called on libjingle's signaling thread.
109 base::ThreadChecker signal_thread_checker_;
108 110
109 // Used to DCHECK that some methods are called on the capture audio thread. 111 // Used to DCHECK that some methods are called on the capture audio thread.
110 base::ThreadChecker capture_thread_checker_; 112 base::ThreadChecker capture_thread_checker_;
111 113
112 // Protects |params_| and |sinks_|. 114 // Protects |params_| and |sinks_|.
113 mutable base::Lock lock_; 115 mutable base::Lock lock_;
114 116
115 // Audio parameters of the audio capture stream. 117 // Audio parameters of the audio capture stream.
116 // Accessed on only the audio capture thread. 118 // Accessed on only the audio capture thread.
117 media::AudioParameters audio_parameters_; 119 media::AudioParameters audio_parameters_;
118 120
119 // Used to calculate the signal level that shows in the UI. 121 // Used to calculate the signal level that shows in the UI.
120 // Accessed on only the audio thread. 122 // Accessed on only the audio thread.
121 scoped_ptr<MediaStreamAudioLevelCalculator> level_calculator_; 123 scoped_ptr<MediaStreamAudioLevelCalculator> level_calculator_;
122 124
123 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack); 125 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioTrack);
124 }; 126 };
125 127
126 } // namespace content 128 } // namespace content
127 129
128 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_ 130 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_TRACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698