Index: talk/app/webrtc/mediacontroller.cc |
diff --git a/talk/app/webrtc/mediacontroller.cc b/talk/app/webrtc/mediacontroller.cc |
index 28b007e15b787e94fe92aa9ad385a1165350f139..71207bbfbc3564a961c7ecdc06c597dbe89e1b42 100644 |
--- a/talk/app/webrtc/mediacontroller.cc |
+++ b/talk/app/webrtc/mediacontroller.cc |
@@ -29,7 +29,6 @@ |
#include "webrtc/base/bind.h" |
#include "webrtc/base/checks.h" |
-#include "webrtc/call.h" |
namespace { |
@@ -37,11 +36,13 @@ const int kMinBandwidthBps = 30000; |
const int kStartBandwidthBps = 300000; |
const int kMaxBandwidthBps = 2000000; |
-class MediaController : public webrtc::MediaControllerInterface { |
+class MediaController : public webrtc::MediaControllerInterface, |
+ public sigslot::has_slots<> { |
public: |
- MediaController(rtc::Thread* worker_thread, |
+ MediaController(webrtc::CallFactory* call_factory, |
+ rtc::Thread* worker_thread, |
webrtc::VoiceEngine* voice_engine) |
- : worker_thread_(worker_thread) { |
+ : worker_thread_(worker_thread), call_factory_(call_factory) { |
RTC_DCHECK(nullptr != worker_thread); |
worker_thread_->Invoke<void>( |
rtc::Bind(&MediaController::Construct_w, this, voice_engine)); |
@@ -64,15 +65,17 @@ class MediaController : public webrtc::MediaControllerInterface { |
config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; |
config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; |
config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; |
- call_.reset(webrtc::Call::Create(config)); |
+ call_.reset(call_factory_->CreateCall(config)); |
} |
void Destruct_w() { |
RTC_DCHECK(worker_thread_->IsCurrent()); |
- call_.reset(nullptr); |
+ call_.reset(); |
} |
- rtc::Thread* worker_thread_; |
+ rtc::Thread* const worker_thread_; |
+ webrtc::CallFactory* call_factory_; |
rtc::scoped_ptr<webrtc::Call> call_; |
+ std::set<cricket::TransportChannel*> transport_channels_; |
pthatcher1
2015/10/09 20:57:48
You don't need this any more, do you?
stefan-webrtc
2015/10/10 15:32:51
Done.
|
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController); |
}; |
@@ -81,7 +84,9 @@ class MediaController : public webrtc::MediaControllerInterface { |
namespace webrtc { |
MediaControllerInterface* MediaControllerInterface::Create( |
- rtc::Thread* worker_thread, webrtc::VoiceEngine* voice_engine) { |
- return new MediaController(worker_thread, voice_engine); |
+ webrtc::CallFactory* call_factory, |
+ rtc::Thread* worker_thread, |
+ webrtc::VoiceEngine* voice_engine) { |
+ return new MediaController(call_factory, worker_thread, voice_engine); |
} |
} // namespace webrtc |