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

Unified Diff: webrtc/pc/mediacontroller.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/mediacontroller.cc
diff --git a/webrtc/pc/mediacontroller.cc b/webrtc/pc/mediacontroller.cc
index fa8acadddcc5229b7126c4b4c2c9cdc7b34b25fb..32d8bd1a68ae5ed259cf9b1b23f9981e9170c4ab 100644
--- a/webrtc/pc/mediacontroller.cc
+++ b/webrtc/pc/mediacontroller.cc
@@ -37,7 +37,9 @@ class MediaController : public webrtc::MediaControllerInterface,
channel_manager_(channel_manager),
call_config_(event_log) {
RTC_DCHECK(worker_thread);
+#ifdef HAVE_MEDIA
RTC_DCHECK(event_log);
+#endif
worker_thread_->Invoke<void>(RTC_FROM_HERE,
rtc::Bind(&MediaController::Construct_w, this,
channel_manager_->media_engine()));
@@ -53,9 +55,11 @@ class MediaController : public webrtc::MediaControllerInterface,
}
webrtc::Call* call_w() override {
RTC_DCHECK(worker_thread_->IsCurrent());
+#ifdef HAVE_MEDIA
if (!call_) {
call_.reset(webrtc::Call::Create(call_config_));
}
+#endif
return call_.get();
}
cricket::ChannelManager* channel_manager() const override {
@@ -66,8 +70,10 @@ class MediaController : public webrtc::MediaControllerInterface,
private:
void Construct_w(cricket::MediaEngineInterface* media_engine) {
RTC_DCHECK(worker_thread_->IsCurrent());
+#ifdef HAVE_MEDIA
RTC_DCHECK(media_engine);
call_config_.audio_state = media_engine->GetAudioState();
+#endif
call_config_.bitrate_config.min_bitrate_bps = kMinBandwidthBps;
call_config_.bitrate_config.start_bitrate_bps = kStartBandwidthBps;
call_config_.bitrate_config.max_bitrate_bps = kMaxBandwidthBps;

Powered by Google App Engine
This is Rietveld 408576698