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

Unified Diff: webrtc/pc/channelmanager.cc

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Add an end to end test for libjingle_peerconnection_datachannel_only. Make it 2.37Mb. Created 3 years, 7 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 af6e3c7e99e16f9780c4872ee8384a2d006e71df..d9dd35a2aa12b9668623c6a6d6b13978a6ded2c3 100644
--- a/webrtc/pc/channelmanager.cc
+++ b/webrtc/pc/channelmanager.cc
@@ -140,14 +140,19 @@ bool ChannelManager::Init() {
rtc::Bind(&rtc::Thread::SetAllowBlockingCalls, network_thread_, false));
}
+#if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO)
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();
}
@@ -224,6 +229,9 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w(
RTC_DCHECK(worker_thread_ == rtc::Thread::Current());
RTC_DCHECK(nullptr != call);
+#ifndef HAVE_WEBRTC_VOICE
+ return nullptr;
+#endif
VoiceMediaChannel* media_channel = media_engine_->CreateChannel(
call, media_config, options);
if (!media_channel)
« webrtc/media/BUILD.gn ('K') | « webrtc/pc/channel.cc ('k') | webrtc/pc/mediasession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698