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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.h

Issue 2934103002: Allow WebRtcMediaEngine to be created from any thread. (Closed)
Patch Set: Adding DCHECK for encoder_factory Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcmediaengine.h ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.h
diff --git a/webrtc/media/engine/webrtcvoiceengine.h b/webrtc/media/engine/webrtcvoiceengine.h
index bbfec880f884186b20af5d0a22377e115f4b6c47..3aba5818f9be50172d94950b7cf423a32dd28e93 100644
--- a/webrtc/media/engine/webrtcvoiceengine.h
+++ b/webrtc/media/engine/webrtcvoiceengine.h
@@ -67,6 +67,9 @@ class WebRtcVoiceEngine final : public webrtc::TraceCallback {
VoEWrapper* voe_wrapper);
~WebRtcVoiceEngine() override;
+ // Does initialization that needs to occur on the worker thread.
+ void Init();
+
rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const;
VoiceMediaChannel* CreateChannel(webrtc::Call* call,
const MediaConfig& config,
@@ -112,7 +115,7 @@ class WebRtcVoiceEngine final : public webrtc::TraceCallback {
void StartAecDump(const std::string& filename);
int CreateVoEChannel();
- rtc::TaskQueue low_priority_worker_queue_;
+ std::unique_ptr<rtc::TaskQueue> low_priority_worker_queue_;
webrtc::AudioDeviceModule* adm();
webrtc::AudioProcessing* apm();
@@ -128,6 +131,7 @@ class WebRtcVoiceEngine final : public webrtc::TraceCallback {
rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
rtc::scoped_refptr<webrtc::AudioEncoderFactory> encoder_factory_;
rtc::scoped_refptr<webrtc::AudioDecoderFactory> decoder_factory_;
+ rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer_;
// Reference to the APM, owned by VoE.
webrtc::AudioProcessing* apm_ = nullptr;
// Reference to the TransmitMixer, owned by VoE.
@@ -140,6 +144,7 @@ class WebRtcVoiceEngine final : public webrtc::TraceCallback {
std::vector<WebRtcVoiceMediaChannel*> channels_;
webrtc::VoEBase::ChannelConfig channel_config_;
bool is_dumping_aec_ = false;
+ bool initialized_ = false;
webrtc::AgcConfig default_agc_config_;
// Cache received extended_filter_aec, delay_agnostic_aec, experimental_ns
« no previous file with comments | « webrtc/media/engine/webrtcmediaengine.h ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698