| Index: talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
|
| diff --git a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
|
| index 6639797f16e0e10716509008e3463e8eb7bb0787..c156df74a5c7a47fcb1967517979df9b7754b8d5 100644
|
| --- a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
|
| +++ b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
|
| @@ -55,8 +55,9 @@
|
| #include "webrtc/base/ssladapter.h"
|
|
|
| @implementation RTCPeerConnectionFactory {
|
| - std::unique_ptr<rtc::Thread> _signalingThread;
|
| + std::unique_ptr<rtc::Thread> _networkThread;
|
| std::unique_ptr<rtc::Thread> _workerThread;
|
| + std::unique_ptr<rtc::Thread> _signalingThread;
|
| }
|
|
|
| @synthesize nativeFactory = _nativeFactory;
|
| @@ -73,15 +74,21 @@
|
|
|
| - (id)init {
|
| if ((self = [super init])) {
|
| - _signalingThread.reset(new rtc::Thread());
|
| - BOOL result = _signalingThread->Start();
|
| - NSAssert(result, @"Failed to start signaling thread.");
|
| - _workerThread.reset(new rtc::Thread());
|
| + _networkThread = rtc::Thread::CreateWithSocketServer();
|
| + BOOL result = _networkThread->Start();
|
| + NSAssert(result, @"Failed to start network thread.");
|
| +
|
| + _workerThread = rtc::Thread::Create();
|
| result = _workerThread->Start();
|
| NSAssert(result, @"Failed to start worker thread.");
|
|
|
| + _signalingThread = rtc::Thread::Create();
|
| + result = _signalingThread->Start();
|
| + NSAssert(result, @"Failed to start signaling thread.");
|
| +
|
| _nativeFactory = webrtc::CreatePeerConnectionFactory(
|
| - _signalingThread.get(), _workerThread.get(), nullptr, nullptr, nullptr);
|
| + _networkThread.get(), _workerThread.get(), _signalingThread.get(),
|
| + nullptr, nullptr, nullptr);
|
| NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
|
| // Uncomment to get sensitive logs emitted (to stderr or logcat).
|
| // rtc::LogMessage::LogToDebug(rtc::LS_SENSITIVE);
|
|
|