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

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

Issue 178153007: Avoid hitting the thread check when WebRtcAudioRenderer is going away. (Closed) Base URL: http://git.chromium.org/chromium/src.git@libjingle_get_stats
Patch Set: Created 6 years, 9 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/media_stream_audio_processor.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_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 private: 90 private:
91 friend class MediaStreamAudioProcessorTest; 91 friend class MediaStreamAudioProcessorTest;
92 92
93 class MediaStreamAudioConverter; 93 class MediaStreamAudioConverter;
94 94
95 // WebRtcPlayoutDataSource::Sink implementation. 95 // WebRtcPlayoutDataSource::Sink implementation.
96 virtual void OnPlayoutData(media::AudioBus* audio_bus, 96 virtual void OnPlayoutData(media::AudioBus* audio_bus,
97 int sample_rate, 97 int sample_rate,
98 int audio_delay_milliseconds) OVERRIDE; 98 int audio_delay_milliseconds) OVERRIDE;
99 virtual void OnPlayoutDataSourceChanged() OVERRIDE;
99 100
100 // Helper to initialize the WebRtc AudioProcessing. 101 // Helper to initialize the WebRtc AudioProcessing.
101 void InitializeAudioProcessingModule( 102 void InitializeAudioProcessingModule(
102 const blink::WebMediaConstraints& constraints, int effects); 103 const blink::WebMediaConstraints& constraints, int effects);
103 104
104 // Helper to initialize the capture converter. 105 // Helper to initialize the capture converter.
105 void InitializeCaptureConverter(const media::AudioParameters& source_params); 106 void InitializeCaptureConverter(const media::AudioParameters& source_params);
106 107
107 // Helper to initialize the render converter. 108 // Helper to initialize the render converter.
108 void InitializeRenderConverterIfNeeded(int sample_rate, 109 void InitializeRenderConverterIfNeeded(int sample_rate,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Used by the typing detection. 164 // Used by the typing detection.
164 scoped_ptr<webrtc::TypingDetection> typing_detector_; 165 scoped_ptr<webrtc::TypingDetection> typing_detector_;
165 166
166 // Result from the typing detection. 167 // Result from the typing detection.
167 bool typing_detected_; 168 bool typing_detected_;
168 }; 169 };
169 170
170 } // namespace content 171 } // namespace content
171 172
172 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 173 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698