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

Unified Diff: webrtc/pc/channelmanager.cc

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Address the comments. Created 3 years, 8 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
Index: webrtc/pc/channelmanager.cc
diff --git a/webrtc/pc/channelmanager.cc b/webrtc/pc/channelmanager.cc
index 995a07bf0562c6de6e43f000104be5934b4a5f60..5f377f274b313a9b995d1c44db7cd93ee50ff00f 100644
--- a/webrtc/pc/channelmanager.cc
+++ b/webrtc/pc/channelmanager.cc
@@ -141,14 +141,19 @@ bool ChannelManager::Init() {
rtc::Bind(&rtc::Thread::SetAllowBlockingCalls, network_thread_, false));
}
+#ifdef HAVE_MEDIA
initialized_ = worker_thread_->Invoke<bool>(
RTC_FROM_HERE, Bind(&ChannelManager::InitMediaEngine_w, this));
+#else
+ initialized_ = true;
+#endif
RTC_DCHECK(initialized_);
return initialized_;
}
bool ChannelManager::InitMediaEngine_w() {
RTC_DCHECK(worker_thread_ == rtc::Thread::Current());
+ RTC_DCHECK(media_engine_);
return media_engine_->Init();
}
@@ -222,6 +227,9 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w(
RTC_DCHECK(worker_thread_ == rtc::Thread::Current());
RTC_DCHECK(nullptr != media_controller);
+#ifndef HAVE_MEDIA
+ return nullptr;
+#endif
VoiceMediaChannel* media_channel = media_engine_->CreateChannel(
media_controller->call_w(), media_controller->config(), options);
if (!media_channel)
« no previous file with comments | « webrtc/pc/channel.cc ('k') | webrtc/pc/mediacontroller.cc » ('j') | webrtc/pc/mediasession.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698