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

Unified Diff: webrtc/pc/channelmanager.cc

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Merge. 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..3b7fff05c954a1b5acc9201bdd94b1fb7f69e0d4 100644
--- a/webrtc/pc/channelmanager.cc
+++ b/webrtc/pc/channelmanager.cc
@@ -149,7 +149,12 @@ bool ChannelManager::Init() {
bool ChannelManager::InitMediaEngine_w() {
RTC_DCHECK(worker_thread_ == rtc::Thread::Current());
+#ifdef HAVE_MEDIA
+ RTC_DCHECK(media_engine_);
return media_engine_->Init();
+#else
+ return true;
+#endif
pthatcher1 2017/05/03 18:05:53 Would it be easier to just not call InitMediaEngin
Zhi Huang 2017/05/04 01:08:03 I guess we still need to do something like this:
}
void ChannelManager::Terminate() {
@@ -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)

Powered by Google App Engine
This is Rietveld 408576698